-
-
Notifications
You must be signed in to change notification settings - Fork 28
[#1913] Allow to modify Drush PHP runtime configuration #2268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| ; Custom PHP runtime configuration for Drush CLI commands. | ||
| ; | ||
| ; This file is auto-discovered via the PHP_INI_SCAN_DIR environment variable. | ||
| ; Modify the values below to adjust PHP runtime settings for Drush commands. | ||
| ; | ||
| ; @see https://github.com/drevops/vortex/issues/1913 | ||
|
|
||
| ; Increase memory limit for Drush operations (database imports, config sync). | ||
| memory_limit = 512M |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| ; Custom PHP runtime configuration for Drush CLI commands. | ||
| ; | ||
| ; This file is auto-discovered via the PHP_INI_SCAN_DIR environment variable. | ||
| ; Modify the values below to adjust PHP runtime settings for Drush commands. | ||
| ; | ||
| ; @see https://github.com/drevops/vortex/issues/1913 | ||
|
|
||
| ; Increase memory limit for Drush operations (database imports, config sync). | ||
| memory_limit = 512M |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -11,6 +11,12 @@ target_env="${2}" | |||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| pushd "/var/www/html/${site}.${target_env}" >/dev/null || exit 1 | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Allow custom PHP runtime configuration for Drush CLI commands. | ||||||||||||||||||||||||||||||
| # The leading colon appends to the default scan directories. | ||||||||||||||||||||||||||||||
| # @see https://github.com/drevops/vortex/issues/1913 | ||||||||||||||||||||||||||||||
| PHP_INI_SCAN_DIR="${PHP_INI_SCAN_DIR:-}:$(pwd)/drush/php-ini" | ||||||||||||||||||||||||||||||
| export PHP_INI_SCAN_DIR | ||||||||||||||||||||||||||||||
|
Comment on lines
+14
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: cat docs/deployment.mdRepository: drevops/vortex Length of output: 1704 🏁 Script executed: cat -n hooks/library/provision.shRepository: drevops/vortex Length of output: 848 Ensure PHP_INI_SCAN_DIR preserves default scan directories when already set. If PHP_INI_SCAN_DIR is already defined in the environment without a leading colon (possible from Acquia), the current assignment concatenates without a leading colon, causing PHP to skip its default configuration directories. Normalize the value to ensure a leading colon is always present before appending. Suggested fix-# Allow custom PHP runtime configuration for Drush CLI commands.
-# The leading colon appends to the default scan directories.
-# `@see` https://github.com/drevops/vortex/issues/1913
-PHP_INI_SCAN_DIR="${PHP_INI_SCAN_DIR:-}:$(pwd)/drush/php-ini"
-export PHP_INI_SCAN_DIR
+# Allow custom PHP runtime configuration for Drush CLI commands.
+# The leading colon appends to the default scan directories.
+# `@see` https://github.com/drevops/vortex/issues/1913
+ini_scan_dir="${PHP_INI_SCAN_DIR:-}"
+if [ -n "${ini_scan_dir}" ] && [[ "${ini_scan_dir}" != :* ]]; then
+ ini_scan_dir=":${ini_scan_dir}"
+fi
+PHP_INI_SCAN_DIR="${ini_scan_dir:-:}:$(pwd)/drush/php-ini"
+export PHP_INI_SCAN_DIR📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Do not unblock admin account. | ||||||||||||||||||||||||||||||
| export VORTEX_UNBLOCK_ADMIN="${VORTEX_UNBLOCK_ADMIN:-0}" | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure drush.ini is always restored (even on assertion failures).
A failing assertion before restore will leave the file modified and can cascade into later tests.
✅ Suggested fix (try/finally restore)
🤖 Prompt for AI Agents