@@ -340,7 +340,7 @@ class %s extends {$options['class']}
340340
341341use Symfony\Component\DependencyInjection\Dumper\Preloader;
342342
343- if (in_array(PHP_SAPI, ['cli', 'phpdbg'], true)) {
343+ if (in_array(PHP_SAPI, ['cli', 'phpdbg', 'embed' ], true)) {
344344 return;
345345}
346346
@@ -388,6 +388,7 @@ class %s extends {$options['class']}
388388 'container.build_hash' => ' $ hash',
389389 'container.build_id' => ' $ id',
390390 'container.build_time' => $ time,
391+ 'container.runtime_mode' => \\in_array(\\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true) ? 'web=0' : 'web=1',
391392], __DIR__.\\DIRECTORY_SEPARATOR.'Container {$ hash }');
392393
393394EOF ;
@@ -1591,7 +1592,7 @@ private function addDefaultParametersMethod(): string
15911592 $ export = $ this ->exportParameters ([$ value ], '' , 12 , $ hasEnum );
15921593 $ export = explode ('0 => ' , substr (rtrim ($ export , " ] \n" ), 2 , -1 ), 2 );
15931594
1594- if ($ hasEnum || preg_match ("/ \\\$container->(?:getEnv\('(?:[-.\w \\\\]*+:)*+\w+ +'\)|targetDir\.'')/ " , $ export [1 ])) {
1595+ if ($ hasEnum || preg_match ("/ \\\$container->(?:getEnv\('(?:[-.\w \\\\]*+:)*+\w* +'\)|targetDir\.'')/ " , $ export [1 ])) {
15951596 $ dynamicPhp [$ key ] = sprintf ('%s%s => %s, ' , $ export [0 ], $ this ->export ($ key ), $ export [1 ]);
15961597 $ this ->dynamicParameters [$ key ] = true ;
15971598 } else {
0 commit comments