Repository navigation
Add wp maintenance dependencies update - #95
Open
schlessera wants to merge 2 commits into
Open
schlessera wants to merge 2 commits into
schlessera wants to merge 2 commits into
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 46 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
schlessera
force-pushed
the
dependencies-update
branch
from
November 16, 2026 12:59
2eda64e to
463be56
Compare
Updates the locked packages that `dependencies audit` reports security advisories for, or the ones given with --packages, within the constraints of composer.json. Runs `composer update --no-install` against the files on GitHub, audits the new lock again, and commits it through the Git Data API on top of the commit it was built from. The pull request comes from a branch named after the update, so a security fix and a refresh of the framework never replace each other, and a rerun with the same result only refreshes the pull request. A branch with commits or changes the command did not make is never overwritten. Wildcards are resolved against the lock, as Composer would only update their matches as far as needed. Composer's security blocking is turned off for the update, so that an advisory composer.json does not allow fixing does not hold back the others; the audit afterwards reports it. A lock written by a newer Composer than the local one is not downgraded. Moves the temporary directory and environment handling of the audit into a Composer helper shared by both subcommands, and the confirmation prompt of `release generate` into a Prompt helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
For each advisory that `wp maintenance dependencies update` cannot fix, work out the first version that fixes it from the affected ranges, and ask `composer why-not` what keeps that version out of the lock. Both go into the warnings and into the "Still affected" section of the pull request, so a maintainer knows which constraint in composer.json, or which package, to change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
schlessera
force-pushed
the
dependencies-update
branch
from
November 16, 2026 13:13
463be56 to
572825d
Compare
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.
Stacked on #94.
wp maintenance dependencies updatefixes whatdependencies auditreports, and proposes the new composer.lock as a pull request:Without options, it updates the locked packages that have security advisories.
--packagesupdates others instead, such as--packages=wp-cli/wp-clito move the bundle to the framework's latest commit, or*to refresh the whole lock. Only composer.lock changes. The update runscomposer update --no-install --with-dependencies --minimal-changeswithin the constraints of composer.json, so dependencies move only as far as they have to, and the new lock is audited again. Advisories that composer.json doesn't allow fixing are listed as still affected, and the command exits with an error code for them. For each one, it works out the first fixed version from the advisory's affected ranges and askscomposer why-notwhat keeps that version out. The answer goes into the warning and into the "Still affected" section of the pull request, so it's clear which constraint, or which package, has to change:Like the audit, it works from the files on GitHub, so no clone or git credentials are needed. The new lock is committed through the Git Data API on top of the commit it was built from, and a pull request is opened from a branch named after the update:
update-dependencies-securityby default,update-dependencies-wp-cli-wp-clifor the framework, and so on. A security fix and a framework refresh therefore never replace each other. A later run of the same update replaces its commit and refreshes the pull request. A rerun that would produce the same lock only refreshes the description, so it doesn't restart the checks. A branch that holds anything but the command's own composer.lock commit is never overwritten. Pushing asks first unless--yesis passed.A few Composer details shaped it:
--minimal-changes, Composer updates the packages a wildcard matches only as far as needed. Wildcards are therefore resolved against the lock first, sosymfony/*updates every locked Symfony package, and*makes the same 13 changes as a plaincomposer update.composer self-update.This also moves the audit's temporary directory and environment handling into a
Composerhelper shared by both subcommands, and the y/n prompt ofrelease generateintoPrompt::confirm(), without changing either.I checked this with
--dry-runagainst the live bundle and nothing was pushed, so the first real run will open the pull request that fixes the failing audit. The write path, from the first run through reruns to refusing a branch someone else pushed to, is covered by tests against the fake GitHub API.