danbettles/php-project-template

v2.0.0 2024-11-03 09:45 UTC

This package is auto-updated.

Last update: 2025-05-01 00:13:06 UTC


README

A most basic PHP project template with PHPUnit, PHPStan, and PHP_CodeSniffer ready to roll. The project will be ISC-licensed by default.

Additionally, the following Composer scripts are included to help you quickly get going.

  • composer app:dev:test: runs the PHPUnit unit tests
  • composer app:dev:analyse: runs PHPStan at level 11
  • composer app:dev:lint: runs PHP_CodeSniffer
  • composer app:dev:check-quality: runs the PHPUnit unit tests, PHPStan, and then PHP_CodeSniffer

Instructions

Run composer create-project danbettles/php-project-template <path> — substituting <path> with the pathname of the directory you'd like created — and then:

  • Replace "php-project-template" with the name of your Git repository
  • Replace "PHP Project Template" with the name of your project
  • Except in phpcs.xml, replace "DanBettles" with your vendor namespace
  • Replace "PhpProjectTemplate" with the namespace of your app
  • In composer.json, update the type of the package — if need be
  • Update the year and name in LICENSE
  • Rewrite this file
  • Run composer update
  • Start building from tests/SomethingTest.php and src/Something.php