[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
No known key found for this signature in database
GPG key ID: 50E0D2423696F995
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:
- ~ - ~
- ~ - ~
- ~ - ~
- ~
- [] - []