1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-26 03:22:37 +02:00

[ticket/17289] Fix dependency injection error when using development environment

PHPBB3-17289
This commit is contained in:
Ruben Calvo
2024-02-11 21:20:00 +01:00
committed by Marc Alexander
parent aa3f253030
commit 3c75fedffe
5 changed files with 10 additions and 2 deletions

View File

@@ -26,7 +26,11 @@ use phpbb\filesystem\helper as filesystem_helper;
*/ */
class core extends Extension class core extends Extension
{ {
const TWIG_OPTIONS_POSITION = 7; /**
* Index of array in service template.twig.environment inside services_twig.yml
* @var int
*/
const TWIG_OPTIONS_POSITION = 8;
/** /**
* Config path * Config path
@@ -86,7 +90,7 @@ class core extends Extension
$twig_environment_options['auto_reload'] = true; $twig_environment_options['auto_reload'] = true;
} }
// Replace the 7th argument, the options passed to the environment // Replace the 8th argument, the options passed to the environment
$definition->replaceArgument(static::TWIG_OPTIONS_POSITION, $twig_environment_options); $definition->replaceArgument(static::TWIG_OPTIONS_POSITION, $twig_environment_options);
if ($config['twig']['enable_debug_extension']) if ($config['twig']['enable_debug_extension'])

View File

@@ -37,4 +37,5 @@ services:
- ~ - ~
- ~ - ~
- ~ - ~
- ~
- [] - []

View File

@@ -34,4 +34,5 @@ services:
- ~ - ~
- ~ - ~
- ~ - ~
- ~
- [] - []

View File

@@ -34,4 +34,5 @@ services:
- ~ - ~
- ~ - ~
- ~ - ~
- ~
- [] - []

View File

@@ -26,4 +26,5 @@ services:
- ~ - ~
- ~ - ~
- ~ - ~
- ~
- [] - []