8000 @Route and @Method in version 3.4 · Issue #10142 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

@Route and @Method in version 3.4 #10142

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

Closed
nzurita opened this issue Aug 2, 2018 · 4 comments
Closed

@Route and @Method in version 3.4 #10142

nzurita opened this issue Aug 2, 2018 · 4 comments
Labels
hasPR A Pull Request has already been submitted for this issue.

Comments

@nzurita
Copy link
nzurita commented Aug 2, 2018

Hello, working on a project with symfony 3.4 that uses @Route and @Method annotations I receive these warnings:

User Deprecated: The "Sensio\Bundle\FrameworkExtraBundle\Configuration\Route" annotation is deprecated since version 5.2. Use "Symfony\Component\Routing\Annotation\Route" instead.
User Deprecated: The "Sensio\Bundle\FrameworkExtraBundle\Configuration\Method" annotation is deprecated since version 5.2. Use "Symfony\Component\Routing\Annotation\Route" instead.

Changing those lines as the message states works ok for the @Route annotation, but not for the @Method one, which throws an exception "Annotation does not exist".

Searching the docs I find this page @Route and @Method which omits version 3.4 in version selector (but shows 5.0). So, @Method annotation has dissapeared in this version? Is there another way to specify request method then?

Is this an omission in the docs or a bug (wrong deprecation message)?

Thank you

@xabbuh
Copy link
Member
xabbuh commented Aug 3, 2018

I think we shouldn't show the @Route annotation from SensioFrameworkExtraBundle anymore (see #10150).

@nzurita
Copy link
Author
nzurita commented Aug 6, 2018

What about @Method? Did it disappear?

@xabbuh
Copy link
Member
xabbuh commented Aug 6, 2018

It is still there, but it was deprecated in version 5.2 of the FrameworkExtraBundle. But using the @Route annotation from the Routing component you just make use of its methods option which is there to achieve the same.

@javiereguiluz javiereguiluz added the hasPR A Pull Request has already been submitted for this issue. label Aug 7, 2018
@javiereguiluz
Copy link
Member

I agree this is confusing. We're trying to fix it here: sensiolabs/SensioFrameworkExtraBundle#585

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hasPR A Pull Request has already been submitted for this issue.
Projects
None yet
Development

No branches or pull requests

3 participants
0