Composer is the foundation of every Magento 2 project, yet most deployment workflows treat it as an afterthought. Here's how to do it right — from local development to production deployment. Always commit composer.lock This is non-negotiable. The lockfile pins every dependency to an exact version, including transitive dependencies. Without it: composer install on your CI server might install d