PHP Composer
Notes
Dependency Manager for PHP
Release notes
v2.4.0
· 1y+
Read the Composer 2.4 Release Announcement for more details on the release highlights.
Complete Changelog
- Added bash completions for Composer commands, package names, etc (see how to setup) (#10320)
- Added
bumpcommand to bump requirements to the currently installed version (#10829) - Added
auditcommand to check for known security vulnerabilities in installed packages (#10798, #10898) - Added automatic auditing of security vulnerabilities after
updateis done, can be overridden with--no-audit(#10798, #10898) - Added
--audittoinstallcommand to also do an audit (#10798, #10898) - Added
jsonformat output to thecheck-platform-reqscommand (#10979) - Added GitLab 15+ token refresh support (#10988)
- Added
ralias torequirecommand (#10953) - Added
composer/class-map-generatordependency to replaceComposer\Autoload\ClassMapGeneratorwhich is now deprecated (#10885) - Added
--lockedtodepends/prohibitscommands (#10834) - Added
--strict-psrflag todump-autoloadcommand to fail the process if PSR violations were detected, useful for CI (#10886) - Added
COMPOSER_PREFER_STABLEandCOMPOSER_PREFER_LOWESTenv vars to turn on--prefer-stable/--prefer-lowestonupdateandrequirecommand, useful for CI (#10919) - Added support for temporary update constraints on all packages (now also including non-root dependencies) (#10773)
- Added
--major-onlyflag to theoutdatedcommand to show only packages with major version updates (#10827) - Added sections for direct and transitive deps in
outdatedcommand output (#10779) - Added ability for cache GC to clean up
vcsandrepocaches (#10826) - Added
--gcflag toclear-cacheto only trigger a garbage collection instead of clearing everything (#10826) - Added signal (SIGINT, SIGTERM, SIGHUP) handling to ensure we wait for the child process to exit before Composer exits to avoid dropping output (#10958)
- Added prompt suggesting using
--devwhen requiring packages withdev/testing/static analysiskeywords present (#10960) - Added warning in
require,initandcreate-projectcommands when the latest version of a package cannot be used due to platform requirements (#10896) - Fixed
COMPOSER_NO_DEVso it also works withrequireandremove's--update-no-dev(#10995)