marekmiklusek / package-skeleton
A skeleton for creating new Laravel packages.
v0.1.6
2025-07-28 05:11 UTC
Requires
- php: ^8.3.0
- laravel/framework: ^12.21.0
Requires (Dev)
- larastan/larastan: ^3.6.0
- laravel/pint: ^1.24.0
- pestphp/pest: ^3.8.2
- rector/rector: ^2.1.2
README
๐๏ธ Modern Laravel package skeleton with development tools pre-configured.
This package provides a comprehensive starting point for creating Laravel packages with modern development tools already set up and configured.
Features
- ๐งช Pest the Best PHP Testing Framework
- ๐ PHPStan (Larastan) static analysis for PHP/Laravel
- ๐ง Rector automated code refactoring and upgrades
- ๐ Rector:dry-run safe code refactoring
- ๐จ Laravel Pint code formatting
- ๐ GitHub Actions CI/CD workflow
Requirements
- PHP 8.3+
- Laravel 12.21+
Installation
You can create a new Laravel package using this skeleton via composer:
composer create-project marekmiklusek/package-skeleton --prefer-source MyAwesomePackage
This will create a new directory MyAwesomePackage
with all the skeleton files and proper namespacing configured for a Laravel package.
Usage
After creating your Laravel package, you can use these commands:
Pest Testing:
composer test
PHPStan (Larastan) Static Analysis:
composer analyse
Laravel Pint Formatting:
composer format
Rector Refactoring:
composer refactor
Dry Run Refactoring (safe):
composer refactor:dry-run
What's Included
- src/ - Your Laravel package source code
- src/PackageSkeletonServiceProvider.php - Service provider for your Laravel package
- tests/ExampleTest.php - Example test file
- composer.json - Dependencies and scripts configured
- phpstan.neon - Static analysis configuration
- rector.php - Code refactoring rules
- pint.json - Code style configuration
- .github/workflows/ci.yml - GitHub Actions workflow
License
The MIT License (MIT). Please see License File for more