ingenioz-it / php-skeleton
A clean new PHP project
Installs: 26
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 1
Forks: 0
Open Issues: 0
Language:Dockerfile
Type:project
Requires
- php: >=8.2
Requires (Dev)
README
Bored of manually setting up your PHP projects ?
This is the solution !
Table of contents
Description
This is a skeleton for PHP projects that focus on code quality.
It contains pretty much everything you need to start a new project :
- Code quality
- A working unit test (using PHPUnit) to bootstrap your coding experience
- Static analyis tools (phpcs, phpstan, psalm, phpmd and phan) to enforce the quality of your code
- A mutation testing framework (Infection) to enforce the quality of your tests
- An automated refactoring tool (Rector) to help you keep your code up to date
- Composer scripts to easily use all the above
- Infrastructure
- Docker support
- A Makefile to manage docker commands with ease
- GitHub workflows to automatically run the tests and quality tools on every push and pull request
- It also uploads a code coverage report to CodeCov
- Docker support
Installation
To create a new project based on this skeleton, run the following command:
composer create-project ingenioz-it/php-skeleton {PROJECT_NAME}
Requirements
PHP 8.4+ or Docker.
Getting started
0. (if you are using docker)
Create the Docker container and start a shell inside it:
make cli
1. Install the dependencies
composer install
2. Run the tests
make test
3. Time to code
The previous steps went well ?
You are now ready to start coding !
Scripts
The project comes with a few useful scripts to help you manage docker and run the various quality scripts.
You can list them by running
make help
Customize your app
Make the project truly yours by doing the following:
- Update the
composer.json
with your project's information - Update the
README.md
file to describe your project - Update the
LICENSE
file with your favorite license