diff --git a/src/Symfony/Framework/WebBundle/Listener/ControllerLoader.php b/src/Symfony/Framework/WebBundle/Listener/ControllerLoader.php
index 1d0b38c4fc..34f598eaf7 100644
--- a/src/Symfony/Framework/WebBundle/Listener/ControllerLoader.php
+++ b/src/Symfony/Framework/WebBundle/Listener/ControllerLoader.php
@@ -43,7 +43,7 @@ class ControllerLoader
{
$request = $this->container->getRequestService();
- list($path['_bundle'], $path['_controller'], $path['_action']) = explode(':', $controller);
+ $path['_controller'] = $controller;
$subRequest = $request->duplicate($query, null, $path);
@@ -58,15 +58,15 @@ class ControllerLoader
{
$request = $event->getParameter('request');
- if (!($bundle = $request->path->get('_bundle')) || !($controller = $request->path->get('_controller')) || !($action = $request->path->get('_action'))) {
+ if (!$controller = $request->path->get('_controller')) {
if (null !== $this->logger) {
- $this->logger->err(sprintf('Unable to look for the controller as some mandatory parameters are missing (_bundle: %s, _controller: %s, _action: %s)', isset($bundle) ? var_export($bundle, true) : 'NULL', isset($controller) ? var_export($controller, true) : 'NULL', isset($action) ? var_export($action, true) : 'NULL'));
+ $this->logger->err('Unable to look for the controller as the _controller parameter is missing');
}
return false;
}
- $controller = $this->findController($bundle, $controller, $action);
+ $controller = $this->findController($controller);
$controller[0]->setRequest($request);
$r = new \ReflectionObject($controller[0]);
@@ -80,8 +80,9 @@ class ControllerLoader
/**
* @throws \InvalidArgumentException|\LogicException If controller can't be found
*/
- public function findController($bundle, $controller, $action)
+ public function findController($controller)
{
+ list($bundle, $controller, $action) = explode(':', $controller);
$class = null;
$logs = array();
foreach (array_keys($this->container->getParameter('kernel.bundle_dirs')) as $namespace) {
diff --git a/src/Symfony/Framework/WebBundle/Listener/ExceptionHandler.php b/src/Symfony/Framework/WebBundle/Listener/ExceptionHandler.php
index b993eaa9e8..f9b65a01cb 100644
--- a/src/Symfony/Framework/WebBundle/Listener/ExceptionHandler.php
+++ b/src/Symfony/Framework/WebBundle/Listener/ExceptionHandler.php
@@ -25,19 +25,15 @@ use Symfony\Foundation\LoggerInterface;
class ExceptionHandler
{
protected $container;
- protected $bundle;
protected $controller;
- protected $action;
protected $logger;
- public function __construct(ContainerInterface $container, LoggerInterface $logger = null, $bundle, $controller, $action)
+ public function __construct(ContainerInterface $container, LoggerInterface $logger = null, $controller)
{
$this->container = $container;
$this->logger = $logger;
- $this->bundle = $bundle;
$this->controller = $controller;
- $this->action = $action;
}
public function register()
@@ -58,9 +54,7 @@ class ExceptionHandler
}
$parameters = array(
- '_bundle' => $this->bundle,
'_controller' => $this->controller,
- '_action' => $this->action,
'exception' => $exception,
'originalRequest' => $event->getParameter('request'),
'logs' => $this->container->hasService('zend.logger.writer.debug') ? $this->container->getService('zend.logger.writer.debug')->getLogs() : array(),
diff --git a/src/Symfony/Framework/WebBundle/Listener/RequestParser.php b/src/Symfony/Framework/WebBundle/Listener/RequestParser.php
index 232ef9efd9..c99c731fcc 100644
--- a/src/Symfony/Framework/WebBundle/Listener/RequestParser.php
+++ b/src/Symfony/Framework/WebBundle/Listener/RequestParser.php
@@ -59,7 +59,7 @@ class RequestParser
));
$this->container->setParameter('request.base_path', $request->getBasePath());
- if ($request->path->has('_bundle')) {
+ if ($request->path->has('_controller')) {
return;
}
diff --git a/src/Symfony/Framework/WebBundle/Resources/config/default_routing.xml b/src/Symfony/Framework/WebBundle/Resources/config/default_routing.xml
index fb0ab7fff7..15fab3e736 100644
--- a/src/Symfony/Framework/WebBundle/Resources/config/default_routing.xml
+++ b/src/Symfony/Framework/WebBundle/Resources/config/default_routing.xml
@@ -4,5 +4,5 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.symfony-project.org/schema/routing http://www.symfony-project.org/schema/routing/routing-1.0.xsd">
-
+
diff --git a/src/Symfony/Framework/WebBundle/Resources/skeleton/application/xml/config/routing.xml b/src/Symfony/Framework/WebBundle/Resources/skeleton/application/xml/config/routing.xml
index 48df64b002..82fa39b82c 100644
--- a/src/Symfony/Framework/WebBundle/Resources/skeleton/application/xml/config/routing.xml
+++ b/src/Symfony/Framework/WebBundle/Resources/skeleton/application/xml/config/routing.xml
@@ -5,8 +5,6 @@
xsi:schemaLocation="http://www.symfony-project.org/schema/routing http://www.symfony-project.org/schema/routing/routing-1.0.xsd">
- WebBundle
- Default
- index
+ WebBundle:Default:index
diff --git a/src/Symfony/Framework/WebBundle/Resources/skeleton/application/yaml/config/routing.yml b/src/Symfony/Framework/WebBundle/Resources/skeleton/application/yaml/config/routing.yml
index d46c827660..bd9b11dd27 100644
--- a/src/Symfony/Framework/WebBundle/Resources/skeleton/application/yaml/config/routing.yml
+++ b/src/Symfony/Framework/WebBundle/Resources/skeleton/application/yaml/config/routing.yml
@@ -1,3 +1,3 @@
homepage:
pattern: /
- defaults: { _bundle: WebBundle, _controller: Default, _action: index }
+ defaults: { _controller: WebBundle:Default:index }