Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Laravel 7 #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

willemo
Copy link

@willemo willemo commented Aug 27, 2020

Based on the code in #73, I've created my own branch with some small fixes. This should be backwards compatible with the marking store config and also support a newer format.

Old:

'marking_store' => [
    'type' => 'single_state',
    'arguments' => ['currentPlace'],
],

New:

'marking_store' => [
    'arguments' => [true, 'currentPlace'],
],

You can use my fork by changing your composer.json and running composer update brexis/laravel-workflow:

"require": {
    "brexis/laravel-workflow": "dev-laravel-7-support"
},
"repositories": [
    {
        "type": "vcs",
        "url": "[email protected]:willemo/laravel-workflow.git"
    }
]

@willemo
Copy link
Author

willemo commented Aug 27, 2020

A slight warning for people wanting to update to this version: the subjects for the workflows need to have getters and setters for the marking. So if you have a model that has a state property you use to store the current place of the workflow, you need to add the getState() and setState($state) methods to that model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant