marekmiklusek/laravel-package-skeleton

Laravel package skeleton with Pest, PHPStan, Rector and Pint wired up, and 100% coverage enforced in CI.

Maintainers

Package info

github.com/marekmiklusek/laravel-package-skeleton

pkg:composer/marekmiklusek/laravel-package-skeleton

Transparency log

Statistics

Installs: 7

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v1.0.6 2026-08-26 13:32 UTC

This package is auto-updated.

Last update: 2026-08-26 13:32:59 UTC


README

Laravel Package Skeleton

Tests Latest Stable Version Downloads License

๐Ÿ—๏ธ Modern Laravel package skeleton with development tools pre-configured.

A starting point for building Laravel packages, with testing, static analysis, refactoring and code style already wired up and enforced in CI.

Features

  • ๐Ÿงช Pest 5 with Testbench, arch tests and parallel execution
  • ๐Ÿ“ฆ illuminate/support only, so the skeleton does not force a framework version on consumers
  • ๐Ÿ“Š 100% code coverage and 100% type coverage enforced
  • ๐Ÿ” PHPStan (Larastan) at level max over src and tests
  • ๐Ÿ”ง Rector automated refactoring and PHP version upgrades
  • ๐ŸŽจ Laravel Pint code formatting
  • ๐Ÿš€ GitHub Actions tests across PHP 8.4 / 8.5 and lowest / highest dependencies
  • ๐Ÿค– Dependabot for Composer and GitHub Actions updates

Requirements

  • PHP 8.4+
  • Laravel 13+

Installation

Create a new Laravel package from this skeleton:

composer create-project marekmiklusek/laravel-package-skeleton your-package-name

This creates a your-package-name directory with all skeleton files. Then rename the namespace, the service provider and the package name in composer.json to match your package.

Usage

Command What it does
composer test Run every quality gate the CI pipeline runs
composer test:unit Run the test suite with exactly 100% code coverage
composer test:type-coverage Require 100% type coverage
composer test:types Run Larastan static analysis
composer test:lint Check code style and pending refactorings without writing files
composer lint Apply Rector refactorings and fix code style

Run composer test before pushing. It mirrors CI exactly.

What's Included

Path Purpose
src/ Your package source code
src/PackageSkeletonServiceProvider.php The package service provider
tests/TestCase.php Testbench base test case registering the provider
tests/Pest.php Pest configuration binding Testbench to Feature only
tests/ArchTest.php Architecture rules (strict types, no debug calls)
tests/Feature/ Feature tests booting a real Laravel application via Testbench
tests/Unit/ Unit tests running without a framework instance
phpstan.neon Static analysis configuration
rector.php Refactoring rules
pint.json Code style configuration
phpunit.xml Test runner and coverage source configuration
.github/workflows/tests.yml GitHub Actions test pipeline
.github/dependabot.yml Dependency update automation

Dependencies

The package itself only requires illuminate/support, not the full framework. Add further illuminate/* components to require as your package needs them, and keep orchestra/testbench in require-dev for testing against a real Laravel application.

Changelog

See CHANGELOG.md.

License

The MIT License (MIT). See LICENSE.md.