Skip to content

Check Composer dependencies in the test workflow - #133

Merged
shadetheory merged 1 commit into
cursor/declare-used-dependencies-8db1from
cursor/composer-dependency-analyser-ci-8db1
Oct 29, 2026
Merged

shadetheory merged 1 commit into
cursor/declare-used-dependencies-8db1from
cursor/composer-dependency-analyser-ci-8db1

Conversation

@shadetheory

Copy link
Copy Markdown
Owner

Summary

Add shipmonk/composer-dependency-analyser as a dev dependency and run it in the test workflow, in its own step immediately after composer validate.

The test matrix rewrites composer.json to pin Laravel and Testbench for that job. The published composer.json is restored before validation, so the analyser checks this package's own requirements. --no-check-lock is set because the lock file belongs to the matrix install, and this repository does not commit a lock file.

composer-dependency-analyser.php ignores one false positive: orchestra/testbench installs laravel/framework, and that package replaces illuminate/*. The analyser then attributes those classes to laravel/framework and reports the Illuminate requirements as unused. The config ignores that shadow report and the unused report for the Illuminate packages this package requires. It does not ignore anything else.

The config file is export-ignore, like the other development config.

This branch includes the dependency declaration changes from the other pull request.

Test plan

  • vendor/bin/composer-dependency-analyser reports no issues
  • composer validate --strict --no-check-lock
  • vendor/bin/pest
  • The test workflow's "Analyse composer dependencies" step passes
Open in Web Open in Cursor 

Add the analyser as a dev dependency and run it after composer
validate. Ignore only the false positive where laravel/framework
replaces illuminate/*.

Co-authored-by: Jordan Partridge <jordan@partridge.rocks>
@shadetheory
shadetheory merged commit 38a3e34 into cursor/declare-used-dependencies-8db1 Oct 29, 2026
23 checks passed
@shadetheory
shadetheory deleted the cursor/composer-dependency-analyser-ci-8db1 branch October 29, 2026 15: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.

2 participants