Skip to content

Check composer.json and composer.lock in CI - #240

Open
shanesmithdev wants to merge 1 commit into
NativePHP:mainfrom
shanesmithdev:chore/composer-checks
Open

shanesmithdev wants to merge 1 commit into
NativePHP:mainfrom
shanesmithdev:chore/composer-checks

Conversation

@shanesmithdev

@shanesmithdev shanesmithdev commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Adds a Composer workflow with two checks:

  • composer validate --strict fails when composer.lock doesn't match composer.json, for example after a hand edit or a bad merge.
  • composer audit --locked fails when a locked package has a known security advisory. Abandoned packages are listed but don't fail it.

They run as separate checks, composer-validate and composer-audit. Once this is merged, composer-validate can be added to the required checks on main so an out-of-sync lock file blocks merging, while advisories stay non-blocking.

Both checks only read composer.json and composer.lock. They install nothing and need no plugin licence credentials, so they work the same for pull requests from forks. The workflow runs on pull requests, on pushes to main, and every Monday, because new advisories are published even when nothing here changes.

Screenshots

  • No visible change

@shanesmithdev
shanesmithdev marked this pull request as ready for review November 30, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant