Could not check compatibility between `Laminas\ClassGenerator` and `Zend\ClassGenerator`
joshlopes opened this issue · 4 comments
Hello everyone, having this issue and is confusing me and haven't any luck on fixing it.
Fatal error: Could not check compatibility between Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\LazyLoadingValueHolderGenerator::generate(ReflectionClass $originalClass, Zend\Code\Generator\ClassGenerator $classGenerator): void and ProxyManager\ProxyGenerator\LazyLoadingValueHolderGenerator::generate(ReflectionClass $originalClass, Laminas\Code\Generator\ClassGenerator $classGenerator), because class Zend\Code\Generator\ClassGenerator is not available in /var/www/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/LazyLoadingValueHolderGenerator.php on line 33
When trying to upgrade
Bumps ocramius/proxy-manager from 2.12.0 to 2.13.0.
Does anyone faced the same or knows what is wrong?
I've looked in this issue list and most of people say to use composer v2 we are using composer:v2.1.3 so not quite sure what could be causing this issue.
This could be an inadvertently introduced BC break due to stricter API signatures: will check 👍
@Ocramius dependabot is also trying to update laminas library, but I think if I manually update this by hand without laminas update it works fine.
This is what dependabot is doing. Guess some sort of incompatibility with laminas 4.4.2
?
Ah, I see the problem:
laminas/laminas-code
no longer requireslaminas/laminas-zendframework-bridge
since4.4.0
symfony/symfony
declares that itocramius/proxy-manager
, but does not declare that it also needszendframework/zend-code
laminas/laminas-zendframework-bridge
made it so that component requiringZend\
stuff, also worked withLaminas\
stuff
Therefore, the alternatives here are two:
- upgrade to a newer
symfony/symfony
releases: even if they did their own weird thing and started replacingocramius/proxy-manager
with a fork, because of political reasons of their own, they no longer rely on theZend\
dependency - manually add
laminas/laminas-zendframework-bridge
to your dependencies if you cannot upgrade
I've already made the problem clear at symfony/symfony#41742 (comment)