Skeleton for creating small php packages with static analyzing and unit testing
For run all tests
make allor connect to terminal
make execor use built in php server http://localhost:8080
# start server on 8080 port
make serve
# custom port 8081
make serve PORT=8081Dafault php version is 8.2. Use PHP_VERSION= for using custom version.
make all PHP_VERSION=8.0
# run both
make all PHP_VERSION=7.4 && make all PHP_VERSION=8.0all commands
# composer install
make install
# composer install with --no-dev
make install-no-dev
# check code style
make style
# fix code style
make style-fix
# run static analyze tools
make static-analyze
# run unit tests
make unit
# check coverage
make coverageGithub Action .github/workflows/AUTOFIX.yml commit fixes to your repo.
Generate Access Token and add token
to repo Settings/Secrets/Actions secrets with name ACCESS_TOKEN.
Or delete AUTOFIX.yml file.
- Click on Use template button
- Put your code to src/ tests/ directory
- Delete config files for unused CI systems
- Change project data in composer.json, README and Makefile
- Repo with analyze tools: https://github.com/exakat/php-static-analysis-tools
- Repo for gitlab-ci php https://gitlab.com/gitlab-org/gitlab-foss/-/blob/master/lib/gitlab/ci/templates/PHP.gitlab-ci.yml