Check Composer Dependencies Against the Deployment PHP Runtime
composer.lock records the resolved dependency versions when present. It does not install a PHP extension or guarantee that the runtime serving requests matches the build machine. Validate the artifact against a representative deployment environment.
Install from the reviewed lock file
On staging or CI with a committed lock file, use your project's reviewed installation flags, for example composer install --no-dev --no-interaction. Keep scripts and allowed plugins within your approved dependency policy. Avoid composer update during release deployment because it can resolve new versions and change the lock file.
Verify the real platform
Under the PHP binary used for this deployment check, run composer check-platform-reqs --no-dev. This checks the real PHP and extensions and ignores a simulated config.platform setting for the validation. If CLI and web are separate, check the effective web runtime too.
Block invalid artifacts
Investigate a failed requirement and fix the intended environment or dependency in a controlled build, instead of suppressing checks. Record the lock file hash, PHP runtime and source revision. Confirm an application-level smoke test on staging, and keep the previous compatible artifact ready for rollback.
Related Ferkesh Knowledge Base guides
Official references
Last reviewed .
Thanks for your feedback!