Skip to content

Commit 3b59ade

Browse files
authored
Merge pull request #101 from Yoast/1.x
Release version 1.0.5
2 parents 3c621ff + 494749c commit 3b59ade

22 files changed

+752
-191
lines changed

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
/.gitignore export-ignore
1010
/.cache/ export-ignore
1111
/.github/ export-ignore
12+
/.markdownlint-cli2.yaml export-ignore
1213
/.phpcs.xml.dist export-ignore
14+
/.remarkignore export-ignore
15+
/.remarkrc export-ignore
1316
/phpunit.xml.dist export-ignore
1417
/tests/ export-ignore
1518

.github/RELEASE-CHECKLIST.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,30 @@
1-
Template to use for release PRs from `develop` to `main`
1+
Template to use for release PRs from `#.x` to `main`
22
===========================================================
33

44
Title: Release version x.x.x
55

6-
### Functional:
6+
<!--
7+
If both a 1.x and a 2.x release are to be tagged, always tag the 1.x release first!
8+
-->
9+
10+
## Functional
711
- [ ] Confirm that the most recent PHPUnit changelogs have been checked and that the library is still feature complete for those versions supported within the PHPUnit version constraints.
812
- [ ] Update the `VERSION` constant in the `phpunitpolyfills-autoload.php` file.
913
- [ ] Composer: check if any dependencies/version constraints need updating.
1014

11-
### Release:
15+
## Release
1216
- [ ] Add changelog for the release - PR #xxx
1317
Verify that a release link at the bottom of the `CHANGELOG.md` file has been added.
1418
- [ ] Merge this PR.
1519
- [ ] Make sure all CI builds are green.
16-
- [ ] Tag the release (careful, GH defaults to `develop`!).
17-
- [ ] Create a release from the tag (careful, GH defaults to `develop`!) & copy & paste the changelog to it.
20+
- [ ] Tag the release (careful, GH defaults to `2.x`!).
21+
- [ ] Create a release from the tag (careful, GH defaults to `2.x`!) & copy & paste the changelog to it.
1822
Make sure to copy the links to the issues and the links to the GH usernames from the bottom of the changelog!
1923
- [ ] Close the milestone.
2024
- [ ] Open a new milestone for the next release.
2125
- [ ] If any open PRs/issues which were milestoned for the release did not make it into the release, update their milestone.
2226

23-
### Announce:
27+
## Announce
2428
- [ ] Tweet about the release.
2529

2630

.github/workflows/cs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ jobs:
3434
- name: Install Composer dependencies
3535
uses: "ramsey/composer-install@v2"
3636
with:
37-
# Bust the cache at least once a month - output format: YYYY-MM-DD.
38-
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")
37+
# Bust the cache at least once a month - output format: YYYY-MM.
38+
custom-cache-suffix: $(date -u "+%Y-%m")
3939

4040
# Validate the composer.json file.
4141
# @link https://getcomposer.org/doc/03-cli.md#validate
@@ -45,7 +45,7 @@ jobs:
4545
# Check the code-style consistency of the PHP files.
4646
- name: Check PHP code style
4747
id: phpcs
48-
run: composer check-cs -- --report-full --report-checkstyle=./phpcs-report.xml
48+
run: composer check-cs -- --no-cache --report-full --report-checkstyle=./phpcs-report.xml
4949

5050
- name: Show PHPCS results in PR
5151
if: ${{ always() && steps.phpcs.outcome == 'failure' }}

.github/workflows/lint.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ jobs:
2020

2121
strategy:
2222
matrix:
23-
php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
23+
php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
24+
25+
continue-on-error: ${{ matrix.php == '8.3' }}
2426

2527
name: "Lint: PHP ${{ matrix.php }}"
2628

@@ -40,11 +42,20 @@ jobs:
4042

4143
# Install dependencies and handle caching in one go.
4244
# @link https://github.com/marketplace/actions/install-composer-dependencies
43-
- name: Install Composer dependencies
45+
- name: Install Composer dependencies - normal
46+
if: matrix.php != '8.3'
47+
uses: "ramsey/composer-install@v2"
48+
with:
49+
# Bust the cache at least once a month - output format: YYYY-MM.
50+
custom-cache-suffix: $(date -u "+%Y-%m")
51+
52+
- name: Install Composer dependencies - ignore PHP restrictions
53+
if: matrix.php == '8.3'
4454
uses: "ramsey/composer-install@v2"
4555
with:
46-
# Bust the cache at least once a month - output format: YYYY-MM-DD.
47-
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")
56+
composer-options: --ignore-platform-req=php+
57+
# Bust the cache at least once a month - output format: YYYY-MM.
58+
custom-cache-suffix: $(date -u "+%Y-%m")
4859

4960
- name: "Lint PHP files against parse errors - PHP < 7.0"
5061
if: ${{ matrix.php < 7.0 }}

.github/workflows/markdown.yml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
name: MarkDown
2+
3+
on:
4+
# Run on all pushes and on all pull requests.
5+
push:
6+
pull_request:
7+
# Also run this workflow every Monday at 6:00.
8+
schedule:
9+
- cron: '0 6 * * 1'
10+
# Allow manually triggering the workflow.
11+
workflow_dispatch:
12+
13+
# Cancels all previous workflow runs for the same branch that have not yet completed.
14+
concurrency:
15+
# The concurrency group contains the workflow name and the branch name.
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
markdownlint:
21+
name: 'Lint Markdown'
22+
runs-on: ubuntu-latest
23+
24+
# Don't run the cronjob in this workflow on forks.
25+
if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'Yoast')
26+
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v3
30+
31+
# This action also handles the caching of the dependencies.
32+
# https://github.com/actions/setup-node
33+
- name: Set up node and enable caching of dependencies
34+
uses: actions/setup-node@v3
35+
with:
36+
node-version: '16'
37+
38+
# @link https://github.com/DavidAnson/markdownlint-cli2
39+
# @link https://github.com/DavidAnson/markdownlint
40+
- name: Install Markdownlint CLI2
41+
run: npm install -g markdownlint-cli2
42+
43+
# @link https://github.com/marketplace/actions/problem-matcher-for-markdownlint-cli
44+
- name: Enable showing issue in PRs
45+
uses: xt0rted/markdownlint-problem-matcher@v2
46+
47+
- name: Check markdown with CLI2
48+
run: markdownlint-cli2
49+
50+
remark:
51+
name: 'QA Markdown'
52+
runs-on: ubuntu-latest
53+
54+
# Don't run the cronjob in this workflow on forks.
55+
if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'Yoast')
56+
57+
steps:
58+
- name: Checkout code
59+
uses: actions/checkout@v3
60+
61+
- name: Set up node and enable caching of dependencies
62+
uses: actions/setup-node@v3
63+
with:
64+
node-version: '16'
65+
66+
# To make the command available on CLI, it needs to be installed globally.
67+
- name: Install Remark CLI globally
68+
run: npm install --global remark-cli --foreground-scripts true --fund false
69+
70+
# To allow for creating a custom config which references rules which are included
71+
# in the presets, without having to install all rules individually, a local install
72+
# works best (and installing the presets in the first place, of course).
73+
#
74+
# Note: the first group of packages are all part of the mono "Remark lint" repo.
75+
# The second group of packages (heading-whitespace and down) are additional
76+
# "external" rules/plugins.
77+
- name: Install Remark rules locally
78+
run: >
79+
npm install --foreground-scripts true --fund false
80+
remark-lint
81+
remark-gfm
82+
remark-preset-lint-consistent
83+
remark-preset-lint-recommended
84+
remark-preset-lint-markdown-style-guide
85+
remark-lint-checkbox-content-indent
86+
remark-lint-linebreak-style
87+
remark-lint-no-empty-url
88+
remark-lint-no-heading-like-paragraph
89+
remark-lint-no-reference-like-url
90+
remark-lint-no-unneeded-full-reference-image
91+
remark-lint-no-unneeded-full-reference-link
92+
remark-lint-strikethrough-marker
93+
remark-lint-heading-whitespace
94+
remark-lint-list-item-punctuation
95+
remark-lint-match-punctuation
96+
remark-lint-no-hr-after-heading
97+
remark-lint-are-links-valid-alive
98+
remark-lint-are-links-valid-duplicate
99+
remark-validate-links
100+
101+
- name: Run Remark-lint
102+
run: remark . --frail
103+
104+
# @link https://github.com/reviewdog/action-remark-lint
105+
- name: Show Remark-lint annotations in PR
106+
if: ${{ failure() && github.event_name == 'pull_request' }}
107+
uses: reviewdog/action-remark-lint@v5
108+
with:
109+
fail_on_error: true
110+
install_deps: false
111+
level: info
112+
reporter: github-pr-check

.github/workflows/test.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,18 @@ jobs:
5858
- php: '8.1'
5959
phpunit: '9.3.0'
6060
experimental: false
61+
- php: '8.2'
62+
phpunit: '9.3.0'
63+
experimental: false
6164

6265
# Experimental builds.
66+
- php: '8.3'
67+
phpunit: 'auto' # PHPUnit 9.x.
68+
experimental: true
69+
6370
- php: '8.1'
6471
phpunit: '^10.0'
6572
experimental: true
66-
6773
- php: '8.2'
6874
phpunit: '^10.0'
6975
experimental: true
@@ -89,11 +95,20 @@ jobs:
8995

9096
# Install dependencies and handle caching in one go.
9197
# @link https://github.com/marketplace/actions/install-composer-dependencies
92-
- name: Install Composer dependencies
98+
- name: Install Composer dependencies - normal
99+
if: matrix.php != '8.3'
100+
uses: "ramsey/composer-install@v2"
101+
with:
102+
# Bust the cache at least once a month - output format: YYYY-MM.
103+
custom-cache-suffix: $(date -u "+%Y-%m")
104+
105+
- name: Install Composer dependencies - ignore PHP restrictions
106+
if: matrix.php == '8.3'
93107
uses: "ramsey/composer-install@v2"
94108
with:
95-
# Bust the cache at least once a month - output format: YYYY-MM-DD.
96-
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")
109+
composer-options: --ignore-platform-req=php+
110+
# Bust the cache at least once a month - output format: YYYY-MM.
111+
custom-cache-suffix: $(date -u "+%Y-%m")
97112

98113
- name: Run the unit tests
99114
if: ${{ matrix.phpunit != '^10.0' }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/composer.lock
2+
node_modules/
23
vendor/
34
/.phpcs.xml
45
/phpcs.xml

.markdownlint-cli2.yaml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
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+
# Define glob expressions to ignore.
17+
ignores:
18+
- "node_modules/"
19+
- "vendor/"
20+
21+
# Disable inline config comments.
22+
noInlineConfig: true
23+
24+
# Disable progress on stdout (only valid at root).
25+
noProgress: false
26+
27+
# Adjust the configuration for some built-in rules.
28+
# For full information on the options and defaults, see:
29+
# https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml
30+
config:
31+
######################
32+
# Disable a few rules.
33+
######################
34+
# MD003/heading-style/header-style - Heading style.
35+
MD003: false
36+
# MD031/blanks-around-fences - Fenced code blocks should be surrounded by blank lines.
37+
MD031: false
38+
# MD032/blanks-around-lists - Lists should be surrounded by blank lines.
39+
MD032: false
40+
41+
##############################
42+
# Customize a few other rules.
43+
##############################
44+
# MD004/ul-style - Unordered list style.
45+
MD004:
46+
# List style - each level has a different, but consistent symbol.
47+
style: "sublist"
48+
49+
# MD007/ul-indent - Unordered list indentation.
50+
MD007:
51+
indent: 4
52+
# Whether to indent the first level of the list.
53+
start_indented: false
54+
55+
# MD012/no-multiple-blanks - Multiple consecutive blank lines.
56+
MD012:
57+
maximum: 2
58+
59+
# MD013/line-length - Line length.
60+
MD013:
61+
# Number of characters. No need for being too fussy.
62+
line_length: 1000
63+
# Number of characters for headings.
64+
heading_line_length: 105
65+
# Number of characters for code blocks.
66+
code_block_line_length: 100
67+
# Stern length checking (applies to tables, code blocks etc which have their own max line length).
68+
stern: true
69+
70+
# MD022/blanks-around-headings/blanks-around-headers - Headings should be surrounded by blank lines
71+
MD022:
72+
# Blank lines below heading
73+
lines_below: false
74+
75+
# MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content.
76+
MD024:
77+
# Only check sibling headings.
78+
siblings_only: true
79+
80+
# MD033/no-inline-html - Inline HTML.
81+
MD033:
82+
# Allowed elements.
83+
allowed_elements:
84+
- br
85+
86+
# MD044/proper-names - Proper names should have the correct capitalization.
87+
MD044:
88+
# List of proper names.
89+
names: ["PHPUnit"]
90+
# Include code blocks.
91+
code_blocks: false
92+
93+
# MD046/code-block-style - Code block style
94+
MD046:
95+
style: "fenced"
96+
97+
# MD048/code-fence-style - Code fence style
98+
MD048:
99+
style: "backtick"
100+
101+
# MD049/emphasis-style - Emphasis style should be consistent
102+
MD049:
103+
style: "underscore"
104+
105+
# MD050/strong-style - Strong style should be consistent
106+
MD050:
107+
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/

0 commit comments

Comments
 (0)