@@ -340,7 +340,7 @@ class %s extends {$options['class']}
340
340
341
341
use Symfony\Component\DependencyInjection\Dumper\Preloader;
342
342
343
- if (in_array(PHP_SAPI, ['cli', 'phpdbg'], true)) {
343
+ if (in_array(PHP_SAPI, ['cli', 'phpdbg', 'embed' ], true)) {
344
344
return;
345
345
}
346
346
@@ -388,6 +388,7 @@ class %s extends {$options['class']}
388
388
'container.build_hash' => ' $ hash',
389
389
'container.build_id' => ' $ id',
390
390
'container.build_time' => $ time,
391
+ 'container.runtime_mode' => \\in_array(\\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true) ? 'web=0' : 'web=1',
391
392
], __DIR__.\\DIRECTORY_SEPARATOR.'Container {$ hash }');
392
393
393
394
EOF ;
@@ -1591,7 +1592,7 @@ private function addDefaultParametersMethod(): string
1591
1592
$ export = $ this ->exportParameters ([$ value ], '' , 12 , $ hasEnum );
1592
1593
$ export = explode ('0 => ' , substr (rtrim ($ export , " ] \n" ), 2 , -1 ), 2 );
1593
1594
1594
- if ($ hasEnum || preg_match ("/ \\\$container->(?:getEnv\('(?:[-.\w \\\\]*+:)*+\w+ +'\)|targetDir\.'')/ " , $ export [1 ])) {
1595
+ if ($ hasEnum || preg_match ("/ \\\$container->(?:getEnv\('(?:[-.\w \\\\]*+:)*+\w* +'\)|targetDir\.'')/ " , $ export [1 ])) {
1595
1596
$ dynamicPhp [$ key ] = sprintf ('%s%s => %s, ' , $ export [0 ], $ this ->export ($ key ), $ export [1 ]);
1596
1597
$ this ->dynamicParameters [$ key ] = true ;
1597
1598
} else {
0 commit comments