Symfony Version: 4.1
I have the following deprecation message when I run my tests with PHPUnit:
The annotation "Sensio \ Bundle \ FrameworkExtraBundle \ Configuration \ Route" is deprecated since version 5.2. Use "Symfony \ Component \ Routing \ Annotation \ Route" instead.
I want to clarify that I put in my framework.yaml:
sensio_framework_extra:
router:
annotations: false
I also want to clarify that I have no use Sensio \ Bundle \ FrameworkExtraBundle \ Configuration \ Route
in my controllers.
I use FOSRestBundle
and I get the impression that the problem comes from there, but I tried to fix the configuration provided in the FOSREST documentation.
Have you had this type of error and / or do you know where I should look?
Actually it's not an error, but deprecation notice. Check for "sensio/framework-extra-bundle" in composer.json, it might be there.
But to remove deprecation message add the following lines to your config.yml file
sensio_framework_extra:
router:
annotations: false
See attached image.
Sensio\Bundle\FrameworkExtraBundle\Configuration\Route
is deprecated.
Use Symfony\Component\Routing\Annotation\Route
The setting does not disable the warning, why would it?
You are still using the annotation, you should be aware. The trigger_error
is unconditional, see: https://github.com/sensiolabs/SensioFrameworkExtraBundle/blob/master/Configuration/Route.php#L16
I would not worry too much about it. FOS REST will catch up.
Remove totaly the framework composer remove sensio/framework-extra-bundle
dont fogret to delete the instance requirement from appKernel.php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With