Closed
Description
Symfony version(s) affected: >=4.3.0
Description
When using workflow as standalone component it will not work when in production due to missing dependency on symfony/event-dispatcher
How to reproduce
composer.json
{
"require": {
"symfony/workflow": "4.3"
}
}
test.php
use Symfony\Component\Workflow\Definition;
use Symfony\Component\Workflow\Workflow;
include 'vendor/autoload.php';
$workflow = new Workflow(new Definition(['a'], []));
Run composer without dev dependencies
composer install --no-dev
Running test.php will result in
PHP Fatal error: Uncaught Error: Class 'Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy' not found in ...
Possible Solution
Either do a null check before trying to call LegacyEventDispatcherProxy::decorate
or add symfony/event-dispatcher
as a required dependency.