Merge branch 'develop-ascraeus' into develop

* develop-ascraeus:
  [ticket/12480] Remove unused use statements
  [ticket/12480] Add subfolder/config/routing.yml which should not be found
  [ticket/12480] Only load config/routing.yml from extensions route
This commit is contained in:
Andreas Fischer 2014-05-02 23:04:58 +02:00
commit 9eac15707e
3 changed files with 6 additions and 3 deletions

View file

@ -46,7 +46,7 @@ class provider
// We hardcode the path to the core config directory
// because the finder cannot find it
$this->routing_files = array_merge($this->routing_files, array('config/routing.yml'), array_keys($finder
->directory('config')
->directory('/config')
->suffix('routing.yml')
->find()
));

View file

@ -8,8 +8,6 @@
*/
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
@ -43,6 +41,8 @@ class phpbb_controller_controller_test extends phpbb_test_case
$this->assertInstanceOf('Symfony\Component\Routing\Route', $routes->get('controller2'));
$this->assertEquals('/foo/bar', $routes->get('controller2')->getPath());
$this->assertNull($routes->get('controller_noroute'));
}
public function test_controller_resolver()

View file

@ -0,0 +1,3 @@
controller_noroute:
pattern: /donotfindthis
defaults: { _controller: foo.controller:handle }