Background
At this moment there is no a formal way to have/create a local development environment to use while working on MP PHP client library code so that we can run some tasks locally like tests or updating dependencies before pushing any change to the repository.
For example, at this moment each one of us has his own local environment and, every time we want to run something in a production-like environment, we have to execute those commands running a bash session over the buster-php74 image hosted at the wikimedia docker registry. For example, to update dependencies we need to do the following:
docker run -it -v .:/work docker-registry.wikimedia.org/dev/buster-php74:1.0.0-s2 /bin/bash cd /work rm -r vendor rm composer.lock composer install
and something similar to run locally the tests.
Goal
The current task aims to create a local development environment in order to provide a formal way to establish a production-like environment in our local laptop.
Acceptance Criteria
- The environment is created and tested
- Documentation about how to work on MP using this environment has been added to MP's wikitech site
Notes
fresh seems to be an interesting starting point. It's a docker container that contains all necessary tools/frameworks/libraries you need to work on any project that involves npm usage in a secure way. It seems reasonable to do something similar but for PHP/composer projects.