Skip to content

Commit 76f8f10

Browse files
committed
Merge branch '5.next' into 6.x
2 parents fd79d9b + 19aff79 commit 76f8f10

219 files changed

Lines changed: 4560 additions & 4425 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/.markdownlint-cli2.jsonc

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
"config": {
3+
"default": true,
4+
"heading-increment": true,
5+
"no-hard-tabs": true,
6+
"no-multiple-blanks": true,
7+
"line-length": false,
8+
"commands-show-output": true,
9+
"blanks-around-headings": true,
10+
"heading-start-left": true,
11+
"no-duplicate-heading": false,
12+
"single-h1": false,
13+
"no-trailing-punctuation": false,
14+
"no-blanks-blockquote": false,
15+
"list-marker-space": true,
16+
"blanks-around-fences": true,
17+
"blanks-around-lists": true,
18+
"no-inline-html": {
19+
"allowed_elements": [
20+
"Badge",
21+
"div",
22+
"span",
23+
"br",
24+
"style",
25+
"details",
26+
"summary",
27+
"table",
28+
"thead",
29+
"tbody",
30+
"tr",
31+
"th",
32+
"td",
33+
"img",
34+
"a",
35+
"svg",
36+
"path",
37+
"figure",
38+
"p",
39+
"colgroup",
40+
"col",
41+
"strong",
42+
"sup",
43+
"section",
44+
"hr",
45+
"ol",
46+
"ul",
47+
"li",
48+
"em",
49+
"code"
50+
]
51+
},
52+
"no-bare-urls": true,
53+
"fenced-code-language": true,
54+
"first-line-heading": false,
55+
"code-block-style": false,
56+
"code-fence-style": {
57+
"style": "backtick"
58+
},
59+
"emphasis-style": {
60+
"style": "asterisk"
61+
},
62+
"strong-style": {
63+
"style": "asterisk"
64+
},
65+
"spaces-after-emphasis-marker": true,
66+
"spaces-after-code-fence-info": true,
67+
"spaces-inside-emphasis-markers": true,
68+
"spaces-inside-code-span-elements": true,
69+
"single-trailing-newline": true,
70+
"link-fragments": false,
71+
"table-pipe-style": "leading_and_trailing",
72+
"table-column-count": false,
73+
"table-column-style": false,
74+
"descriptive-link-text": false,
75+
"no-emphasis-as-heading": false
76+
},
77+
"customRules": [
78+
"./markdownlint-rules/no-space-after-fence.js"
79+
],
80+
"ignores": [
81+
"node_modules/**"
82+
]
83+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
"use strict";
2+
3+
module.exports = {
4+
names: ["no-space-after-fence"],
5+
description: "Disallow spaces between a fence and the info string.",
6+
tags: ["code", "fences", "whitespace"],
7+
function: function noSpaceAfterFence(params, onError) {
8+
const lines = params.lines || [];
9+
10+
(params.tokens || []).forEach((token) => {
11+
if (token.type !== "fence") {
12+
return;
13+
}
14+
15+
if (!token.markup || token.markup[0] !== "`") {
16+
return;
17+
}
18+
19+
if (!token.map || token.map.length === 0) {
20+
return;
21+
}
22+
23+
const lineNumber = token.map[0] + 1;
24+
const line = lines[lineNumber - 1] || "";
25+
26+
if (/^\s*`{3,}[ \t]+\S/.test(line)) {
27+
onError({
28+
lineNumber,
29+
detail: "Remove the space between the fence and the info string.",
30+
context: line.trim()
31+
});
32+
}
33+
});
34+
}
35+
};

.github/markdownlint.json

Lines changed: 0 additions & 75 deletions
This file was deleted.

.github/workflows/docs-validation.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,10 @@ jobs:
5757
uses: actions/checkout@v6
5858

5959
- name: Lint markdown files
60-
uses: articulate/actions-markdownlint@v1
60+
uses: DavidAnson/markdownlint-cli2-action@v22
6161
with:
62-
config: .github/markdownlint.json
63-
files: 'docs/**/*.md'
64-
ignore: 'node_modules'
62+
config: './.github/.markdownlint-cli2.jsonc'
63+
globs: 'docs/**/*.md'
6564

6665
spell-check:
6766
name: Spell Check

docs/en/appendices/5-0-migration-guide.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -225,15 +225,15 @@ high memory usage due to the entire result set being buffered in memory.
225225

226226
You can work around this issue by disabling results buffering for the query:
227227

228-
``` php
228+
```php
229229
$results = $articles->find()
230230
->disableBufferedResults()
231231
->all();
232232
```
233233

234234
Depending on your use case, you may also consider using disabling hydration:
235235

236-
``` php
236+
```php
237237
$results = $articles->find()
238238
->disableHydration()
239239
->all();
@@ -350,7 +350,7 @@ properties more strictly. The new behavior is called 'required fields'. When
350350
enabled, accessing properties that are not defined in the entity will raise
351351
exceptions. This impacts the following usage:
352352

353-
``` php
353+
```php
354354
$entity->get();
355355
$entity->has();
356356
$entity->getOriginal();
@@ -368,7 +368,7 @@ this the default behavior in the future.
368368
Table finders can now have typed arguments as required instead of an options array.
369369
For e.g. a finder for fetching posts by category or user:
370370

371-
``` php
371+
```php
372372
public function findByCategoryOrUser(SelectQuery $query, array $options): SelectQuery
373373
{
374374
if (isset($options['categoryId'])) {
@@ -384,7 +384,7 @@ public function findByCategoryOrUser(SelectQuery $query, array $options): Select
384384

385385
can now be written as:
386386

387-
``` php
387+
```php
388388
public function findByCategoryOrUser(SelectQuery $query, ?int $categoryId = null, ?int $userId = null): SelectQuery
389389
{
390390
if ($categoryId) {
@@ -404,7 +404,7 @@ You can even include the special named arguments for setting query clauses.
404404

405405
A similar change has been applied to the `RepositoryInterface::get()` method:
406406

407-
``` php
407+
```php
408408
public function view(int $id)
409409
{
410410
$author = $this->Authors->get($id, [
@@ -416,7 +416,7 @@ public function view(int $id)
416416

417417
can now be written as:
418418

419-
``` php
419+
```php
420420
public function view(int $id)
421421
{
422422
$author = $this->Authors->get($id, contain: ['Books'], finder: 'latest');

docs/en/appendices/5-0-upgrade-guide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ First, check that your application is running on latest CakePHP 4.x version.
1111

1212
Once your application is running on latest CakePHP 4.x, enable deprecation warnings in **config/app.php**:
1313

14-
``` php
14+
```php
1515
'Error' => [
1616
'errorLevel' => E_ALL,
1717
],
@@ -43,7 +43,7 @@ Because CakePHP 5 leverages union types and `mixed`, there are many
4343
backwards incompatible changes concerning method signatures and file renames.
4444
To help expedite fixing these tedious changes there is an upgrade CLI tool:
4545

46-
``` bash
46+
```bash
4747
# Install the upgrade tool
4848
git clone https://github.com/cakephp/upgrade
4949
cd upgrade
@@ -54,7 +54,7 @@ composer install --no-dev
5454
With the upgrade tool installed you can now run it on your application or
5555
plugin:
5656

57-
``` bash
57+
```bash
5858
bin/cake upgrade rector --rules cakephp50 <path/to/app/src>
5959
bin/cake upgrade rector --rules chronos3 <path/to/app/src>
6060
```

docs/en/appendices/5-1-migration-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The [upgrade tool](../appendices/migration-guides) provides rector rules for
1515
automating some of the migration work. Run rector before updating your
1616
`composer.json` dependencies:
1717

18-
``` bash
18+
```bash
1919
bin/cake upgrade rector --rules cakephp51 <path/to/app/src>
2020
```
2121

docs/en/appendices/5-2-migration-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The [upgrade tool](../appendices/migration-guides) provides rector rules for
1515
automating some of the migration work. Run rector before updating your
1616
`composer.json` dependencies:
1717

18-
``` bash
18+
```bash
1919
bin/cake upgrade rector --rules cakephp52 <path/to/app/src>
2020
```
2121

docs/en/appendices/5-3-migration-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The [upgrade tool](../appendices/migration-guides) provides rector rules for
1515
automating some of the migration work. Run rector before updating your
1616
`composer.json` dependencies:
1717

18-
``` bash
18+
```bash
1919
bin/cake upgrade rector --rules cakephp53 <path/to/app/src>
2020
```
2121

0 commit comments

Comments
 (0)