The development environment is managed with Docker by default.
First, make sure to install Docker Engine.
The docker command must be executable by your normal user.
Clone the repository:
$ git clone git@github.com:flusio/Minz.gitInstall the dependencies:
$ make installA note about the make commands: they might feel magic, but they are not!
They are just shortcuts for common commands.
If you want to know what they do, you can open the Makefile and locates the command that you are interested in.
They are hopefully easily readable by newcomers.
As the environment runs in Docker, you cannot run the php (or the others) directly.
There are few scripts to allow to execute commands in the Docker containers easily:
$ ./docker/bin/php
$ ./docker/bin/composerYou can execute the tests with:
$ make testExecute the tests of a specific file with the FILE= parameter:
$ make test FILE=tests/path/to/file.phpFilter tests with the FILTER= parameter (it takes a function name, or a part of it):
$ make test FILE=tests/path/to/file.php FILTER=testSomePatternThe previous command generates code coverage under the folder coverage/.
To disable code coverage, run the command:
$ make test COVERAGE=Execute the linters with:
$ make lintYou can run a specific linter with:
$ make lint LINTER=phpstan
$ make lint LINTER=rector
$ make lint LINTER=phpcsPull the changes with Git:
$ git pullIf dependencies have been added or updated, install them:
$ make installSometimes, you may also have to pull or rebuild the Docker images:
$ make docker-pull
$ make docker-buildIf you encounter any problem with the Docker containers, you can clean them:
$ make docker-clean