Skip to content

Comments

fix: use @psalm-template annotation to avoid clashes#345

Closed
redjam13 wants to merge 1 commit intodoctrine:1.8.xfrom
redjam13:fix/template-annotations
Closed

fix: use @psalm-template annotation to avoid clashes#345
redjam13 wants to merge 1 commit intodoctrine:1.8.xfrom
redjam13:fix/template-annotations

Conversation

@redjam13
Copy link

[Semantical Error] The annotation "@template" in method Doctrine\Common\Collections\ArrayCollection::contains() was never imported. Did you maybe forget to add a "use" statement for this annotation?

This is an issue since 1.7.3...1.8.0.

See #186. History repeating itself I think 🙂

@derrabus
Copy link
Member

Shouldn't this be fixed by doctrine/annotations#298? What version of Doctrine Annotations are you using?

@redjam13
Copy link
Author

Thanks @derrabus. Yes, so it seems doctrine/collections: 1.8.0 is a break if using doctrine/annotations < 1.10.0.

The project I am working on was maybe pegged at doctrine/annotations: 1.8 perhaps due to the note on https://github.com/doctrine/annotations/releases/tag/1.9.0

Either way - we have inconsistent use of @template and @pslam-template here 🤷🏻‍♂️

@derrabus
Copy link
Member

Right, but I'd rather move forward and use the non-prefixed @template everywhere because that annotation has broad tooling support nowadays.

@greg0ire
Copy link
Member

Agree, this is a bug in doctrine/annotations, and versions below 1.13.x are no longer supported. Consider upgrading.

@greg0ire greg0ire closed this Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants