Closed W0rma closed 2 years ago
Can this be merged? it creates a lot of deprecation warnings in SF 5.3
+1
Adding support for PHP8 attributes in Route annotations should be quite simple after this PR got merged.
@xabbuh Would you prefer a separate PR for adding attributes support or should I add it to this PR?
please create an additional PR for that
Hello @W0rma ! I made a similar implementation on a fork and if you want to keep the full compatibility of old annotations from <5.2 you need to add this.
Because it's currently managed by SF5, but no longer in SF6. So @Post("/articles", name="post_articles")
will not work on SF6 without this little patch
@Th3Mouk Thank you for the hint regarding compatibility with symfony 6.
My approach is a bit different since I want to enable native PHP 8 attributes afterwards. Nevertheless I now added an additional check which should ensure compatibility with symfony 6.
Thank you @W0rma!
Constructing Route annotations using named arguments was added in symfony 5.2 (https://github.com/symfony/symfony/pull/40266)
Closes https://github.com/FriendsOfSymfony/FOSRestBundle/issues/2311