You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?phpnamespaceVendor\BackendBundle\Action\Dashboard;
useJMS\DiExtraBundle\AnnotationasDI;
useSensio\Bundle\FrameworkExtraBundle\Configuration\Route;
useVendor\BackendBundle\Action\Traits\ResponseTrait;
useVendor\BackendBundle\Action\Traits\TwigAwareTrait;
/** * Class Index * * @package Vendor\BackendBundle\Action\Dashboard * @DI\Service(autowire=true) */class Index
{
use ResponseTrait;
use TwigAwareTrait;
/** * @Route("/") */publicfunction__invoke()
{
return$this->createResponse(
$this->render('@VendorBackend/Dashboard/index.html.twig')
);
}
}
This now gets correctly parsed and resolved within the SF2 Container. So I get the following debug:route output:
[~/path/to/project]$ php app/console debug:route | grep index [sf2]
_configurator_step ANY ANY ANY /_configurator/step/{index}
vendor_backend_action_dashboard_index__invoke ANY ANY ANY /
And it also gets correctly created within the appDevDebugProjectContainerUrlGenerator:
But when I now try to autocomplete it it will try to complete it to vendor_backend_action_dashboard_index___invoke - Note the third _ between 'index' and 'invoke'.
As the autocomplete uses the same data as the invalid route intention/check it will also tell me it's an undefined route if I only write it with two underscores. But if I would use the suggestion of the plugin it will error out on calling the application for not knowing such a route.
So my guess would be somehow the __ gets somewhere translated to ___ within the parser...
The text was updated successfully, but these errors were encountered:
Blackskyliner
changed the title
Incorrect resolving of Routes with too many underlines.
Incorrect resolving of Routes with too many underscores.
Mar 8, 2017
I migrated a project to Actions, instead of Controllers. (https://github.com/dunglas/DunglasActionBundle)
I now have for example the following Action:
This now gets correctly parsed and resolved within the SF2 Container. So I get the following
debug:route
output:And it also gets correctly created within the appDevDebugProjectContainerUrlGenerator:
But when I now try to autocomplete it it will try to complete it to
vendor_backend_action_dashboard_index___invoke
- Note the third_
between 'index' and 'invoke'.As the autocomplete uses the same data as the invalid route intention/check it will also tell me it's an undefined route if I only write it with two underscores. But if I would use the suggestion of the plugin it will error out on calling the application for not knowing such a route.
So my guess would be somehow the
__
gets somewhere translated to___
within the parser...The text was updated successfully, but these errors were encountered: