Missing annotations with the latest Composer version #5378

Closed
opened 2026-01-22 15:05:56 +01:00 by admin · 2 comments
Owner

Originally created by @pascalporedda on GitHub (Jan 4, 2017).

Originally assigned to: @lcobucci on GitHub.

Hey there,

since the latest Composer version (1.3) we have experienced some strange issues with our Symfony projects. Since then the composer ClassLoader is not able to find the Doctrine Annotations if we prefixed the use statement with a backslash eg.:

use \Doctrine\ORM\Mapping as ORM;

Composer does not trim the first backslash with the latest version anymore. I had posted this issue in the composer repository here: https://github.com/composer/composer/issues/6038

According to one of the members of the repository this isn't an issue with composer itself but with the way doctrine handles its annotations. I would appreciate an answer on how to get along with this issue.

If you need further information, I will try to give you as much insight as I can.

Originally created by @pascalporedda on GitHub (Jan 4, 2017). Originally assigned to: @lcobucci on GitHub. Hey there, since the latest Composer version (1.3) we have experienced some strange issues with our Symfony projects. Since then the composer ClassLoader is not able to find the Doctrine Annotations if we prefixed the use statement with a backslash eg.: `use \Doctrine\ORM\Mapping as ORM;` Composer does not trim the first backslash with the latest version anymore. I had posted this issue in the composer repository here: https://github.com/composer/composer/issues/6038 According to one of the members of the repository this isn't an issue with composer itself but with the way doctrine handles its annotations. I would appreciate an answer on how to get along with this issue. If you need further information, I will try to give you as much insight as I can.
admin added the Invalid label 2026-01-22 15:05:56 +01:00
admin closed this issue 2026-01-22 15:05:56 +01:00
Author
Owner

@lcobucci commented on GitHub (Jan 4, 2017):

@CracyCrazz this seems to actually be related to doctrine/annotations.

Would you be willing to open a PR with a test that replicates this behaviour? You can find examples here

@lcobucci commented on GitHub (Jan 4, 2017): @CracyCrazz this seems to actually be related to [doctrine/annotations](https://github.com/doctrine/annotations). Would you be willing to open a PR with a test that replicates this behaviour? You can find examples [here](https://github.com/doctrine/annotations/tree/b544ea1f2f2e1af294dbd516d4ddecd3db3d7e33/tests/Doctrine/Tests/Common/Annotations/Ticket)
Author
Owner

@lcobucci commented on GitHub (Jan 4, 2017):

Closing as invalid since its not related to the ORM.

@lcobucci commented on GitHub (Jan 4, 2017): Closing as `invalid` since its not related to the ORM.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#5378