mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-05 00:07:44 +02:00
Merge pull request #5334 from rubencm/ticket/12630
[ticket/12630] Add debug.url_matcher
This commit is contained in:
@@ -8,6 +8,7 @@ services:
|
||||
- '%core.php_ext%'
|
||||
- '%core.cache_dir%'
|
||||
- '%debug.url_generator%'
|
||||
- '%debug.url_matcher%'
|
||||
|
||||
router.listener:
|
||||
class: Symfony\Component\HttpKernel\EventListener\RouterListener
|
||||
|
@@ -12,6 +12,7 @@ core:
|
||||
memory: true
|
||||
show_errors: true
|
||||
url_generator: true
|
||||
url_matcher: true
|
||||
|
||||
twig:
|
||||
debug: true
|
||||
|
@@ -41,6 +41,7 @@ class container_configuration implements ConfigurationInterface
|
||||
->booleanNode('memory')->defaultValue(false)->end()
|
||||
->booleanNode('show_errors')->defaultValue(false)->end()
|
||||
->booleanNode('url_generator')->defaultValue(false)->end()
|
||||
->booleanNode('url_matcher')->defaultValue(false)->end()
|
||||
->end()
|
||||
->end()
|
||||
->arrayNode('twig')
|
||||
|
@@ -85,17 +85,23 @@ class router implements RouterInterface
|
||||
*/
|
||||
protected $debug_url_generator;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $debug_url_matcher;
|
||||
|
||||
/**
|
||||
* Construct method
|
||||
*
|
||||
* @param ContainerInterface $container DI container
|
||||
* @param resources_locator_interface $resources_locator Resources locator
|
||||
* @param LoaderInterface $loader Resources loader
|
||||
* @param string $php_ext PHP file extension
|
||||
* @param string $cache_dir phpBB cache directory
|
||||
* @param string $debug_url_generator Debug url generator
|
||||
* @param ContainerInterface $container DI container
|
||||
* @param resources_locator_interface $resources_locator Resources locator
|
||||
* @param LoaderInterface $loader Resources loader
|
||||
* @param string $php_ext PHP file extension
|
||||
* @param string $cache_dir phpBB cache directory
|
||||
* @param string $debug_url_generator Debug url generator
|
||||
* @param string $debug_url_matcher Debug url matcher
|
||||
*/
|
||||
public function __construct(ContainerInterface $container, resources_locator_interface $resources_locator, LoaderInterface $loader, $php_ext, $cache_dir, $debug_url_generator)
|
||||
public function __construct(ContainerInterface $container, resources_locator_interface $resources_locator, LoaderInterface $loader, string $php_ext, string $cache_dir, string $debug_url_generator, string $debug_url_matcher)
|
||||
{
|
||||
$this->container = $container;
|
||||
$this->resources_locator = $resources_locator;
|
||||
@@ -104,6 +110,7 @@ class router implements RouterInterface
|
||||
$this->context = new RequestContext();
|
||||
$this->cache_dir = $cache_dir;
|
||||
$this->debug_url_generator = $debug_url_generator;
|
||||
$this->debug_url_matcher = $debug_url_matcher;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -207,7 +214,7 @@ class router implements RouterInterface
|
||||
{
|
||||
try
|
||||
{
|
||||
$cache = new ConfigCache("{$this->cache_dir}url_matcher.{$this->php_ext}", defined('DEBUG'));
|
||||
$cache = new ConfigCache("{$this->cache_dir}url_matcher.{$this->php_ext}", $this->debug_url_matcher);
|
||||
if (!$cache->isFresh())
|
||||
{
|
||||
$dumper = new PhpMatcherDumper($this->get_routes());
|
||||
|
Reference in New Issue
Block a user