These are chat archives for composer/composer

28th
Oct 2018
Alex K
@alex-enchi
Oct 28 2018 14:50
Hi, I have a weird question. Currently I am working with application without composer and because of many reason we can't install one, at least now. Is there any way to bundle composer library, like this https://github.com/wapmorgan/MediaFile with dependencies into one bundle? If so where I can read about it
Thanks
Christian Sciberras
@uuf6429
Oct 28 2018 14:54
@alex-enchi you don't need composer after you get your dependencies... just create a composer.json file with the dependencies you want, run composer install and then use/copy the resulting vendor directory.
Alex K
@alex-enchi
Oct 28 2018 14:56
@uuf6429 do I need to still use autoload.php?
Christian Sciberras
@uuf6429
Oct 28 2018 15:00
Correct
Alex K
@alex-enchi
Oct 28 2018 15:01
Thank you
Christian Sciberras
@uuf6429
Oct 28 2018 15:02
Note that you won't need the composer.json/lock files afterwords, but I would still save them somewhere.
Alex K
@alex-enchi
Oct 28 2018 15:06
I'll definitely keep them under git, my main concern was that it's impossible to have composer installed and ran on target machines, only on local dev environment.
Christian Sciberras
@uuf6429
Oct 28 2018 15:09
The general recommendation is that you do not run composer in production. What we did at my previous company is to have build machines whose environment is identical to production. These machines would create a standalone release package that is tested and then used in production. Nowadays, one could use docker images for the same purpose, I suppose.
Alex K
@alex-enchi
Oct 28 2018 15:13
We're not there yet and dealing with a lot of legacy, but slowly moving forward. Hope it'll work out smoothly.
Thanks for clarification