mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
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:
commit
9eac15707e
3 changed files with 6 additions and 3 deletions
|
@ -46,7 +46,7 @@ class provider
|
||||||
// We hardcode the path to the core config directory
|
// We hardcode the path to the core config directory
|
||||||
// because the finder cannot find it
|
// because the finder cannot find it
|
||||||
$this->routing_files = array_merge($this->routing_files, array('config/routing.yml'), array_keys($finder
|
$this->routing_files = array_merge($this->routing_files, array('config/routing.yml'), array_keys($finder
|
||||||
->directory('config')
|
->directory('/config')
|
||||||
->suffix('routing.yml')
|
->suffix('routing.yml')
|
||||||
->find()
|
->find()
|
||||||
));
|
));
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\Routing\Route;
|
|
||||||
use Symfony\Component\Routing\RouteCollection;
|
|
||||||
use Symfony\Component\Config\FileLocator;
|
use Symfony\Component\Config\FileLocator;
|
||||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
|
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->assertInstanceOf('Symfony\Component\Routing\Route', $routes->get('controller2'));
|
||||||
$this->assertEquals('/foo/bar', $routes->get('controller2')->getPath());
|
$this->assertEquals('/foo/bar', $routes->get('controller2')->getPath());
|
||||||
|
|
||||||
|
$this->assertNull($routes->get('controller_noroute'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_controller_resolver()
|
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