Skip to content
ferkesh.HOSTING

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.

Reviewed lock: Resolved package versions; Actual platform: PHP and extensions; Release decision: Smoke test or rebuild.

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.

Official references

Last reviewed .

Was this helpful?

Thanks for your feedback!

Still Need Help?

The support team is here around the clock for anything you can't find in the knowledge base.