You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -19,93 +19,23 @@ do all the other laravel packages you use.
19
19
20
20
## Versions and compatibility
21
21
> **Note:** This documentation was written for Laravel 5.5.
22
-
* PHP Version: ">=7.0"
23
-
* Laravel/Lumen: "^5.4|^6.0"
24
-
* PHP-CS-Fixer: "2.14.*"
22
+
* PHP Version: "^7.1.3 || ^8.0"
23
+
* Laravel/Lumen: "^5.4|^6.0|^7.0|^8.0"
24
+
* PHP-CS-Fixer: "^3.0.0"
25
25
26
26
## Installation
27
27
28
28
```
29
29
composer require stechstudio/laravel-php-cs-fixer
30
30
```
31
31
32
-
> **Note**: If you are using Laravel 5.5 or greater, no need to register the provider. Laravel PHP CS Fixer supports Laravel new [Package Discovery](https://laravel.com/docs/5.5/packages#package-discovery).
33
-
34
-
### Manually Register the Provider for Laravel 5.4:
35
-
36
-
#### Laravel
37
-
Add the following to the `providers` array in `config/app.php`.:
The default rule configuration is in the `fixer.php` and is intended to match the rules used by the Laravel Framework.
52
-
53
-
```php
54
-
return [
55
-
'rules' => [
56
-
'psr0' => false,
57
-
'@PSR2' => true,
58
-
'blank_line_after_namespace' => true,
59
-
'braces' => true,
60
-
'class_definition' => true,
61
-
'elseif' => true,
62
-
'function_declaration' => true,
63
-
'indentation_type' => true,
64
-
'line_ending' => true,
65
-
'lowercase_constants' => true,
66
-
'lowercase_keywords' => true,
67
-
'method_argument_space' => [
68
-
'ensure_fully_multiline' => true, ],
69
-
'no_break_comment' => true,
70
-
'no_closing_tag' => true,
71
-
'no_spaces_after_function_name' => true,
72
-
'no_spaces_inside_parenthesis' => true,
73
-
'no_trailing_whitespace' => true,
74
-
'no_trailing_whitespace_in_comment' => true,
75
-
'single_blank_line_at_eof' => true,
76
-
'single_class_element_per_statement' => [
77
-
'elements' => ['property'],
78
-
],
79
-
'single_import_per_statement' => true,
80
-
'single_line_after_imports' => true,
81
-
'switch_case_semicolon_to_colon' => true,
82
-
'switch_case_space' => true,
83
-
'visibility_required' => true,
84
-
'encoding' => true,
85
-
'full_opening_tag' => true,
86
-
],
87
-
];
88
-
```
33
+
The default rule configuration is in the [fixer.php](https://github.com/stechstudio/Laravel-PHP-CS-Fixer/blob/master/config/fixer.php) and is intended to match the rules used by Laravel Shift.
89
34
90
35
if you want to modify this yourself, just use artisan `php artisan vendor:publish --provider="STS\Fixer\FixerServiceProvider"`
91
36
and it will put the default configuration in 'config/fixer.php'. Check the
92
37
[PHP-CS-Fixer/README](https://github.com/FriendsOfPHP/PHP-CS-Fixer#usage) for valid rules.
93
38
94
-
> Note: There are some static configuration settings in the finder that have yet to be moved to the configuration file
95
-
> that you should be aware of! We plan to move these to the config file soon.
0 commit comments