laranail/package-tools
laranail/package-tools is a toolkit for Laravel package developers, offering helpers and scaffolding for service providers, configuration, migrations, and common package concerns so you can build cleaner, more consistent add-ons with less boilerplate.
composer.json, ServiceProvider, and Facade setup, but requires adoption of its builder API (potential learning curve).attributes config). If disabled, this is a blocking dependency.PackageManifest, custom Composer scripts)?config/packages.php) but wanting fluent configuration.ServiceProvider/Facade registration with the fluent builder.composer.json extras) to attributes.PackageTools::validate()).autoload).| Phase | Task | Dependencies |
|---|---|---|
| Prep | Audit existing packages for PHP 8.1+ compatibility. | None |
| Builder | Replace ServiceProvider with fluent builder for 1–2 packages. |
Laravel 10+, PHP 8.1+ |
| Attributes | Migrate metadata to attributes (e.g., @Package, @Command). |
Package builder integration |
| Tooling | Integrate validation into CI/CD (e.g., GitHub Actions). | Builder + CI access |
| Optimize | Benchmark performance; refine attribute usage. | Full adoption |
register()/boot() logic.return types).| Risk | Mitigation Strategy | Detection Method |
|---|---|---|
| Package Builder Breaks | Fork the package; maintain a local version. | CI fails on PackageTools::build(). |
| Attribute Reflection Fails | Fallback to manual registration. | PHP warnings in logs. |
| Tooling Hooks Ignored | Add pre-commit checks for package metadata. | Custom script validates attributes. |
| Performance Degradation | Profile with Xdebug; remove unused attributes. | Benchmark package load times. |
| Laravel Version Incompatibility | Test against Laravel 11+ early. | Matrix testing in CI. |
How can I help you explore Laravel packages today?