mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge pull request #2388 from nickvergessen/ticket/12480
[ticket/12480] Only load config/routing.yml from extensions route * nickvergessen/ticket/12480: [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:
commit
56f881953d
3 changed files with 6 additions and 3 deletions
|
@ -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()
|
||||
));
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
controller_noroute:
|
||||
pattern: /donotfindthis
|
||||
defaults: { _controller: foo.controller:handle }
|
Loading…
Add table
Reference in a new issue