This repository features a docker environment to provide isolated PHP environment for development and testing purposes.
- Make sure Docker is installed on you machine.
- Start the docker service:
docker-compose up -d laravel-once
- Install the dependencies:
docker-compose exec laravel-once composer install
Now you can use the container to:
- Run the tests:
> docker-compose exec laravel-once composer run-script test
- Validate the code-style
> docker-compose exec laravel-once composer run-script cs
# In order to fix the issue automatically:
> docker-compose exec laravel-once composer run-script cbf
The hooks ensure that you commit meets the minimum required quality, before pushing the changes to the remote repository.
In order to use the hooks, either copy the pre-commit
file to your .git/hooks/
directory, or reconfigure the repository:
> git config --local core.hooksPath .githooks/
If your local environment is not setup properly for PHP, you can use the docker container to issue git commands:
> docker-compose exec laravel-once git commit