This repository serves as a starting point for any PHP project. It configures PHP_Codsniffer, PHPStan and Pest. These tools are accessible via the following commands :
composer style
check style against PSR12 (ignore long lines errors)composer style-fix
automagically fix style error with phpcbfcomposer pest
run pest testscomposer phpstan
run phpstan scancomposer test
check styles, scan for bugs and unittests in one command
A default App
namespace is configured in composer. A can be used in the src/
folder
The goals here is to stay simple as possible to not get in the way of developers customization.
- Clone repository
- Run
composer install
- Configure a vhost to point in
public/
folder. - Start building your app in
src/
folder.
This project only give you a working environment. Chances are that you need to customize the tools included.
The default configuration except for line length is used. You'll need to create a phpcs.xml file a the root of the project and modify the composer.json scripts to use it. See official documentation for more info
Edit the phpunit.xml file a the root of the project. See official documentation
Edit the phpstan.neon file a the root of the project. See official documentation