In Parsoid/JS, all of the npm modules only include JS code and there are no binary dependencies. This let us pre-install these modules and check them into git in the mediawiki/services/parsoid/deploy repository. So, deployment to ruthenium, beta cluster, or production was a matter of simply deploying this repository without any deployment-time npm install involved.
We should figure out how feasible this approach is for Parsoid/PHP and/or what is the deployment practice for PHP code wrt composer modules.
This has a bearing on QA and testing on ruthenium (see T213493: Install PHP7 on scandium) so it would be useful to think about this and resolve this sooner than later.