Skip to content

Commit 72bafb9

Browse files
authored
Merge pull request #16 from TomBrouws/master
Add support for PHP 8.3
2 parents 9ce1921 + cc31c73 commit 72bafb9

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

.github/workflows/composer-json-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
php-version:
16-
- "8.2"
16+
- "8.3"
1717
operating-system:
1818
- "ubuntu-latest"
1919

.github/workflows/php-cs-fixer.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
- "8.0"
1818
- "8.1"
1919
- "8.2"
20+
- "8.3"
2021
operating-system:
2122
- "ubuntu-latest"
2223

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ This package makes use of PHP-CS-Fixer.
1414
This package provides default rules to be used with PHP-CS-Fixer.
1515

1616
You can find them in `Mollie\PhpCodingStandards\PhpCsFixer\Rules` which has methods specific to php version,
17-
which you can directly use in the `->setRules()` part of your config. For example, assuming PHP version 8.2:
17+
which you can directly use in the `->setRules()` part of your config. For example, assuming PHP version 8.3:
1818

1919
```php
2020
use Mollie\PhpCodingStandards\PhpCsFixer\Rules;
2121

22-
$config->setRules(Rules::getForPhp82());
22+
$config->setRules(Rules::getForPhp83());
2323
```
2424

2525
### New to PHP-CS-Fixer
@@ -39,7 +39,7 @@ $finder = Finder::create()
3939
return (new Config())
4040
->setFinder($finder)
4141
->setRiskyAllowed(true)
42-
// use specific rules for your php version e.g.: getForPhp74, getForPhp80, getForPhp81
42+
// use specific rules for your php version e.g.: getForPhp74, getForPhp82, getForPhp83
4343
->setRules(Rules::getForPhp74());
4444
```
4545

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
],
1212
"require": {
1313
"php": "^7.1.3 || ^8.0",
14-
"friendsofphp/php-cs-fixer": "^3.15"
14+
"friendsofphp/php-cs-fixer": "^3.40"
1515
},
1616
"minimum-stability": "stable",
1717
"autoload": {

src/PhpCsFixer/Rules.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Mollie\PhpCodingStandards\PhpCsFixer;
66

77
/*
8-
* Last updated for php-cs-fixer version: 3.15.1
8+
* Last updated for php-cs-fixer version: 3.40.2
99
*/
1010
class Rules
1111
{
@@ -84,6 +84,15 @@ public static function getForPhp82(array $overriddenRules = []): array
8484
return array_merge(self::getForPhp81($specific82Rules), $overriddenRules);
8585
}
8686

87+
public static function getForPhp83(array $overriddenRules = []): array
88+
{
89+
$specific83Rules = [
90+
// At the moment there are no specific 8.3 rules or configurations
91+
];
92+
93+
return array_merge(self::getForPhp82($specific83Rules), $overriddenRules);
94+
}
95+
8796
private static function getBaseRules(): array
8897
{
8998
return [

0 commit comments

Comments
 (0)