Skip to content
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

Our current framework_extra.yaml config is deprecated since Symfony 4.1 #786

Closed
javiereguiluz opened this issue Apr 22, 2018 · 7 comments
Closed
Labels
bug good first issue Ideal for your first contribution! (some Symfony experience may be required)

Comments

@javiereguiluz
Copy link
Member

After upgrading to Symfony 4.1@dev you can see this deprecation:

Enabling the "sensio_framework_extra.router.annotations" configuration is deprecated since version 5.2. Set it to false and use the "Symfony\Component\Routing\Annotation\Route" annotation from Symfony itself.

@javiereguiluz javiereguiluz added bug good first issue Ideal for your first contribution! (some Symfony experience may be required) labels Apr 22, 2018
@ChangePlaces
Copy link

This still occurs when running unit tests in 4.1.1

@wenapi
Copy link

wenapi commented Jul 28, 2018

I have the same problem. I work with Symfony 3.4 and I had this message having made: php bin/console doctrine:fixtures:load

@Maxooo
Copy link

Maxooo commented Aug 3, 2018

@ChangePlaces and @wenapi did you add the configuration to disable the router annotations system? It works well here in 4.1.3

@ChangePlaces
Copy link

I have no idea - but I don't see it now. I didn't do anything with disabling router annotations, but I guess I did something funky. This would have been many commits ago so can't go back to check.

@dimitrilahaye
Copy link

Just to complete your search :) => https://nebojsa.in.rs/symfony-deprecated-route-and-method-annotations/

@dompie
Copy link

dompie commented Nov 30, 2018

For anybody else having the same error: Make sure the namespaces of your tests are correct. Worked for me.

@miqwit
Copy link

miqwit commented Apr 16, 2019

There is a good answer at the bottom of this page as well: https://medium.com/@nebkam/symfony-deprecated-route-and-method-annotations-4d5e1d34556a

Until that pull request gets merged, the fix that worked for me was to create a config/packages/framework_extra.yaml and disable those annotations explicitly:

sensio_framework_extra:
  router:
    annotations: false

If you’re using Symfony 3.4, you can put these settings in app/config/config.yml instead. Thanks Strabek!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Ideal for your first contribution! (some Symfony experience may be required)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants