The following is an example application which uses the Symfony Workflow component to implement a basic statemachine.
git@github.com:makomweb/workflow-tutorial.git
composer install
php bin/console doctrine:database:create
php bin/console doctrine:schema:create
symfony server:start -d
Visit http://localhost:8000/create
to initialize.
The following sections are just side notes.
composer require symfony/maker-bundle --dev
php bin/console make:entity
- Product with name as string
php bin/console make:controller
- ProductController
php bin/console doctrine:database:create
php bin/console doctrine:schema:create
symfony console workflow:dump product | dot -Tpng -o workflow.png
composer require twig
generates the template sub folder and the base template
- add 'status' property to the Product entity
php bin/console make:entity
- create a migration
php bin/console make:migration
- run the migration
php bin/console doctrine:migrations:migrate
composer require --dev orm-fixtures
php bin/console doctrine:fixtures:load