-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Formatting results in Implements being commented out #231
Comments
In a fresh Laravel 10 Application with the example code put into "app/Rules/E164PhoneNumber.php" and then running the command Can you provide an example repository? Or do you have custom rules in your Note: I use PHP 8.2.11 instead of PHP 8.2.5 (on MacOS) |
Sorry, I guess I was a little quick. Having it like so, gives me the bug, after doing a fresh laravel install (was in a more complex project earlier) |
using the changed code from you, I can confirm the issue. using this pint.json {
"rules": {
"ordered_interfaces": false
}
} you can for now disable this behaviour, but this is an issue with PHP-CS-Fixer where you should report the problem. |
Fix released by Fixer team 🎉 for cross reference: PHP-CS-Fixer/PHP-CS-Fixer#7463 (comment) btw folks, in some previous conversations we got lot of involvement of Laravel community pointing not big enough discussion, alignments etc - root cause is limited pool of contributors. Please, take it as good opportunity here - in future cases when you go deep dive to figure out which rule is having the problem, you may not only delegate the issue to core repo, but also contribute to repo with the fix 🙏🏻 |
Pint Version
1.13.6
PHP Version
8.2.5
Description
We have a validation rule that implements
use Illuminate\Contracts\Validation\DataAwareRule;
use Illuminate\Contracts\Validation\Rule;
we had commented out that the rule should implement Illuminate\Contracts\Validation\ValidatorAwareRule at the end of the implements line; like so:
class E164PhoneNumber implements DataAwareRule, Rule //, ValidatorAwareRule
when we format this file using pint fresh as is, it puts the "Rule" into the comment, breaking our validation.
Steps To Reproduce
Install pint on a laravel 10 project
used
composer require laravel/pint
create a rule file like so:
use pint to format the file by running ./vendor/bin/pint
The text was updated successfully, but these errors were encountered: