llaville / php-compatinfo

Library that find out the minimum version and the extensions required for a piece of code to run
https://llaville.github.io/php-compatinfo/7.1/
Other
373 stars 20 forks source link

[6.1] Doctrine\Common\Annotations\AnnotationRegistry not found #332

Closed LucasKovacs closed 2 years ago

LucasKovacs commented 2 years ago

Bug report

OS

  1. Host operating system and version: macOS
  2. PHP version: 8.1.1
  3. PHP CompatInfo version: 6.1
  4. What git commit hash are you on?: -
  5. PHP extensions loaded? Uses either reference:list or db:list command depends on CompatInfo version: -

Summary

PHP Fatal error:  Uncaught Error: Class "Doctrine\Common\Annotations\AnnotationRegistry" not found in /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/doctrine/orm/lib/Doctrine/ORM/Configuration.php:164
Stack trace:
#0 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Setup.php(71): Doctrine\ORM\Configuration->newDefaultAnnotationDriver(Array, true)
#1 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/bartlett/php-compatinfo-db/src/Infrastructure/Persistence/Doctrine/EntityManagerFactory.php(40): Doctrine\ORM\Tools\Setup::createAnnotationMetadataConfiguration(Array, false, '/tmp/bartlett/p...', NULL)
#2 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/symfony/dependency-injection/ContainerBuilder.php(1093): Bartlett\CompatInfoDb\Infrastructure\Persistence\Doctrine\EntityManagerFactory::create(Array, false, '/tmp/bartlett/p...')
#3 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/symfony/dependency-injection/ContainerBuilder.php(608): Symfony\Component\DependencyInjection\ContainerBuilder->createService(Object(Symfony\Component\DependencyInjection\Definition), Array, false, 'Doctrine\\ORM\\En...')
#4 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/symfony/dependency-injection/ContainerBuilder.php(1228): Symfony\Component\DependencyInjection\ContainerBuilder->doGet('Doctrine\\ORM\\En...', 1, Array, false)
#5 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/symfony/dependency-injection/ContainerBuilder.php(1176): Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices(Object(Symfony\Component\DependencyInjection\TypedReference), Array, false)
#6 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/symfony/dependency-injection/ContainerBuilder.php(1078): Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices(Array, Array, false)
#7 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/symfony/dependency-injection/ContainerBuilder.php(608): Symfony\Component\DependencyInjection\ContainerBuilder->createService(Object(Symfony\Component\DependencyInjection\Definition), Array, false, 'Bartlett\\Compat...')
#8 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/symfony/dependency-injection/ContainerBuilder.php(1228): Symfony\Component\DependencyInjection\ContainerBuilder->doGet('Bartlett\\Compat...', 1, Array, false)
#9 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/symfony/dependency-injection/ContainerBuilder.php(1197): Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices(Object(Symfony\Component\DependencyInjection\Reference), Array)
#10 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/bartlett/php-compatinfo/src/Presentation/Console/FactoryCommandLoader.php(46): Symfony\Component\DependencyInjection\ContainerBuilder->Symfony\Component\DependencyInjection\{closure}()
#11 [internal function]: Bartlett\CompatInfo\Presentation\Console\FactoryCommandLoader->__construct(Object(Symfony\Component\DependencyInjection\Argument\RewindableGenerator))
#12 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/symfony/dependency-injection/ContainerBuilder.php(1105): ReflectionClass->newInstanceArgs(Array)
#13 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/symfony/dependency-injection/ContainerBuilder.php(608): Symfony\Component\DependencyInjection\ContainerBuilder->createService(Object(Symfony\Component\DependencyInjection\Definition), Array, true, 'Bartlett\\Compat...')
#14 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/symfony/dependency-injection/ContainerBuilder.php(553): Symfony\Component\DependencyInjection\ContainerBuilder->doGet('Bartlett\\Compat...', 1)
#15 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/bartlett/php-compatinfo/bin/phpcompatinfo(35): Symfony\Component\DependencyInjection\ContainerBuilder->get('Bartlett\\Compat...')
#16 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/bin/phpcompatinfo(107): include('/Users/lkovacs/...')
#17 {main}
  thrown in /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/doctrine/orm/lib/Doctrine/ORM/Configuration.php on line 164

Fatal error: Uncaught Error: Class "Doctrine\Common\Annotations\AnnotationRegistry" not found in /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/doctrine/orm/lib/Doctrine/ORM/Configuration.php:164
Stack trace:
#0 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Setup.php(71): Doctrine\ORM\Configuration->newDefaultAnnotationDriver(Array, true)
#1 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/bartlett/php-compatinfo-db/src/Infrastructure/Persistence/Doctrine/EntityManagerFactory.php(40): Doctrine\ORM\Tools\Setup::createAnnotationMetadataConfiguration(Array, false, '/tmp/bartlett/p...', NULL)
#2 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/symfony/dependency-injection/ContainerBuilder.php(1093): Bartlett\CompatInfoDb\Infrastructure\Persistence\Doctrine\EntityManagerFactory::create(Array, false, '/tmp/bartlett/p...')
#3 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/symfony/dependency-injection/ContainerBuilder.php(608): Symfony\Component\DependencyInjection\ContainerBuilder->createService(Object(Symfony\Component\DependencyInjection\Definition), Array, false, 'Doctrine\\ORM\\En...')
#4 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/symfony/dependency-injection/ContainerBuilder.php(1228): Symfony\Component\DependencyInjection\ContainerBuilder->doGet('Doctrine\\ORM\\En...', 1, Array, false)
#5 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/symfony/dependency-injection/ContainerBuilder.php(1176): Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices(Object(Symfony\Component\DependencyInjection\TypedReference), Array, false)
#6 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/symfony/dependency-injection/ContainerBuilder.php(1078): Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices(Array, Array, false)
#7 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/symfony/dependency-injection/ContainerBuilder.php(608): Symfony\Component\DependencyInjection\ContainerBuilder->createService(Object(Symfony\Component\DependencyInjection\Definition), Array, false, 'Bartlett\\Compat...')
#8 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/symfony/dependency-injection/ContainerBuilder.php(1228): Symfony\Component\DependencyInjection\ContainerBuilder->doGet('Bartlett\\Compat...', 1, Array, false)
#9 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/symfony/dependency-injection/ContainerBuilder.php(1197): Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices(Object(Symfony\Component\DependencyInjection\Reference), Array)
#10 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/bartlett/php-compatinfo/src/Presentation/Console/FactoryCommandLoader.php(46): Symfony\Component\DependencyInjection\ContainerBuilder->Symfony\Component\DependencyInjection\{closure}()
#11 [internal function]: Bartlett\CompatInfo\Presentation\Console\FactoryCommandLoader->__construct(Object(Symfony\Component\DependencyInjection\Argument\RewindableGenerator))
#12 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/symfony/dependency-injection/ContainerBuilder.php(1105): ReflectionClass->newInstanceArgs(Array)
#13 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/symfony/dependency-injection/ContainerBuilder.php(608): Symfony\Component\DependencyInjection\ContainerBuilder->createService(Object(Symfony\Component\DependencyInjection\Definition), Array, true, 'Bartlett\\Compat...')
#14 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/symfony/dependency-injection/ContainerBuilder.php(553): Symfony\Component\DependencyInjection\ContainerBuilder->doGet('Bartlett\\Compat...', 1)
#15 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/bartlett/php-compatinfo/bin/phpcompatinfo(35): Symfony\Component\DependencyInjection\ContainerBuilder->get('Bartlett\\Compat...')
#16 /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/bin/phpcompatinfo(107): include('/Users/lkovacs/...')
#17 {main}
  thrown in /Users/lkovacs/Documents/workspace.nosync/own/XG-Proyect-v3.x.x/src/vendor/doctrine/orm/lib/Doctrine/ORM/Configuration.php on line 164

Other information

Same structure as before, nothing changed, I just upgraded to 6.1, vendor and lock were deleted.

Structure has not changed composer.json src/vendor

I searched for AnnotationRegistry but could not find it, it seems that the folder was removed, on older doctrine setups that I have the folder is there.

llaville commented 2 years ago

Closing because it's not a PHP_CompatInfo issue (just side effect with PHP_CompatInfoDB). Read https://github.com/llaville/php-compatinfo-db/issues/108

A new release 3.16.2 is on way to fix issue both for PHP_CompatInfo 5.5 and 6.0 A new release 3.17.1 is on way to fix issue for PHP_CompatInfo 6.1

3.18.0 will come soon and will fix issue both for PHP_CompatInfo 6.1 and new version 6.2

llaville commented 2 years ago

@LucasKovacs FYI you can composer update your project. All PHP_CompatInfoDB releases are already available