-
Notifications
You must be signed in to change notification settings - Fork 236
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
Referencing self:: constants in annotations #269
Comments
I think this most likely will have to wait for Annotations 2.0. Unfortunately the timeline for 2.0 is not solidified. |
With @Majkl578 no longer working on 2.0, I don't think waiting for 2.0 to add new non BC breaking features makes sense. I don't mind doing the work, I just need a nudge in the right direction, if there is one. If not, I can add this feature the ugly way and it can be re-implemented properly in 2.0. |
@alcaeus it looks like you took over the project, can you please weigh in on this issue? |
+1 : this modification would be really great! The "static::" keyword too. |
ex: @annotation(self::VALUE) Fixes doctrine#269
ex: @annotation(self::VALUE) Fixes doctrine#269
ex: @annotation(self::VALUE) Fixes doctrine#269
ex: @annotation(self::VALUE) Fixes doctrine#269
ex: @annotation(self::VALUE) Fixes doctrine#269
ex: @annotation(self::VALUE) Fixes doctrine#269
ex: @annotation(self::VALUE) Fixes doctrine#269
ex: @annotation(self::VALUE) Fixes doctrine#269
This has been released in 1.11.0, right? |
At the moment constant parsing doesn't read
self::
constants and I have a use case where that would be the most practical solution:I would like to pass serialization groups for a property that's defined in a trait. Since not all entities will have the same serialization groups for the properties in the traits, the only currently available options that I see is to either repeat the property definition in each entity or repeat the groups serialization definition for each property and each entity in yaml/xml.
I would have created a PR instead of an issue for this, but from what I see in the DocParser class, the only way to get the original class name would be to parse the context string, which seems like a bad idea. I'm hoping that someone more familiar with the codebase could do it in a cleaner way. If there isn't a better way, please let me know and I'll make a PR.
The text was updated successfully, but these errors were encountered: