Skip to content

Commit 2fc0d78

Browse files
committed
Merge branch 'stable' into develop
2 parents 35aaedf + 73d7792 commit 2fc0d78

File tree

13 files changed

+273
-45
lines changed

13 files changed

+273
-45
lines changed

.gitattributes

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,20 @@
55
# https://www.reddit.com/r/PHP/comments/2jzp6k/i_dont_need_your_tests_in_my_production
66
# https://blog.madewithlove.be/post/gitattributes/
77
#
8-
/.gitattributes export-ignore
9-
/.gitignore export-ignore
10-
/.github export-ignore
11-
/phpcs.xml.dist export-ignore
12-
/phpstan.neon.dist export-ignore
13-
/phpunit.xml.dist export-ignore
14-
/phpunitlte9.xml.dist export-ignore
15-
/phpunit-bootstrap.php export-ignore
16-
/PHPCSDebug/Tests export-ignore
17-
/Tests export-ignore
8+
/.gitattributes export-ignore
9+
/.gitignore export-ignore
10+
/.github export-ignore
11+
/.markdownlint-cli2.yaml export-ignore
12+
/.remarkignore export-ignore
13+
/.remarkrc export-ignore
14+
/.yamllint.yml export-ignore
15+
/phpcs.xml.dist export-ignore
16+
/phpstan.neon.dist export-ignore
17+
/phpunit.xml.dist export-ignore
18+
/phpunitlte9.xml.dist export-ignore
19+
/phpunit-bootstrap.php export-ignore
20+
/PHPCSDebug/Tests export-ignore
21+
/Tests export-ignore
1822

1923
#
2024
# Auto detect text files and perform LF normalization

.github/workflows/cs.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,17 @@ jobs:
142142

143143
phpstan:
144144
uses: PHPCSStandards/.github/.github/workflows/reusable-phpstan.yml@main
145+
146+
markdownlint:
147+
name: 'Lint Markdown'
148+
uses: PHPCSStandards/.github/.github/workflows/reusable-markdownlint.yml@main
149+
150+
remark:
151+
name: 'QA Markdown'
152+
uses: PHPCSStandards/.github/.github/workflows/reusable-remark.yml@main
153+
154+
yamllint:
155+
name: 'Lint Yaml'
156+
uses: PHPCSStandards/.github/.github/workflows/reusable-yamllint.yml@main
157+
with:
158+
strict: true

.github/workflows/quicktest.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- php: '5.4'
3333
phpcs_version: '3.1.0'
3434

35-
name: "QTest${{ matrix.lint && ' + Lint' || '' }}: PHP ${{ matrix.php }} - PHPCS ${{ matrix.phpcs_version }}"
35+
name: "QTest${{ matrix.phpcs_version == 'dev-master' && ' + Lint' || '' }}: PHP ${{ matrix.php }} - PHPCS ${{ matrix.phpcs_version }}"
3636

3737
steps:
3838
- name: Checkout code
@@ -98,12 +98,16 @@ jobs:
9898

9999
- name: Grab PHPUnit version
100100
id: phpunit_version
101+
# yamllint disable rule:line-length
101102
run: echo "VERSION=$(vendor/bin/phpunit --version | grep --only-matching --max-count=1 --extended-regexp '\b[0-9]+\.[0-9]+')" >> "$GITHUB_OUTPUT"
103+
# yamllint enable rule:line-length
102104

103105
- name: Determine PHPUnit composer script to use
104106
id: phpunit_script
105107
run: |
106-
if [ "${{ startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) || startsWith( steps.phpunit_version.outputs.VERSION, '11.' ) }}" == "true" ]; then
108+
if [ "${{ startsWith( steps.phpunit_version.outputs.VERSION, '11.' ) }}" == "true" ]; then
109+
echo 'SUFFIX=' >> "$GITHUB_OUTPUT"
110+
elif [ "${{ startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) }}" == "true" ]; then
107111
echo 'SUFFIX=' >> "$GITHUB_OUTPUT"
108112
else
109113
echo 'SUFFIX=-lte9' >> "$GITHUB_OUTPUT"

.github/workflows/test.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,16 @@ jobs:
158158

159159
- name: Grab PHPUnit version
160160
id: phpunit_version
161+
# yamllint disable rule:line-length
161162
run: echo "VERSION=$(vendor/bin/phpunit --version | grep --only-matching --max-count=1 --extended-regexp '\b[0-9]+\.[0-9]+')" >> "$GITHUB_OUTPUT"
163+
# yamllint enable rule:line-length
162164

163165
- name: Determine PHPUnit composer script to use
164166
id: phpunit_script
165167
run: |
166-
if [ "${{ startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) || startsWith( steps.phpunit_version.outputs.VERSION, '11.' ) }}" == "true" ]; then
168+
if [ "${{ startsWith( steps.phpunit_version.outputs.VERSION, '11.' ) }}" == "true" ]; then
169+
echo 'SUFFIX=' >> "$GITHUB_OUTPUT"
170+
elif [ "${{ startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) }}" == "true" ]; then
167171
echo 'SUFFIX=' >> "$GITHUB_OUTPUT"
168172
else
169173
echo 'SUFFIX=-lte9' >> "$GITHUB_OUTPUT"

.github/workflows/update-website.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ jobs:
9494
build_dir: 'deploy'
9595
target_branch: 'gh-pages'
9696
keep_history: true
97-
#allow_empty_commit: false # Turn on after verification that it all works as expected.
97+
allow_empty_commit: false
9898
jekyll: true
9999
commit_message: ${{ steps.commit_msg.outputs.MSG }}
100100
dry_run: ${{ steps.base_branch.outputs.BRANCH != 'stable' }}
101-
verbose: ${{ matrix.verbose }}
101+
verbose: false
102102
env:
103103
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
build/
22
deploy/
3+
node_modules/
34
vendor/
45
composer.lock
56
.phpcs.xml

.markdownlint-cli2.yaml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
#
2+
# Configuration file for MarkdownLint-CLI2.
3+
#
4+
# Example file with all options:
5+
# https://github.com/DavidAnson/markdownlint-cli2/blob/main/test/markdownlint-cli2-yaml-example/.markdownlint-cli2.yaml
6+
#
7+
8+
# Do not fix any fixable errors.
9+
fix: false
10+
11+
# Define glob expressions to use (only valid at root).
12+
globs:
13+
- "**/*.md"
14+
- ".github/**/*.md"
15+
16+
# Show found files on stdout (only valid at root)
17+
showFound: true
18+
19+
# Define glob expressions to ignore.
20+
ignores:
21+
- "node_modules/"
22+
- "vendor/"
23+
24+
# Disable inline config comments.
25+
noInlineConfig: true
26+
27+
# Disable progress on stdout (only valid at root).
28+
noProgress: false
29+
30+
# Adjust the configuration for some built-in rules.
31+
# For full information on the options and defaults, see:
32+
# https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml
33+
config:
34+
######################
35+
# Disable a few rules.
36+
######################
37+
# MD031/blanks-around-fences - Fenced code blocks should be surrounded by blank lines.
38+
MD031: false
39+
# MD032/blanks-around-lists - Lists should be surrounded by blank lines.
40+
MD032: false
41+
42+
##############################
43+
# Customize a few other rules.
44+
##############################
45+
# MD003/heading-style/header-style - Heading style.
46+
MD003:
47+
# Heading style - Always use hashes.
48+
style: "atx"
49+
50+
# MD004/ul-style - Unordered list style.
51+
MD004:
52+
# List style - each level has a different, but consistent symbol.
53+
style: "sublist"
54+
55+
# MD007/ul-indent - Unordered list indentation.
56+
MD007:
57+
indent: 4
58+
# Whether to indent the first level of the list.
59+
start_indented: false
60+
61+
# MD012/no-multiple-blanks - Multiple consecutive blank lines.
62+
MD012:
63+
maximum: 2
64+
65+
# MD013/line-length - Line length.
66+
MD013:
67+
# Number of characters. No need for being too fussy.
68+
line_length: 1000
69+
# Number of characters for headings.
70+
heading_line_length: 100
71+
# Number of characters for code blocks.
72+
code_block_line_length: 140
73+
# Stern length checking (applies to tables, code blocks etc which have their own max line length).
74+
stern: true
75+
76+
# MD022/blanks-around-headings : Headings should be surrounded by blank lines.
77+
MD022:
78+
# Blank lines above heading
79+
lines_above: [2, 1, 1, 1, 1]
80+
# Blank lines below heading
81+
lines_below: [1, 1, -1, -1, -1]
82+
83+
# MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content.
84+
MD024:
85+
# Only check sibling headings.
86+
siblings_only: true
87+
88+
# MD033/no-inline-html - Inline HTML.
89+
MD033:
90+
# Allowed elements.
91+
allowed_elements:
92+
- div
93+
- details
94+
- summary
95+
- b
96+
- code
97+
- ul
98+
- li
99+
100+
# MD044/proper-names - Proper names should have the correct capitalization.
101+
MD044:
102+
# List of proper names.
103+
names: ["PHPDevTools", "PHPCSUtils", "PHP", "PHP_CodeSniffer", "CodeSniffer", "PHPUnit"]
104+
# Include code blocks.
105+
code_blocks: false
106+
107+
# MD046/code-block-style - Code block style
108+
MD046:
109+
style: "fenced"
110+
111+
# MD048/code-fence-style - Code fence style
112+
MD048:
113+
style: "backtick"
114+
115+
# MD049/emphasis-style - Emphasis style should be consistent
116+
MD049:
117+
style: "underscore"
118+
119+
# MD050/strong-style - Strong style should be consistent
120+
MD050:
121+
style: "asterisk"

.remarkignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Ignore rules for Remark.
2+
# Docs: https://github.com/unifiedjs/unified-engine/blob/HEAD/doc/ignore.md
3+
4+
/node_modules/
5+
/vendor/

.remarkrc

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"plugins": [
3+
"remark-gfm",
4+
["remark-lint-checkbox-character-style", "consistent"],
5+
["remark-lint-checkbox-content-indent", "consistent"],
6+
"remark-lint-definition-spacing",
7+
"remark-lint-file-extension",
8+
["remark-lint-linebreak-style", "unix"],
9+
["remark-lint-link-title-style", "\""],
10+
["remark-lint-ordered-list-marker-style", "."],
11+
[
12+
"remark-lint-no-dead-urls",
13+
{
14+
"skipUrlPatterns": [
15+
"https://packagist.org/packages/phpcsstandards/phpcsdevtools#dev-develop"
16+
],
17+
"deadOrAliveOptions": {
18+
"maxRetries": 3
19+
}
20+
}
21+
],
22+
"remark-lint-no-duplicate-defined-urls",
23+
"remark-lint-no-duplicate-definitions",
24+
"remark-lint-no-empty-url",
25+
"remark-lint-no-file-name-consecutive-dashes",
26+
["remark-lint-no-file-name-irregular-characters", "\\.a-zA-Z0-9_-"],
27+
"remark-lint-no-file-name-outer-dashes",
28+
"remark-lint-no-heading-like-paragraph",
29+
"remark-lint-no-literal-urls",
30+
"remark-lint-no-reference-like-url",
31+
"remark-lint-no-shortcut-reference-image",
32+
"remark-lint-no-table-indentation",
33+
"remark-lint-no-undefined-references",
34+
"remark-lint-no-unneeded-full-reference-image",
35+
"remark-lint-no-unneeded-full-reference-link",
36+
"remark-lint-no-unused-definitions",
37+
["remark-lint-strikethrough-marker", "~~"],
38+
["remark-lint-table-cell-padding", "consistent"],
39+
"remark-lint-heading-whitespace",
40+
"remark-lint-list-item-punctuation",
41+
"remark-lint-match-punctuation",
42+
"remark-lint-no-hr-after-heading",
43+
"remark-lint-are-links-valid-duplicate",
44+
"remark-validate-links"
45+
]
46+
}

.yamllint.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Details on the default config:
2+
# https://yamllint.readthedocs.io/en/stable/configuration.html#default-configuration
3+
extends: default
4+
5+
yaml-files:
6+
- '*.yaml'
7+
- '*.yml'
8+
- '.yamllint'
9+
- 'phpstan.neon*'
10+
11+
# Rule documentation: https://yamllint.readthedocs.io/en/stable/rules.html
12+
rules:
13+
colons:
14+
max-spaces-after: -1 # Disabled to allow aligning of values.
15+
comments:
16+
min-spaces-from-content: 1
17+
comments-indentation: {}
18+
document-start:
19+
present: false
20+
line-length:
21+
max: 145
22+
truthy:
23+
allowed-values: ["true", "false", "on", "off"]

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Change Log for the PHPCSDevTools standard for PHP Codesniffer
1+
# Change Log for the PHPCSDevTools standard for PHP_CodeSniffer
22

33
All notable changes to this project will be documented in this file.
44

5-
This projects adheres to [Keep a CHANGELOG](http://keepachangelog.com/) and uses [Semantic Versioning](http://semver.org/).
5+
This projects adheres to [Keep a CHANGELOG](https://keepachangelog.com/) and uses [Semantic Versioning](https://semver.org/).
66

77

88
## [Unreleased]

0 commit comments

Comments
 (0)