-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
php8.1 doctrine/orm 2.13 unknown class: Doctrine\Persistence\Mapping\Driver\AnnotationDriver #456
Comments
Provide us with a stack trace |
|
This part looks suspicious. If you run |
when i run your command i get: PHP Fatal error: Uncaught Error: Interface "Doctrine\Persistence\Mapping\Driver\MappingDriver" not found in /code/letsraid/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/CompatibilityAnnotationDriver.php:14 |
the closure is from my projects autoloader: spl_autoload_register(function($class) {...}); |
If you install a fresh ubuntu2204 and use the composer.json i have shown, everybody would get the same error i think. |
hm, i found the "problem".. I throw an Exception if my autoloader does not find a class. If i don't throw an Exception in my autoloader, the failure mentioned does not occur. |
throwing when you don't find a class will break |
Hello,
i upgraded to ubuntu 22.04 LTS with php 8.1.
Then i upgraded doctrine/orm to 2.13.*
I got the error: unknown class Doctrine\Common\Cache\ArrayCache
Then i updated my doctrine cli config as mentioned here:
https://www.doctrine-project.org/projects/doctrine-orm/en/2.13/reference/configuration.html
I got the error: unknown class: Symfony\Component\Cache\Adapter\ArrayAdapter
Then i followed the instruction here
https://github.com/doctrine/orm/blob/2.9.x/UPGRADE.md
and installed symfony/cache
i got the error: unknown class: Doctrine\Common\Annotations\AnnotationReader
Then i installed doctrine/annotations
i got the error: unknown class: Doctrine\Persistence\Mapping\Driver\AnnotationDriver
What to do now?
My composer.json looks like this:
"require" : { "doctrine/orm" : "2.13.*", "symfony/cache": "^6.1", "doctrine/annotations": "^1.13" }
The text was updated successfully, but these errors were encountered: