Skip to content

Commit 8c3c932

Browse files
authored
Merge pull request #303 from greg0ire/11.0.x
Merge 10.1.x up into 11.0.x
2 parents 05c815d + 3790b91 commit 8c3c932

File tree

10 files changed

+91
-68
lines changed

10 files changed

+91
-68
lines changed

.doctrine-project.json

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,33 @@
55
"docsSlug": "doctrine-coding-standard",
66
"versions": [
77
{
8-
"name": "9.0",
9-
"branchName": "9.0.x",
10-
"slug": "9.0",
8+
"name": "11.0",
9+
"branchName": "11.0.x",
10+
"slug": "11.0",
1111
"upcoming": true
1212
},
1313
{
14-
"name": "8.2",
15-
"branchName": "8.2.x",
16-
"slug": "8.2",
14+
"name": "10.0",
15+
"branchName": "10.0.x",
16+
"slug": "10.0",
1717
"current": true,
1818
"aliases": [
1919
"current",
2020
"stable"
2121
]
2222
},
23+
{
24+
"name": "9.0",
25+
"branchName": "9.0.x",
26+
"slug": "9.0",
27+
"maintained": false
28+
},
29+
{
30+
"name": "8.2",
31+
"branchName": "8.2.x",
32+
"slug": "8.2",
33+
"maintained": false
34+
},
2335
{
2436
"name": "8.1",
2537
"branchName": "8.1.x",

.github/workflows/release-on-milestone-closed.yml

Lines changed: 6 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,9 @@ on:
88
jobs:
99
release:
1010
name: "Git tag, release & create merge-up PR"
11-
runs-on: "ubuntu-20.04"
12-
13-
steps:
14-
- name: "Checkout"
15-
uses: "actions/checkout@v2"
16-
17-
- name: "Release"
18-
uses: "laminas/automatic-releases@v1"
19-
with:
20-
command-name: "laminas:automatic-releases:release"
21-
env:
22-
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
23-
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
24-
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
25-
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
26-
27-
- name: "Create Merge-Up Pull Request"
28-
uses: "laminas/automatic-releases@v1"
29-
with:
30-
command-name: "laminas:automatic-releases:create-merge-up-pull-request"
31-
env:
32-
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
33-
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
34-
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
35-
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
36-
37-
- name: "Create new milestones"
38-
uses: "laminas/automatic-releases@v1"
39-
with:
40-
command-name: "laminas:automatic-releases:create-milestones"
41-
env:
42-
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
43-
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
44-
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
45-
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
11+
uses: "doctrine/.github/.github/workflows/[email protected]"
12+
secrets:
13+
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
14+
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
15+
ORGANIZATION_ADMIN_TOKEN: ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
16+
SIGNING_SECRET_KEY: ${{ secrets.SIGNING_SECRET_KEY }}

CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Contributing
2+
3+
See https://www.doctrine-project.org/projects/doctrine-coding-standard/en/stable/reference/index.html#contributing

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"doctrine",
77
"coding",
88
"standard",
9+
"dev",
910
"cs",
1011
"code",
1112
"style",
@@ -23,7 +24,7 @@
2324
"require": {
2425
"php": "^7.2 || ^8.0",
2526
"dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7",
26-
"slevomat/coding-standard": "^8.6",
27+
"slevomat/coding-standard": "^8.6.2",
2728
"squizlabs/php_codesniffer": "^3.7"
2829
},
2930
"config": {

docs/en/reference/index.rst

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,24 @@ and `the list of configuration options <https://github.com/squizlabs/PHP_CodeSni
117117

118118
To learn about customizing the rules, please refer to the :ref:`customizing` chapter.
119119

120+
Contributing
121+
============
122+
120123
Versioning
121-
==========
124+
----------
122125

123126
This library follows semantic versioning, and additions to the code ruleset
124127
are only performed in major releases.
125128

129+
The patch branch can receive internal changes, such as CI pipeline
130+
improvements, test workflow improvements, and can receive bugfixes. For
131+
instance, such as removing rules that were not meant to be added.
132+
133+
The minor branch can receive refactorings, and dependency updates that
134+
do not affect the code ruleset.
135+
126136
Testing
127-
=======
137+
-------
128138

129139
If you are contributing to the Doctrine Coding Standard and want to test your contribution, you just
130140
need to execute the ``test`` GNU make target:
@@ -136,13 +146,21 @@ need to execute the ``test`` GNU make target:
136146
Sometimes you are enabling a sniff that enforces some features for a specific PHP version, that will
137147
probably cause our build pipeline to fail when running on such versions.
138148

139-
We have created the ``update-compatibility-patch`` GNU make target to help you with that:
149+
We have created the ``update-compatibility-patch-*`` GNU make targets to
150+
help you with that. For instance, for PHP 6.0, you would run
140151

141152
.. code-block:: bash
142153
143-
$ make update-compatibility-patch
154+
$ make update-compatibility-patch-60
155+
156+
That target will attempt to apply the latest version of our
157+
compatibility patch for that version of PHP and ask you to adjust the
158+
code in ``tests/fixed`` and ``tests/expected_report.txt`` using the
159+
editor of your preference.
160+
161+
If the patch does not apply cleanly, you can edit it to edit or remove
162+
hunks that relate to files you changed in your PR.
144163

145-
That target will apply the latest version of our compatibility patch and ask you to adjust the code in ``tests/fixed`` and
146-
``tests/expected_report.txt`` using the editor of your preference.
147-
Once you are done, please type "y" to resume the command, which will update the compatibility patch and create a commit
148-
with your changes for you to push to your remote branch.
164+
Once you are done, please type "y" to resume the command, which will
165+
update the compatibility patch and create a commit with your changes for
166+
you to push to your remote branch.

tests/expected_report.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ tests/input/class-references.php 10 0
1212
tests/input/ClassPropertySpacing.php 2 0
1313
tests/input/concatenation_spacing.php 49 0
1414
tests/input/constants-no-lsb.php 2 0
15-
tests/input/constants-var.php 7 0
15+
tests/input/constants-var.php 6 0
1616
tests/input/ControlStructures.php 28 0
1717
tests/input/doc-comment-spacing.php 11 0
1818
tests/input/duplicate-assignment-variable.php 1 0
@@ -52,7 +52,7 @@ tests/input/use-ordering.php 1 0
5252
tests/input/useless-semicolon.php 2 0
5353
tests/input/UselessConditions.php 21 0
5454
----------------------------------------------------------------------
55-
A TOTAL OF 452 ERRORS AND 0 WARNINGS WERE FOUND IN 48 FILES
55+
A TOTAL OF 451 ERRORS AND 0 WARNINGS WERE FOUND IN 48 FILES
5656
----------------------------------------------------------------------
5757
PHPCBF CAN FIX 374 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
5858
----------------------------------------------------------------------

tests/php72-compatibility.patch

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
diff --git a/tests/expected_report.txt b/tests/expected_report.txt
2-
index 9e34caa..ea3b611 100644
2+
index d1e1fad..ea3b611 100644
33
--- a/tests/expected_report.txt
44
+++ b/tests/expected_report.txt
5-
@@ -16,26 +16,23 @@ tests/input/constants-var.php 7 0
5+
@@ -12,30 +12,27 @@ tests/input/class-references.php 10 0
6+
tests/input/ClassPropertySpacing.php 2 0
7+
tests/input/concatenation_spacing.php 49 0
8+
tests/input/constants-no-lsb.php 2 0
9+
tests/input/constants-var.php 6 0
610
tests/input/ControlStructures.php 28 0
711
tests/input/doc-comment-spacing.php 11 0
812
tests/input/duplicate-assignment-variable.php 1 0
@@ -51,8 +55,8 @@ index 9e34caa..ea3b611 100644
5155
-tests/input/UselessConditions.php 21 0
5256
+tests/input/UselessConditions.php 20 0
5357
----------------------------------------------------------------------
54-
-A TOTAL OF 452 ERRORS AND 0 WARNINGS WERE FOUND IN 48 FILES
55-
+A TOTAL OF 405 ERRORS AND 0 WARNINGS WERE FOUND IN 44 FILES
58+
-A TOTAL OF 451 ERRORS AND 0 WARNINGS WERE FOUND IN 48 FILES
59+
+A TOTAL OF 404 ERRORS AND 0 WARNINGS WERE FOUND IN 44 FILES
5660
----------------------------------------------------------------------
5761
-PHPCBF CAN FIX 374 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
5862
+PHPCBF CAN FIX 327 OF THESE SNIFF VIOLATIONS AUTOMATICALLY

tests/php73-compatibility.patch

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
diff --git a/tests/expected_report.txt b/tests/expected_report.txt
2-
index 9e34caa..c5062cb 100644
2+
index d1e1fad..9a78bc1 100644
33
--- a/tests/expected_report.txt
44
+++ b/tests/expected_report.txt
5-
@@ -16,26 +16,23 @@ tests/input/constants-var.php 7 0
5+
@@ -12,30 +12,27 @@ tests/input/class-references.php 10 0
6+
tests/input/ClassPropertySpacing.php 2 0
7+
tests/input/concatenation_spacing.php 49 0
8+
tests/input/constants-no-lsb.php 2 0
9+
tests/input/constants-var.php 6 0
610
tests/input/ControlStructures.php 28 0
711
tests/input/doc-comment-spacing.php 11 0
812
tests/input/duplicate-assignment-variable.php 1 0
@@ -52,8 +56,8 @@ index 9e34caa..c5062cb 100644
5256
-tests/input/UselessConditions.php 21 0
5357
+tests/input/UselessConditions.php 20 0
5458
----------------------------------------------------------------------
55-
-A TOTAL OF 452 ERRORS AND 0 WARNINGS WERE FOUND IN 48 FILES
56-
+A TOTAL OF 407 ERRORS AND 0 WARNINGS WERE FOUND IN 45 FILES
59+
-A TOTAL OF 451 ERRORS AND 0 WARNINGS WERE FOUND IN 48 FILES
60+
+A TOTAL OF 406 ERRORS AND 0 WARNINGS WERE FOUND IN 45 FILES
5761
----------------------------------------------------------------------
5862
-PHPCBF CAN FIX 374 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
5963
+PHPCBF CAN FIX 329 OF THESE SNIFF VIOLATIONS AUTOMATICALLY

tests/php74-compatibility.patch

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
diff --git a/tests/expected_report.txt b/tests/expected_report.txt
2-
index 9e34caa..ed67841 100644
2+
index d1e1fad..ed67841 100644
33
--- a/tests/expected_report.txt
44
+++ b/tests/expected_report.txt
5-
@@ -16,26 +16,23 @@ tests/input/constants-var.php 7 0
5+
@@ -12,30 +12,27 @@ tests/input/class-references.php 10 0
6+
tests/input/ClassPropertySpacing.php 2 0
7+
tests/input/concatenation_spacing.php 49 0
8+
tests/input/constants-no-lsb.php 2 0
9+
tests/input/constants-var.php 6 0
610
tests/input/ControlStructures.php 28 0
711
tests/input/doc-comment-spacing.php 11 0
812
tests/input/duplicate-assignment-variable.php 1 0
@@ -50,8 +54,8 @@ index 9e34caa..ed67841 100644
5054
-tests/input/UselessConditions.php 21 0
5155
+tests/input/UselessConditions.php 20 0
5256
----------------------------------------------------------------------
53-
-A TOTAL OF 452 ERRORS AND 0 WARNINGS WERE FOUND IN 48 FILES
54-
+A TOTAL OF 416 ERRORS AND 0 WARNINGS WERE FOUND IN 45 FILES
57+
-A TOTAL OF 451 ERRORS AND 0 WARNINGS WERE FOUND IN 48 FILES
58+
+A TOTAL OF 415 ERRORS AND 0 WARNINGS WERE FOUND IN 45 FILES
5559
----------------------------------------------------------------------
5660
-PHPCBF CAN FIX 374 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
5761
+PHPCBF CAN FIX 338 OF THESE SNIFF VIOLATIONS AUTOMATICALLY

tests/php80-compatibility.patch

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
diff --git a/tests/expected_report.txt b/tests/expected_report.txt
2-
index 9e34caa..71022c4 100644
2+
index d1e1fad..71022c4 100644
33
--- a/tests/expected_report.txt
44
+++ b/tests/expected_report.txt
5-
@@ -18,7 +18,6 @@ tests/input/doc-comment-spacing.php 11 0
5+
@@ -12,13 +12,12 @@ tests/input/class-references.php 10 0
6+
tests/input/ClassPropertySpacing.php 2 0
7+
tests/input/concatenation_spacing.php 49 0
8+
tests/input/constants-no-lsb.php 2 0
9+
tests/input/constants-var.php 6 0
10+
tests/input/ControlStructures.php 28 0
11+
tests/input/doc-comment-spacing.php 11 0
612
tests/input/duplicate-assignment-variable.php 1 0
713
tests/input/EarlyReturn.php 7 0
814
tests/input/example-class.php 47 0
@@ -23,8 +29,8 @@ index 9e34caa..71022c4 100644
2329
tests/input/useless-semicolon.php 2 0
2430
tests/input/UselessConditions.php 21 0
2531
----------------------------------------------------------------------
26-
-A TOTAL OF 452 ERRORS AND 0 WARNINGS WERE FOUND IN 48 FILES
27-
+A TOTAL OF 446 ERRORS AND 0 WARNINGS WERE FOUND IN 47 FILES
32+
-A TOTAL OF 451 ERRORS AND 0 WARNINGS WERE FOUND IN 48 FILES
33+
+A TOTAL OF 445 ERRORS AND 0 WARNINGS WERE FOUND IN 47 FILES
2834
----------------------------------------------------------------------
2935
-PHPCBF CAN FIX 374 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
3036
+PHPCBF CAN FIX 368 OF THESE SNIFF VIOLATIONS AUTOMATICALLY

0 commit comments

Comments
 (0)