fkrzski/php-package-skeleton

A skeleton repository for PHP packages

1.1.0 2025-06-22 07:18 UTC

README

Fkrzski PHP Package Skeleton GitHub branch check runs Packagist Downloads Packagist Version Packagist License

Fkrzski PHP Package Skeleton

This package provides a wonderful PHP Package Skeleton to start building your next PHP package, including:

  • PHP 8.3+ support
  • Pint for code formatting
  • Rector for refactoring
  • PHPStan for static analysis
  • PEST for unit testing
  • PEST plugin for type coverage checks
  • GitHub Actions for CI with conditional checks for less GH Actions minutes usage
  • .gitattributes for ignoring unnecessary files while creating a project or installing via dependencies

Usage

⚡️ Create your package using Composer:

Be careful! Creating repository in this way not create all directories and files, so you need to create them manually after running this command!

composer create-project fkrzski/php-package-skeleton PackageName

Composer scripts

🧹 Keep a modern codebase with Pint:

composer lint

✅ Run refactors using Rector

composer rector

🧪 Run type coverage checks using PEST plugin:

composer test:type-coverage

⚗️ Run static analysis using PHPStan:

composer test:types

✅ Run unit tests with code coverage using PEST

composer test:unit

🚀 Run the entire test suite:

composer test

PHP Package Skeleton was created by Filip Krzyżanowski under the * *MIT license**.