Closed
Description
Symfony version(s) affected: 4.2+
Description
PhpDumper tries to access unknown method isShared
from class Symfony\Component\DependencyInjection\Alias
.
Here's the exact PHP error:
Error: Call to undefined method Symfony\Component\DependencyInjection\Alias::isShared()
/app/vendor/symfony/dependency-injection/Dumper/PhpDumper.php:1892
/app/vendor/symfony/dependency-injection/Dumper/PhpDumper.php:184
How to reproduce
- Clone the https://github.com/prooph/service-bus-symfony-bundle repository
- Install the dependencies (this will install
symfony/dependency-injection:4.3.*
) - Run the testsuite (
./vendor/bin/phpunit
)
I haven't been able (yet) to create a more minimalist environment, sorry about that!
Possible Solution
In PhpDumper::isSingleUsePrivateNode
, apply the following patch:
- if ($edge->isLazy() || !$value->isShared()) {
+ if ($edge->isLazy() || ($value instanceof Definition && !$value->isShared())) {
Additional context
Further investigations are being led on prooph/service-bus-symfony-bundle#79