Repository navigation
Conversation
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
make:site updatecopied the archive'smanager/directory without honoringEVO_MANAGER_PATH. On installations with a renamed Manager, the core was updated while the active Manager remained outdated and a secondmanager/directory appeared. In particular, the new core CSRF middleware rejected submissions from the old system settings form because it did not contain_token.The command also unconditionally set
COMPOSER_HOMEtocore/composer. This prevented Composer from finding existing global authentication, such as~/.config/composer/auth.json, causing private dependency updates to fail with HTTP 401.Target Branch
This PR was prepared directly from the current
3.6.xbranch and targets3.6.x.Changes
manager/tree to the activeEVO_MANAGER_PATHinstead of always copying it to the default directory. All other archive paths retain their original layout.moveFiles(), preserving compatibility with existing two-argument calls.includes/config.inc.php,.htaccess, and.user.inifiles. Do not delete additional local files. Reject a missing configured Manager directory before replacing site files, and report file transfer failures instead of silently skipping them.COMPOSER_HOMEandCOMPOSER_AUTH. When no site-local auth file is present, retain Composer's normal global/XDG authentication lookup.core/composer/auth.json. Retain a site-local home fallback for headless environments withoutHOMEor WindowsAPPDATA, including when inline authentication is supplied. The updater does not read or copy credential contents.Files
core/src/Console/SiteUpdateCommand.phpcore/tests/Unit/Console/SiteUpdateLayoutTest.phpValidation
PHP 8.4.20, Pest 5.3.4: 213 tests passed, 600 assertions:
cd core php8.4 vendor/bin/pest tests/Unit/Console \ tests/Feature/SiteUpdateE2ETest.php \ tests/Feature/InstallerManagerDirTest.php \ tests/Unit/Security/ManagerCsrfMiddlewareTest.php \ tests/Unit/Security/ManagerCsrfCoverageTest.php --compact --colors=nevermanager/; repeated overlays; local configuration preservation; rejection before writes for an invalid Manager path; CSRF form compilation; and global, explicit, legacy, and headless Composer environments.composer analyze -- --no-progress --error-format=json: 0 errors, 0 file errors, PHPStan level 0.php8.4 -lpasses for both changed PHP files.git diff --checkpasses.core/composer.lockin the local test environment required--ignore-platform-req=php: the lockedroave/security-advisoriesrequires a newer PHP patch release than the available 8.4.20. This was only used to bootstrap local tests; the production command and lock file are unchanged. Root PHPStan was installed separately using the standardcomposer install.Scope And Risks
manager/directory created by an earlier updater is not automatically deleted. Removing it remains an explicit operator action after checking the active Manager directory.