Skip to content

Commit a634957

Browse files
authored
Merge pull request #13 from wearenolte/php8.2-composer-update
Add PHP 8.2 support
2 parents cb9c54c + 70e061d commit a634957

File tree

5 files changed

+429
-48
lines changed

5 files changed

+429
-48
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ language: php
22
sudo: false
33
php:
44
- 7.4
5-
- 8.0
5+
- 8.4
66

77
before_script:
88
- composer self-update -q

codesniffer.ruleset.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
<exclude name="Squiz.Commenting.FileComment" />
1111
<exclude name="Squiz.Commenting.FunctionComment" />
1212
<exclude name="WordPress.Files.FileName" />
13-
<exclude name="Generic.Arrays.DisallowShortArraySyntax.Found" />
1413
<exclude name="WordPress.NamingConventions.ValidHookName" />
14+
<exclude name="Generic.Arrays.DisallowShortArraySyntax.Found" />
15+
<exclude name="Universal.Arrays.DisallowShortArraySyntax.Found" />
1516
</rule>
17+
18+
<rule ref="Generic.Arrays.DisallowLongArraySyntax" />
1619
</ruleset>

composer.json

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,36 @@
1212
}
1313
],
1414
"require": {
15-
"php": ">=7.2 || >=8.0"
15+
"php": ">=7.4 || >=8.0"
1616
},
1717
"autoload": {
1818
"psr-4": {
1919
"Lean\\": "src/"
2020
}
2121
},
2222
"require-dev": {
23-
"squizlabs/php_codesniffer": "3.*",
24-
"wp-coding-standards/wpcs": "2.*"
23+
"squizlabs/php_codesniffer": "^3.7.2",
24+
"wp-coding-standards/wpcs": "^3.0",
25+
"phpcompatibility/php-compatibility": "^9.3"
2526
},
2627
"scripts": {
2728
"installSniffer": [
28-
"./vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs/",
29+
"./vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs/,vendor/phpcsstandards/phpcsutils/,vendor/phpcsstandards/phpcsextra/,vendor/phpcompatibility/php-compatibility/",
2930
"./vendor/bin/phpcs --config-set default_standard ./codesniffer.ruleset.xml",
3031
"./vendor/bin/phpcs --config-set show_progress 0",
3132
"./vendor/bin/phpcs --config-set colors 1"
3233
],
3334
"post-install-cmd": [ "@installSniffer" ],
3435
"post-update-cmd": [ "@installSniffer" ],
3536
"test": [
36-
"phpcs src/*.php"
37+
"echo \"Running WordPressCS checks...\"",
38+
"./vendor/bin/phpcs -s src",
39+
"echo \"WordPressCS checks complete.\""
3740
]
41+
},
42+
"config": {
43+
"allow-plugins": {
44+
"dealerdirect/phpcodesniffer-composer-installer": true
45+
}
3846
}
3947
}
40-

0 commit comments

Comments
 (0)