Skip to content

Commit b3690c8

Browse files
committed
minor #15319 [Runtime] Composer node extra.runtime.options is incorrect (kieljohn)
This PR was merged into the 5.3-dev branch. Discussion ---------- [Runtime] Composer node `extra.runtime.options` is incorrect Wanted to make a change to the `dotenv_path` so set `composer.json` (as per previous docs) to: ``` "runtime": { "options": { "dotenv_path": "environments/.env" } } ``` resulted in `autoload_runtime.php` of: ``` $runtime = new $runtime(($_SERVER['APP_RUNTIME_OPTIONS'] ?? []) + [ 'options' => array ( 'dotenv_path' => 'environments/.env', ), 'project_dir' => dirname(__DIR__, 1), ]); ``` Which obviously didn't work so I propose the options node is removed from the docs and then `composer.json`: ``` "runtime": { "dotenv_path": "environments/.env" } ``` resulted in `autoload_runtime.php` ``` $runtime = new $runtime(($_SERVER['APP_RUNTIME_OPTIONS'] ?? []) + [ 'dotenv_path' => 'environments/.env', 'project_dir' => dirname(__DIR__, 1), ]); ``` Worked for me. Commits ------- ffef3e6 Options node doesn't do anything
2 parents a32b784 + ffef3e6 commit b3690c8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

components/runtime.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,7 @@ You can also configure ``extra.runtime.options`` in ``composer.json``:
316316
},
317317
"extra": {
318318
"runtime": {
319-
"options": {
320-
"project_dir": "/var/task"
321-
}
319+
"project_dir": "/var/task"
322320
}
323321
}
324322
}

0 commit comments

Comments
 (0)