Repository navigation
fix(updater): preserve Composer authentication during preflight - #2576
Merged
Seiger merged 1 commit intoNov 9, 2026
Merged
Conversation
Merged
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.
Problem
php artisan make:site update 3.5.xcan stop with HTTP 401 from a private Composer repository even when the site already has valid Composer credentials. The updater unconditionally selectscore/composerasCOMPOSER_HOME, hiding normal global authentication, and checks the extracted core without the installed site'score/auth.json.Target branch
Prepared from
evolution-cms/evolution:3.5.x(4dc56c87a). This fixes authentication in that update path. Related PR #2530 targets3.6.xand preserves home selection; this change also makes project authentication available during the archive preflight.Changes
ComposerEnvironment, keeping Composer's normal explicit, user/XDG or Windows home. Retain the site-local fallback for processes without a user home.core/composer/auth.json, normal global config/auth,core/auth.json, thenCOMPOSER_AUTH. Composer's own config merge replaces credentials per host and preserves the environment override.$_SERVER/$_ENVvalues on success, refusal or exception. Keep credential contents out of malformed-JSON diagnostics.AGENTS.md.Files
core/src/Console/SiteUpdateCommand.phpcore/src/Services/ComposerEnvironment.phpcore/tests/Unit/Services/ComposerEnvironmentTest.phpAGENTS.mdValidation
PHP 8.4.20, Pest 4.7.8: 135 tests passed, 467 assertions, covering
SiteUpdateCommandTest,ComposerEnvironmentTest,UpdatePathConsistencyTest,CliInstallCustomPackagesTestandWebInstallCustomPackagesTest. Focused execution used a bootstrap definingEVO_CORE_PATHandEVO_BASE_PATHfor the isolated checkout.composer analyze -- --no-progress --error-format=raw: PHPStan level 0, no errors.git diff --checkpasses.Installing the existing development dependencies locally required
--ignore-platform-req=php: the lockedroave/security-advisoriesexcludes the available PHP 8.4.20 patch release. This was only test bootstrap; no manifest, lock or vendor change is included.Remaining scope
Production was not updated. Existing credentials must still authorize the requested repository; dependency compatibility checks and consent requirements remain in force. The loopback HTTP smoke was run as a local integration check, outside the implementation diff.