Can the yml file paths be combined with annotations in symfony?

0

I am working on a project that has been started, and at the time it was started it was advised and a configuration file .yml was used for the routes, however nowadays it is easier, using the annotations

My question is if there is any way to combine the two types of routes, since working with files .yml is quite tedious, in addition the project will be migrated to the new annotations system so it does not make sense to add more routes to the configuration file ...

I have tried it and the following error has occurred:

  

Whoops, looks like something went wrong.   [Syntax Error] Expected Doctrine \ Common \ Annotations \ DocLexer :: T_CLOSE_PARENTHESIS, got 'name' at position 122 in method AppBundle \ Controller \ Clients \ ControlLog: lowServices () in / vagrant / www / intranet / src / AppBundle / Controller / (which is being imported from "/vagrant/www/intranet/app/config/routing.yml"). Make sure annotations are enabled.

    
asked by Pavlo B. 13.03.2018 в 17:13
source

1 answer

0

If you can work with both of them, check that you have installed and activated the SensioFrameworkExtraBundle first of all, this is responsible for giving the flexibility of the annotations.

Check this official document where it explains how to import the files in different formats:

link

(I've put this version because you never say which one you use.)

Remember that you can get over writing routes if you're not careful.

regards,

    
answered by 17.04.2018 / 13:05
source