-
Notifications
You must be signed in to change notification settings - Fork 99
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
Is it intended BC break in unreleased version? Parameter annotations from method no more auto-bounded to parameters #708
Comments
… method attributes for resolving parameter annotations
… method attributes for resolving parameter annotations
I think this is an unnecessary BC break for v7. Here's a PR that reintroduces the feature #709 |
… method attributes for resolving parameter annotations
@andrew-demb dropping annotations wasn't a mistake and is the path forward. Is there any reason why someone cannot switch to attributes? There is even a rector that'll do it all for you... https://getrector.com/blog/how-to-upgrade-annotations-to-attributes Aside from that I'm not entirely sure what the issue is here. Isn't this bundle just a wrapper around the Symfony Validator lib? Maybe you can clarify the issue here. I'm not a fan of this parameter targeting when the proper way to "annotate" is to put the attribute with the param, directly. I'm also not a fan of GraphQLite jumping through hoops to accommodate bundles, especially when encouraging incorrect design practices. |
@oojacoboo this library provides a binding for I made a PR just because a stable release of So I try simplifying the upgrade path and minimizing the number of BC breaks for developers that already use |
To be clear , my question was about "target method" parameter annotation, not "doctrine/annotation". Thanks in advance. |
@andrew-demb I'm really not a huge fan of this. But I'll allow it this time. The bundle needs to make clear that this is deprecated and to be removed in 8.0. Can you please add phpdoc deprecation tags to your PR here as well, so it's searchable for deprecation removal? Thanks. |
…ng as a target to the method. Add warning about next major release changes Refs: thecodingmachine/graphqlite#708 (comment)
Agreed; imho |
…ng as a target to the method. Add warning about next major release changes Refs: thecodingmachine/graphqlite#708 (comment)
Here's a PR for |
Thanks to @andrew-demb for the work done! 👍 @oojacoboo , @oprypkhantc I assume nobody here wants to maintain useless code. The reason why @andrew-demb has raised this issue is that he was working on adding support for Symfomy 7 to the graphqlite adapter. I believe the intention of everybody is for good but what I can see here is just some miscommunication and misunderstanding. I don't think @andrew-demb likes to pitch committing deprecated code to repo. So it looks like the whole discussion would be much shorter or even would not exist if there was a clear BC breaking/versioning strategy explained on README/contribution guide. Based on the review of code @andrew-demb, he assumes the server strategy applied, but most likely the adapter versioning is tried to be aligned with symfony versions or so. Let's discuss and develop versioning strategy and it can heavily influence the whole purpose of thecodingmachine/graphqlite-symfony-validator-bridge#75 |
I guess using semver would make lots of developer's lives much easier. So I'd go for for the solution proposed by @andrew-demb in thecodingmachine/graphqlite-symfony-validator-bridge#75 |
@oojacoboo What do you think of setting up an automatic release action using https://github.com/semantic-release/semantic-release? It automatically releases new versions, taking into account types of commits. Fixes and performance commits are patch versions, features are minor versions and anything with a |
@oprypkhantc I think this is a good idea. Releases for GraphQLite are a bit tedious with the website versioning and the release changelog. At the moment, that's all required to be done manually. If you (or someone else) want to set that up, that'd be awesome. We could give it a shot on this release. It sounds like everyone wants to go with 8.0 on this release due to the removal of Doctrine annotations. We'd need to update the README with PR/commit message requirements. |
@oojacoboo what target branch should be used to prepare the Is this branch (aka Or should we push all to the |
@andrew-demb we're pushing to |
@oojacoboo Is the website the only blocker for the release? @andrew-demb Thank you for all the effort in keeping the sublibs up to date! |
PR about reverting BC break for parameter annotations merged - this issue is resolved. |
In the
master
branch there's an unreleased (yet) commit that dropped support for Doctrine annotations - 870b448.This commit also drops [1] a feature about allowing to use "method"-bound annotations (attributes) with explicit "target" (example: [2]).
The question is - is this dropping a feature intended? Are you open to reintroducing it - to simplify an upgrade path?
[1] 870b448#diff-b4cb271cb57cae8e3c9c55d3590bab4ea0781066f699d94ac970f89f8b7e06b4L356-L364
[2] https://github.com/thecodingmachine/graphqlite-symfony-validator-bridge/blob/2f677f6dc5c81660505e6c73952661d4d98f1199/tests/Fixtures/Controllers/UserController.php#L37
If I add this snippet locally, the logic about auto-bound annotations (attributes) from method to parameters will work as before.
The text was updated successfully, but these errors were encountered: