Skip to content

Commit dd8987e

Browse files
authored
Fix code block language tags for proper syntax highlighting (#8189)
Replace ``` text with appropriate language tags (php, bash, html) across 34 documentation files to enable proper syntax highlighting. Blocks that are genuinely plain text (URL patterns, crontab entries, ICU format syntax, print_r output) are intentionally left as text.
1 parent c535242 commit dd8987e

34 files changed

+99
-99
lines changed

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

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

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

9-
``` text
9+
``` php
1010
'Error' => [
1111
'errorLevel' => E_ALL,
1212
]
@@ -49,7 +49,7 @@ composer install --no-dev
4949
With the upgrade tool installed you can now run it on your application or
5050
plugin:
5151

52-
``` text
52+
``` bash
5353
bin/cake upgrade rector --rules cakephp50 <path/to/app/src>
5454
bin/cake upgrade rector --rules chronos3 <path/to/app/src>
5555
```

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

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

13-
``` text
13+
``` bash
1414
bin/cake upgrade rector --rules cakephp51 <path/to/app/src>
1515
```
1616

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

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

13-
``` text
13+
``` bash
1414
bin/cake upgrade rector --rules cakephp52 <path/to/app/src>
1515
```
1616

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

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

13-
``` text
13+
``` bash
1414
bin/cake upgrade rector --rules cakephp53 <path/to/app/src>
1515
```
1616

docs/en/appendices/glossary.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ columns. Often used in conjunction with the FormHelper.
5656
HTML attributes
5757
An array of key =\> values that are composed into HTML attributes. For example:
5858

59-
``` text
59+
``` php
6060
// Given
6161
['class' => 'my-class', 'target' => '_blank']
6262

@@ -67,7 +67,7 @@ class="my-class" target="_blank"
6767
If an option can be minimized or accepts its name as the value, then `true`
6868
can be used:
6969

70-
``` text
70+
``` php
7171
// Given
7272
['checked' => true]
7373

@@ -87,7 +87,7 @@ plugin syntax
8787
Plugin syntax refers to the dot separated class name indicating classes
8888
are part of a plugin:
8989

90-
``` text
90+
``` php
9191
// The plugin is "DebugKit", and the class name is "Toolbar".
9292
'DebugKit.Toolbar'
9393

docs/en/appendices/migration-guides.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ method renames and signature updates.
1212

1313
To use the upgrade tool:
1414

15-
``` text
15+
``` bash
1616
# Install the upgrade tool
1717
git clone https://github.com/cakephp/upgrade
1818
cd upgrade

docs/en/console-commands/cache.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
To help you better manage cached data from a CLI environment, a console command
44
is available for clearing cached data your application has:
55

6-
``` text
6+
``` bash
77
// Clear one cache config
88
bin/cake cache clear <configname>
99

docs/en/console-commands/commands.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ CakePHP will use conventions to generate the name your commands use on the
9191
command line. If you want to overwrite the generated name implement the
9292
`defaultName()` method in your command:
9393

94-
``` text
94+
``` php
9595
public static function defaultName(): string
9696
{
9797
return 'oh_hi';

docs/en/contributing/backwards-compatibility.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ locate code that needs to be updated before it breaks. If you wish to disable
272272
runtime warnings you can do so using the `Error.errorLevel` configuration
273273
value:
274274

275-
``` text
275+
``` php
276276
// in config/app.php
277277
// ...
278278
'Error' => [

docs/en/contributing/cakephp-coding-conventions.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Four spaces will be used for indentation.
3232

3333
So, indentation should look like this:
3434

35-
``` text
35+
``` php
3636
// base level
3737
// level 1
3838
// level 2
@@ -98,7 +98,7 @@ In short:
9898
Control structures are for example "`if`", "`for`", "`foreach`",
9999
"`while`", "`switch`" etc. Below, an example with "`if`":
100100

101-
``` text
101+
``` php
102102
if ((expr_1) || (expr_2)) {
103103
// action_1;
104104
} elseif (!(expr_3) && (expr_4)) {
@@ -368,7 +368,7 @@ tags:
368368
PhpDoc tags are very much like JavaDoc tags in Java. Tags are only processed if
369369
they are the first thing in a DocBlock line, for example:
370370

371-
``` text
371+
``` php
372372
/**
373373
* Tag example.
374374
*
@@ -377,7 +377,7 @@ they are the first thing in a DocBlock line, for example:
377377
*/
378378
```
379379

380-
``` text
380+
``` php
381381
/**
382382
* Example of inline phpDoc tags.
383383
*
@@ -467,7 +467,7 @@ public function foo()
467467
`include`, `require`, `include_once` and `require_once` do not have
468468
parentheses:
469469

470-
``` text
470+
``` php
471471
// wrong = parentheses
472472
require_once('ClassFileName.php');
473473
require_once ($class);
@@ -491,7 +491,7 @@ The short echo should be used in template files in place of `<?php echo`. It
491491
should be immediately followed by a single space, the variable or function value
492492
to `echo`, a single space, and the php closing tag:
493493

494-
``` text
494+
``` php
495495
// wrong = semicolon, no spaces
496496
<td><?=$name;?></td>
497497

@@ -593,22 +593,22 @@ of `floatval($var)` when applicable.
593593

594594
Constants should be defined in capital letters:
595595

596-
``` text
596+
``` php
597597
define('CONSTANT', 1);
598598
```
599599

600600
If a constant name consists of multiple words, they should be separated by an
601601
underscore character, for example:
602602

603-
``` text
603+
``` php
604604
define('LONG_NAMED_CONSTANT', 2);
605605
```
606606

607607
### Enums
608608

609609
Enum cases are defined in `CamelCase` style:
610610

611-
``` text
611+
``` php
612612
enum ArticleStatus: string
613613
{
614614
case Published = 'Y';

0 commit comments

Comments
 (0)