You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will generate the autoload_runtime.php with 1 extra line
$runtime = $_SERVER['APP_RUNTIME'] ?? $_ENV['APP_RUNTIME'] ?? 'Symfony\\Component\\Runtime\\SymfonyRuntime';
$runtime = new$runtime(($_SERVER['APP_RUNTIME_OPTIONS'] ?? $_ENV['APP_RUNTIME_OPTIONS'] ?? []) + [
'use_putenv' => true, // <<<=== THIS LINE IS ADDED'project_dir' => dirname(__DIR__, 1),
]);
But I think the part of the file is not loaded because $_SERVER['SCRIPT_FILENAME'] is empty (please confirm this)
if (true === (require_once__DIR__.'/autoload.php') || empty($_SERVER['SCRIPT_FILENAME'])) {
return;
}
And in HandlerResolver the BrefRuntime is created without the use_putenv option:
// Use the Symfony Runtime component to resolve the closure and get the PSR-11 container$options = $_SERVER['APP_RUNTIME_OPTIONS'] ?? [];
if ($projectDir) {
$options['project_dir'] = $projectDir;
}
$runtime = newBrefRuntime($options);
The workaround is to use the other way of setting options, in public/index.php:
Im testing the new BrefRuntime package and I noticed something. Im still figuring out how exactly it works, but this is the scenario:
I have a runtime option set in composer.json 'extra.runtime.options'
This will generate the autoload_runtime.php with 1 extra line
But I think the part of the file is not loaded because
$_SERVER['SCRIPT_FILENAME']
is empty (please confirm this)And in
HandlerResolver
the BrefRuntime is created without theuse_putenv
option:The workaround is to use the other way of setting options, in
public/index.php
:Not sure if this is a feature this bridge would like to support, but if not, a warning message in the docs would be nice :)
The text was updated successfully, but these errors were encountered: