Skip to content

Commit 0f64bb0

Browse files
authored
Merge pull request #271 from simPod/merge
Merge 9.0.x up into 10.0.x
2 parents ace09e8 + 161c820 commit 0f64bb0

File tree

12 files changed

+406
-31
lines changed

12 files changed

+406
-31
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,11 @@ jobs:
9090
strategy:
9191
matrix:
9292
php-version:
93-
- "7.1"
9493
- "7.2"
9594
- "7.3"
9695
- "7.4"
96+
- "8.0"
97+
- "8.1"
9798

9899
steps:
99100
- name: "Checkout"
@@ -126,9 +127,10 @@ jobs:
126127
strategy:
127128
matrix:
128129
php-version:
129-
- "7.1"
130+
- "7.2"
130131
- "7.4"
131132
- "8.0"
133+
- "8.1"
132134

133135
steps:
134136
- name: "Checkout"

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,16 @@ update-compatibility-patch-80:
2828
@git apply tests/php80-compatibility.patch
2929
@printf "Please open your editor and apply your changes\n"
3030
@until [ "$${compatibility_resolved}" == "y" ]; do read -p "Have finished your changes (y|n)? " compatibility_resolved; done && compatibility_resolved=
31-
@git diff -- tests/expected_report.txt tests/fixed tests/input > .tmp-patch-80 && mv .tmp-patch-80 tests/php80-compatibility.patch && git apply -R tests/php80-compatibility.patch
31+
@git diff -- tests/expected_report.txt tests/fixed tests/input > .tmp-patch && mv .tmp-patch tests/php80-compatibility.patch && git apply -R tests/php80-compatibility.patch
3232
@git commit -m 'Update compatibility patch' tests/php80-compatibility.patch
3333

34+
update-compatibility-patch-81:
35+
@git apply tests/php81-compatibility.patch
36+
@printf "Please open your editor and apply your changes\n"
37+
@until [ "$${compatibility_resolved}" == "y" ]; do read -p "Have finished your changes (y|n)? " compatibility_resolved; done && compatibility_resolved=
38+
@git diff -- tests/expected_report.txt tests/fixed tests/input > .tmp-patch && mv .tmp-patch tests/php81-compatibility.patch && git apply -R tests/php81-compatibility.patch
39+
@git commit -m 'Update compatibility patch' tests/php81-compatibility.patch
40+
3441
vendor: composer.json
3542
composer update
3643
touch -c vendor

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
{"name": "Steve Müller", "email": "[email protected]"}
2222
],
2323
"require": {
24-
"php": "^7.1 || ^8.0",
24+
"php": "^7.2 || ^8.0",
2525
"dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7",
26-
"slevomat/coding-standard": "^7.0.0",
27-
"squizlabs/php_codesniffer": "^3.6.0"
26+
"slevomat/coding-standard": "^8",
27+
"squizlabs/php_codesniffer": "^3.7"
2828
},
2929
"config": {
3030
"sort-packages": true

lib/Doctrine/ruleset.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@
133133
</rule>
134134
<!-- Require usage of ::class instead of __CLASS__, get_class(), get_class($this), get_called_class() and get_parent_class() -->
135135
<rule ref="SlevomatCodingStandard.Classes.ModernClassNameReference"/>
136+
<!-- https://github.com/slevomat/coding-standard#slevomatcodingstandardclassespropertydeclaration- -->
137+
<rule ref="SlevomatCodingStandard.Classes.PropertyDeclaration"/>
136138
<!-- Forbid uses of multiple traits separated by comma -->
137139
<rule ref="SlevomatCodingStandard.Classes.TraitUseDeclaration"/>
138140
<!-- Require no spaces before trait use, between trait uses and one space after trait uses -->
@@ -416,7 +418,6 @@
416418
</property>
417419
</properties>
418420
</rule>
419-
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHintSpacing"/>
420421
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint">
421422
<properties>
422423
<property name="traversableTypeHints" type="array">

tests/expected_report.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ tests/input/not_spacing.php 8 0
2828
tests/input/null_coalesce_equal_operator.php 1 0
2929
tests/input/null_coalesce_operator.php 3 0
3030
tests/input/optimized-functions.php 1 0
31-
tests/input/PropertyTypeHintSpacing.php 6 0
31+
tests/input/PropertyDeclaration.php 6 0
3232
tests/input/return_type_on_closures.php 21 0
3333
tests/input/return_type_on_methods.php 17 0
3434
tests/input/semicolon_spacing.php 3 0

tests/fixed/EarlyReturn.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public function bar(): bool
1313

1414
public function foo(): ?string
1515
{
16-
foreach ($itens as $item) {
16+
foreach ($items as $item) {
1717
if (! $item->isItem()) {
1818
return 'There is an item that is not an item';
1919
}

tests/fixed/PropertyTypeHintSpacing.php renamed to tests/fixed/PropertyDeclaration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Spacing;
66

7-
final class PropertyTypeHintSpacing
7+
final class PropertyDeclaration
88
{
99
public bool $boolPropertyWithDefaultValue = false;
1010
public string $stringProperty;

tests/input/EarlyReturn.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function bar(): bool
1717

1818
public function foo(): ?string
1919
{
20-
foreach ($itens as $item) {
20+
foreach ($items as $item) {
2121
if (! ($item->isItem())) {
2222
return 'There is an item that is not an item';
2323
} else {

tests/input/PropertyTypeHintSpacing.php renamed to tests/input/PropertyDeclaration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Spacing;
66

7-
final class PropertyTypeHintSpacing
7+
final class PropertyDeclaration
88
{
99
public bool $boolPropertyWithDefaultValue = false;
1010
public string $stringProperty;

tests/php74-compatibility.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ index c644926..7d122d2 100644
2222
+tests/input/null_coalesce_equal_operator.php 5 0
2323
tests/input/null_coalesce_operator.php 3 0
2424
tests/input/optimized-functions.php 1 0
25-
tests/input/PropertyTypeHintSpacing.php 6 0
25+
tests/input/PropertyDeclaration.php 6 0
2626
@@ -35,19 +35,20 @@ tests/input/semicolon_spacing.php 3 0
2727
tests/input/single-line-array-spacing.php 5 0
2828
tests/input/spread-operator.php 6 0

0 commit comments

Comments
 (0)