Skip to content

Commit

Permalink
Fixed routing config as per Symfony 5 & fixed routing path in output …
Browse files Browse the repository at this point in the history
…message (#5)

* Fixed routing config as per Symfony 5 & fixed routing path in output message

* Fixed routing config as per Symfony 5 & fixed routing path in output message
  • Loading branch information
dvesh3 authored Jun 21, 2021
1 parent 3990c63 commit 5d24efa
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Command/BaseGenerateBundleCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ protected function updateRouting(Bundle $bundle)
if ('annotation' === $bundle->getConfigurationFormat()) {
$help = sprintf(" <comment>resource: \"@%s/Controller/\"</comment>\n <comment>type: annotation</comment>\n", $bundle->getName());
} else {
$help = sprintf(" <comment>resource: \"@%s/Resources/config/routing.%s\"</comment>\n", $bundle->getName(), $bundle->getConfigurationFormat());
$help = sprintf(" <comment>resource: \"@%s/Resources/config/pimcore/routing.%s\"</comment>\n", $bundle->getName(), $bundle->getConfigurationFormat());
}
$help .= " <comment>prefix: /</comment>\n";

Expand Down
2 changes: 1 addition & 1 deletion src/Generator/BundleGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function generateBundle(Bundle $bundle)
'extension_alias' => $bundle->getExtensionAlias(),
];

$routingFilename = $bundle->getRoutingConfigurationFilename() ?: 'routes.yml';
$routingFilename = $bundle->getRoutingConfigurationFilename() ?: 'routing.yml';
$routingTarget = $dir . '/Resources/config/pimcore/' . $routingFilename;

// create routing file for default annotation
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/skeleton/bundle/routing.php.twig
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $collection = new RouteCollection();
{% block body %}
$collection->add('{{ extension_alias }}_homepage', new Route('/{{ extension_alias }}', array(
'_controller' => '{{ bundle }}:Default:index',
'_controller' => '{{ bundle }}\Controller\DefaultController:indexAction',
)));
{% endblock body %}
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/skeleton/bundle/routing.xml.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

{% block body %}
<route id="{{ extension_alias }}_homepage" path="/{{ extension_alias }}">
<default key="_controller">{{ bundle }}:Default:index</default>
<default key="_controller">{{ bundle }}\Controller\DefaultController:indexAction</default>
</route>
{% endblock body %}
</routes>
2 changes: 1 addition & 1 deletion src/Resources/skeleton/bundle/routing.yml.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{ extension_alias }}_homepage:
path: /{{ extension_alias }}
defaults: { _controller: {{ bundle }}:Default:index }
defaults: { _controller: {{ bundle }}\Controller\DefaultController:indexAction }

0 comments on commit 5d24efa

Please sign in to comment.