Skip to content

Drop dev dependencies that arrive transitively#43

Merged
GaryJones merged 1 commit into
mainfrom
GaryJones/slim-dev-deps
Jun 11, 2026
Merged

Drop dev dependencies that arrive transitively#43
GaryJones merged 1 commit into
mainfrom
GaryJones/slim-dev-deps

Conversation

@GaryJones

Copy link
Copy Markdown
Owner

Three development dependencies were declared directly while other packages already pull them in, so the boilerplate was telling consumers to require things they get for free.

roave/security-advisories blocked installing known-vulnerable versions at composer time. Composer's own composer audit, which the CI lint job runs, now covers that ground, so the metapackage is redundant. dealerdirect/phpcodesniffer-composer-installer is a dependency of the sniff tooling itself (via phpcsstandards/phpcsutils); only its allow-plugins entry needs to stay, since Composer must still be told the plugin may run. squizlabs/php_codesniffer is required by WPCS, VIPCS and PHPCompatibility, which between them resolve the most compatible version — here, 3.13.5 — without our help.

I checked the rest of the dev block while I was at it. brain/monkey and yoast/phpunit-polyfills are both root-only: nothing else pulls them, and the test suite needs them (Brain Monkey is imported in the base test case, the polyfills are required by the WordPress core integration framework). mockery is pulled in by Brain Monkey, but the base test case imports MockeryPHPUnitIntegration directly, so it stays declared on the principle that you require what you import. That is the line: libraries the code imports are declared, tools whose version is dictated by a parent package are not.

Verified with the full suite — coding standards, unit tests, PHPStan, lint, normalisation, Infection at 100% MSI, and a clean composer audit.

Three require-dev entries duplicated what other packages already provide.
roave/security-advisories is now redundant with composer audit, which CI
runs; dealerdirect/phpcodesniffer-composer-installer arrives via the sniff
packages (phpcsutils), so only its allow-plugins entry need remain; and
squizlabs/php_codesniffer is pulled by WPCS and VIPCS, which resolve the
most compatible version themselves. brain/monkey, mockery and the
polyfills stay, since the test suite imports or requires them directly.
@GaryJones GaryJones merged commit a56e8c1 into main Jun 11, 2026
3 checks passed
@GaryJones GaryJones deleted the GaryJones/slim-dev-deps branch June 11, 2026 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant