Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Code Style Pint

Code Style Pint Laravel Package

artisanpack-ui/code-style-pint

Laravel Pint preset matching ArtisanPack UI coding standards. Publishes a ready-made pint.json for apps or generates it via builder for packages. Optional WordPress-style spacing support via PHP-CS-Fixer stubs and commands.

View on GitHub
Deep Wiki
Context7

A Laravel Pint preset that implements the coding standards defined in the artisanpack-ui/code-style PHPCS package. This package provides a pre-configured pint.json file to enforce consistent code formatting with Laravel Pint, including rules for array syntax, spacing, brace positioning, import ordering, and strict type declarations.

Frequently asked questions about Code Style Pint
How do I install this Pint preset for Laravel?
Run `composer require artisanpack-ui/code-style-pint --dev` to install the package. Then publish the preset with `php artisan artisanpack:publish-pint-config` or use `php artisan vendor:publish --tag=artisanpack-pint-config`.
Does this package support Laravel 13?
Yes, this package explicitly supports Laravel 13 via its widened `illuminate/support` constraint (^10.0|^11.0|^12.0|^13.0). It’s designed to work seamlessly with the latest Laravel version while maintaining backward compatibility.
Can I use this preset for Laravel packages instead of applications?
Absolutely. Use the `PintConfigBuilder` class directly in your package’s setup script. Run `php pint-setup.php` (where the script includes the builder) to generate a `pint.json` file tailored for packages.
What coding standards does this preset enforce?
This preset aligns with the `artisanpack-ui/code-style` PHPCS package, enforcing rules like array syntax (short/long), spacing, brace positioning, import ordering, and strict type declarations. It also supports WordPress-style spacing via PHP-CS-Fixer.
How do I enable WordPress-style spacing (e.g., spaces inside brackets) in my Laravel app?
Run `php artisan artisanpack:publish-pint-config --wordpress` to generate a `.php-cs-fixer.dist.php` file. Install PHP-CS-Fixer with `composer require --dev friendsofphp/php-cs-fixer`, then run `./vendor/bin/php-cs-fixer fix` to apply the rules.
Will this break existing Pint configurations in my project?
No, the package includes a `--force` flag for the publish command to overwrite existing `pint.json`. Otherwise, it will merge configurations if possible. Always back up your current `pint.json` before publishing.
Does this package work with PHP 8.1+ only, or does it support older PHP versions?
This package requires PHP 8.1+ due to Laravel Pint’s dependencies. If you’re using an older PHP version, consider alternatives like PHP-CS-Fixer alone or upgrading your PHP environment.
Are there any known conflicts with Laravel’s built-in Pint rules?
No major conflicts are documented, but Laravel 13’s new features (e.g., PHP 8.3+ syntax or updated `illuminate/support` methods) might interact unpredictably. Test with `pint --test` on a Laravel 13 skeleton project if concerned.
Can I customize the preset instead of using the default rules?
The preset is designed to be opinionated for consistency, but you can manually edit the published `pint.json` or extend the `PintConfigBuilder` in your package’s setup script to override specific rules.
What alternatives exist if I don’t want to use this preset?
For Laravel, you can use the default Pint preset (`laravel/pint`) or configure PHP-CS-Fixer manually. For WordPress-style spacing, PHP-CS-Fixer alone is a viable alternative, though it lacks the ArtisanPack UI-specific rules.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
craftcms/url-validator
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony