Repository navigation
Make Composer command timeout configurable - #39
Merged
Merged
Conversation
This was referenced Nov 15, 2026
omarlopesino
force-pushed
the
fix/composer-timeout
branch
from
November 17, 2026 09:33
bee0244 to
8d7fd0b
Compare
runCommand() picked Composer commands with a regex over the command line, so a Composer call written another way would silently keep the default timeout. Now runCommand() takes the timeout and the environment, and runComposer(), which every Composer call uses, passes the configured ones. The 2 second limit of the recursive "why" becomes a runComposer() argument.
# Conflicts: # src/UpdaterCommand.php
… the tests Composer exports it when running "composer test", so the updater passed it on to every call and the timeout test could not tell whether the updater was the one setting it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Composer commands currently stop after a hard-coded 300 seconds even when
COMPOSER_PROCESS_TIMEOUTis increased. AddcomposerTimeoutto the YAML configuration and apply it to both Symfony Process and the child Composer environment. The default remains 300 seconds, non-Composer commands retain their existing limit, and explicit shell timeouts still take effect.Add locally runnable PHPUnit coverage for configuration, process limits, and CLI behavior. The functional tests invoke the actual CLI with controlled Composer commands in disposable Git projects; no live Drupal site or hosted CI service is required.
I verified this with PHP 8.4.27, Symfony Console 7.4.23, Symfony Process 7.4.22, Drush 13.8.1, and PHPUnit 11.5.58:
Closes #33.
The initial local test setup also contributes toward #38.