You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where MoneyTransferState is a string backed enum. This however creates a problem given the getState() in SM\StateMachine's return value is expected to be a string.
public function getState(): string
{
$accessor = new PropertyAccessor();
return $accessor->getValue($this->object, $this->config['property_path']);
}
Can i make a pull request with this modification?
public function getState(): string
{
$accessor = new PropertyAccessor();
$state = $accessor->getValue($this->object, $this->config['property_path']);
if ($state instanceof UnitEnum) {
return $state->value;
}
return $state;
}
Thanks
The text was updated successfully, but these errors were encountered:
Hello. With Laravel now supporting attribute casting I do this with my last_state property:
Where MoneyTransferState is a string backed enum. This however creates a problem given the getState() in SM\StateMachine's return value is expected to be a string.
Can i make a pull request with this modification?
Thanks
The text was updated successfully, but these errors were encountered: