Repository navigation
Conversation
The lock kept only "dev-main", so a restore resolved the branch wherever it stood by then, and treating a commit on one side as equal let that pass without consent. The commit now travels with the pin (dev-main#<commit>), through the lock and the record, and a branch whose commit is not known on both sides counts as a change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The user editor stores any value and the settings merge took it as it was. The manager theme normalises it, but a manager on the front end kept it, and it reached include in the error handler, the updater and extras plugins and the store. Only a locale name now gets into the configuration, which also covers packages that read the setting, and those includes ask for one too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@elcreator Please fix the path-repository regression before merging this and #2558. Unchanged dev path packages are classified as changed. This is a static finding against Conditions: a custom package (or its private dependency) has a dev version, no
After a release replaces the lock and the package needs restoring, Requested correction: preserve the reference used for comparison through both the live-lock and saved-record paths, including private dependencies, separately from the constraint passed to Composer. A path Please add regressions on both branches using Composer-formatted output (ideally generated by
The current SokilAI |
Problem
1. A package on a branch could move without consent. This is the regression reported on #2551 and #2552.
lockPackages()keeps onlyversion, so a site ondev-mainat commit A was pinned as plaindev-main. After a release replaced the lock, Composer resolved the branch wherever it stood by then, andunexpectedChanges()accepted that because a commit on one side only counted as equal.plan()returnedokwith consent off.Reproduced on both branches with real Composer 2.10.2, a real lock and a real record, before changing anything.
2.
manager_languagecould hold a path. The user editor stores any value, andgetUserSettings()merged it as it was.ManagerThemenormalises the setting in the manager only, so a manager on the front end kept the stored value. Several includes read it without askingManagerLanguage::isName(): the error handler, the updater and extras plugins, the store and its installer, and the old web user form. Packages that build a path from the setting read it the same way. Writing the value takes a permission to edit users, and each include has a fixed suffix.Change
Packages
lockPackages()keeps the commit of a git or hg branch, the sources Composer prints a commit for. The pin becomesdev-main#<commit>, throughpreviousVersions()and the record file.updateArguments()needs no change: Composer accepts that form, so the restore comes back at the commit the site ran. An older Composer that ignores the commit resolves the branch and is refused like any other change.AGENTS.mdrecords the rule.Language
Core::getSettings()andgetUserSettings()let only a locale name into the configuration, which also covers packages. A bad per-user value leaves the system language in place; a bad system value reads as English. A deleted locale still passes, asManagerLanguagedocuments.ManagerLanguage::isName()themselves, because the error handler can run before the settings are loaded.Behaviour to expect
Tests
New regression test from the review: a real lock at A, replaced by a release, restored at B without consent is refused, read from the lock and from the record. The same commit passes.
ManagerLanguageSettingTestcovers the settings merge and each include;StoreLanguageTestcovers a path as the store language.All 21 new cases failed on unfixed 3.6.x. On 3.5.x the unfixed behaviour was shown by the Composer reproduction above, not by running these tests.
Real Composer with the fix, on both branches, branch moved to B: the update exits 0, the lock holds A, B's file is not in
vendor, and the record keeps A.Full suite on Linux: 3.5.x 2335 passed, 3.6.x 2521 passed, 9 skipped on each. PHPStan reports no errors.
On a real site, 3.5.x and 3.6.x, each branch installed in phramark's
evo-lattestack: guest and admin pass. With a path stored asmanager_languagefor the site's user, the manager's login, edit, save and logout pass with no fatals, and the front end and manager answer 200. The stored value stays in the table and is ignored.The manager's language page itself was not driven in a browser.
🤖 Generated with Claude Code