Product Decisions This Supports
- Standardization of Code Style: Enables consistent code formatting across Laravel projects, reducing cognitive load for developers and improving maintainability.
- Build vs. Buy: Justifies adopting a pre-configured solution (this package) over custom Pint/PHPCS configurations, saving engineering time and reducing configuration drift.
- Developer Experience (DX): Supports a seamless workflow by integrating with Laravel Boost AI, IDEs (PhpStorm, VS Code), and CI/CD pipelines.
- Onboarding & Scalability: Accelerates onboarding for new developers by enforcing a standardized style and reducing manual configuration efforts.
- Compliance with Team Standards: Aligns with the
artisanpack-ui/code-style PHPCS package for comprehensive code quality enforcement (formatting + static analysis).
- Roadmap for Code Quality: Facilitates a phased approach to code quality—first with Pint (auto-fixable), then PHPCS (manual review).
- WordPress/Laravel Hybrid Projects: Supports mixed environments with WordPress-style spacing via PHP-CS-Fixer when needed.
When to Consider This Package
-
Adopt this package if:
- Your team uses Laravel and needs a pre-configured Pint preset aligned with a specific coding standard (ArtisanPack UI).
- You want to reduce manual Pint/PHPCS configuration and enforce consistency across projects/packages.
- Your workflow includes Laravel Boost AI or requires IDE integration (PhpStorm/VS Code).
- You need WordPress-style spacing in Laravel apps or packages (via PHP-CS-Fixer fallback).
- You’re building a Laravel package and want to standardize formatting without
php artisan commands.
- Your team prioritizes auto-fixable formatting (Pint) before static analysis (PHPCS).
-
Look elsewhere if:
- Your project uses non-Laravel PHP or doesn’t need Pint/PHPCS integration.
- You require custom Pint rules not covered by this preset (e.g., legacy codebase exceptions).
- Your team prefers manual configuration over preset-driven formatting.
- You’re already satisfied with Laravel’s default Pint rules or another preset (e.g.,
laravel/pint).
- Your CI/CD pipeline lacks PHP-CS-Fixer support (for WordPress-style spacing).
How to Pitch It (Stakeholders)
For Executives:
"This package standardizes our Laravel codebase’s formatting using a pre-configured Pint preset, saving engineering time and reducing merge conflicts. It aligns with our existing PHPCS standards, integrates with Laravel Boost AI for automated code suggestions, and supports hybrid WordPress/Laravel projects. By adopting this, we’ll improve developer velocity, onboarding, and code quality—all while maintaining flexibility for customization. The MIT license ensures no vendor lock-in, and the package’s maturity (documentation, CI/CD guides) minimizes risk."
For Engineering/DevOps:
*"This Laravel Pint preset enforces ArtisanPack UI’s coding standards (array syntax, spacing, brace positioning, etc.) with zero manual configuration. Key benefits:
- One command to format code:
./vendor/bin/pint auto-fixes 90% of style issues.
- IDE support: Works seamlessly with PhpStorm/VS Code for real-time formatting.
- CI/CD ready: Includes GitHub Actions/GitLab CI templates to block non-compliant PRs.
- Hybrid compatibility: Supports WordPress-style spacing via PHP-CS-Fixer when needed.
- Laravel Boost integration: Overrides default Pint guidelines for AI-assisted coding.
For packages, use the
PintConfigBuilder to generate pint.json without php artisan. Start with the preset, then customize rules programmatically or via pint.json."
For Developers:
*"Tired of arguing about spaces vs. tabs? This package automates Laravel code formatting to match ArtisanPack UI’s standards. Just run:
composer require artisanpack-ui/code-style-pint --dev
php artisan artisanpack:publish-pint-config
./vendor/bin/pint
It handles:
✅ Array syntax ([] vs array())
✅ Brace positioning (K&R style)
✅ Import ordering (alphabetical)
✅ Strict types, visibility, and more
Need WordPress-style spacing? Use --wordpress flag. Want to tweak rules? Edit pint.json or use the PintConfigBuilder. No more manual fixes—just consistent, clean code."*