Description of problem:
A Openshift Online user reported the following:
It appears that pushing to OpenShift completely wipes out the vendors/ folder, and never rebuilds it.
Version-Release number of selected component (if applicable):
How reproducible: Always
Steps to Reproduce:
0. Pre-Check: SSH’d in to live server - saw vendors/ folder was there (from my last manual composer install). Site loads fine with no problems.
1. Added a new dependency locally to composer.json and a created a simple script to test usage of said dependency.
2. Added and committed all changes and pushed to OpenShift
3. Hit testing script to see if the dependency was working. It wasn’t and neither was the rest of the site. Looked at php.log and saw fatal errors because it couldn’t find needed files in vendor/
4. SSH’d into server and saw there was no longer a vendors/ folder in existence.
Actual results: Pushing to OpenShift would delete the vendors/ folder and never rebuild it.
Expected results: Folder should remain intact
Nick, from your description I figured out following:
The customer installed the PHP composer *manually* while being logged into
the SSH console, and he installed all the dependencies while still SSH'd but
Then he made changes to composer.json on his local computer and committed it
and pushed to OpenShift. In result, the directory with the application was
recreated from scratch based on the current contents of the git repository.
So any changes done manually will be lost.
What he needs is to add use_composer marker (.openshift/markers/use_composer)
and everything he'll be responsible for is writing the composer.json in
project main directory, OpenShift will take care for all the dependency retrieval.
Looks like that resolved it for the customer. Although they did mention that it was very slow. Not sure if that's related to gear size or not but still something to keep in mind. Thanks for your help!