Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions docs/en/404.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
orphan
True

# Not Found

The page you're looking for cannot be found. Try using the search bar to find
Expand Down
4 changes: 2 additions & 2 deletions docs/en/appendices/5-0-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ changes made:

### Auth

- <span class="title-ref">Auth</span> has been removed. Use the [cakephp/authentication](https://book.cakephp.org/authentication/3/en/index.html) and
- `Auth` has been removed. Use the [cakephp/authentication](https://book.cakephp.org/authentication/3/en/index.html) and
[cakephp/authorization](https://book.cakephp.org/authorization/3/en/index.html) plugins instead.

### Cache
Expand Down Expand Up @@ -166,7 +166,7 @@ changes made:

### I18n

- `FrozenDate` was renamed to <span class="title-ref">Date</span> and `FrozenTime` was renamed to <span class="title-ref">DateTime</span>.
- `FrozenDate` was renamed to `Date` and `FrozenTime` was renamed to `DateTime`.
- `Time` now extends `Cake\Chronos\ChronosTime` and is therefore immutable.
- `Date` objects do not extend `DateTimeInterface` anymore - therefore you can't compare them with `DateTime` objects.
See the [cakephp/chronos release documentation](https://github.com/cakephp/chronos/releases/tag/3.0.2) for more information.
Expand Down
2 changes: 1 addition & 1 deletion docs/en/appendices/5-3-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ If you are not running on **PHP 8.2 or higher**, you will need to upgrade PHP be
### Core

- Added `Configure` attribute to support injecting `Configure` values into
constructor arguments. See ref:\`configure-dependency-injection\`.
constructor arguments. See [Configure Dependency Injection](../development/dependency-injection#configure-dependency-injection).

### Database

Expand Down
2 changes: 1 addition & 1 deletion docs/en/appendices/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ A generic term used to describe both entity properties, or database
columns. Often used in conjunction with the FormHelper.

HTML attributes
An array of key =\> values that are composed into HTML attributes. For example:
An array of key => values that are composed into HTML attributes. For example:

``` php
// Given
Expand Down
2 changes: 1 addition & 1 deletion docs/en/console-commands/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Commands are provided a `ConsoleIo` instance when executed. This object allows
you to interact with `Cake\Console\ConsoleIo::out()` and
`Cake\Console\ConsoleIo::err()` to emit on `stdout`, and
`stderr`. Files can be created with overwrite confirmation with
`Cake\Console\ConsoleIo::createFile()`<span class="title-ref">. :ref:\`command-helpers</span>
`Cake\Console\ConsoleIo::createFile()`. [Command Helpers](../console-commands/input-output#command-helpers)
provide 'macros' for output generation. See the
[Command Input/Output](../console-commands/input-output) section for more information.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/console-commands/cron-jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ trivial to setup, for example:
You can see more info here: <https://en.wikipedia.org/wiki/Cron>

> [!TIP]
> Use `-q` (or <span class="title-ref">--quiet</span>) to silence any output for cronjobs.
> Use `-q` (or `--quiet`) to silence any output for cronjobs.

## Cron Jobs on Shared Hosting

Expand Down
4 changes: 2 additions & 2 deletions docs/en/console-commands/option-parsers.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ The `separator` option was added.
`method` Cake\\Console\\ConsoleOptionParser::**addArguments**(array $args): static

If you have an array with multiple arguments you can use
`$parser->addArguments()` to add multiple arguments at once. :
`$parser->addArguments()` to add multiple arguments at once.

``` php
$parser->addArguments([
Expand Down Expand Up @@ -167,7 +167,7 @@ The `separator` option was added.
`method` Cake\\Console\\ConsoleOptionParser::**addOptions**(array $options): static

If you have an array with multiple options you can use `$parser->addOptions()`
to add multiple options at once. :
to add multiple options at once.

``` php
$parser->addOptions([
Expand Down
4 changes: 0 additions & 4 deletions docs/en/contents.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,3 @@

- [Constants & Functions](core-libraries/global-constants-and-functions)
- [Appendices](appendices)

<div class="todolist">

</div>
6 changes: 3 additions & 3 deletions docs/en/contributing/cakephp-coding-conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,8 @@ public function foo($array)
### Anonymous Functions (Closures)

Defining anonymous functions follows the [PSR-12](https://www.php-fig.org/psr/psr-12/) coding style guide, where they are
declared with a space after the <span class="title-ref">function</span> keyword, and a space before and after
the <span class="title-ref">use</span> keyword:
declared with a space after the `function` keyword, and a space before and after
the `use` keyword:

``` php
$closure = function ($arg1, $arg2) use ($var1, $var2) {
Expand Down Expand Up @@ -507,7 +507,7 @@ The short echo tag (`<?=`) is always available regardless of the `short_open_tag

Write all functions in camelBack:

``` javascript
``` php
function longFunctionName()
{
}
Expand Down
2 changes: 1 addition & 1 deletion docs/en/controllers/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ The above would pass the array containing precision and randomGenerator to
### Using Other Components in your Component

Sometimes one of your components may need to use another component.
You can load other components by adding them to the <span class="title-ref">\$components</span> property:
You can load other components by adding them to the `$components` property:

``` php
// src/Controller/Component/CustomComponent.php
Expand Down
4 changes: 2 additions & 2 deletions docs/en/controllers/pagination.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ elements and URLs for pagination.
### Paginating the Same Model multiple Times

To paginate the same model multiple times within a single controller action you
need to define an alias for the model.:
need to define an alias for the model.

``` php
// In a controller action
Expand Down Expand Up @@ -387,7 +387,7 @@ public function index()

## Using a paginator class directly

You can also use a paginator directly.:
You can also use a paginator directly.

``` php
// Create a paginator
Expand Down
20 changes: 4 additions & 16 deletions docs/en/controllers/request-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ responses. The request object in CakePHP allows you to introspect an incoming
request, while the response object allows you to effortlessly create HTTP
responses from your controllers.

<div class="index">

\$this-\>request

</div>

<a id="cake-request"></a>

## Request
Expand Down Expand Up @@ -474,8 +468,8 @@ There are several built-in detectors that you can use:
- `is('ssl')` Check to see whether the request is via SSL.
- `is('flash')` Check to see whether the request has a User-Agent of Flash.
- `is('json')` Check to see whether the request URL has 'json' extension or the
<span class="title-ref">Accept</span> header is set to 'application/json'.
- `is('xml')` Check to see whether the request URL has 'xml' extension or the <span class="title-ref">Accept</span> header is set to
`Accept` header is set to 'application/json'.
- `is('xml')` Check to see whether the request URL has 'xml' extension or the `Accept` header is set to
'application/xml' or 'text/xml'.

`ServerRequest` also includes methods like
Expand Down Expand Up @@ -706,12 +700,6 @@ $query = $uri->getQuery();
$host = $uri->getHost();
```

<div class="index">

\$this-\>response

</div>

## Response

`class` Cake\\Http\\**Response**
Expand Down Expand Up @@ -772,7 +760,7 @@ public function sendFile($id)

As shown in the above example, you must pass the file path to the method.
CakePHP will send a proper content type header if it's a known file type listed
in <span class="title-ref">CakeHttpResponse::\$\_mimeTypes</span>. You can add new types prior to calling
in `Cake\Http\Response::$_mimeTypes`. You can add new types prior to calling
`Cake\Http\Response::withFile()` by using the
`Cake\Http\Response::withType()` method.

Expand Down Expand Up @@ -1118,7 +1106,7 @@ $response = $this->response->withVary('Accept-Language');

Compares the cache headers for the request object with the cache header from the
response and determines whether it can still be considered fresh. If so, deletes
the response content, and sends the <span class="title-ref">304 Not Modified</span> header:
the response content, and sends the `304 Not Modified` header:

``` php
// In a controller action.
Expand Down
2 changes: 1 addition & 1 deletion docs/en/core-libraries/email.md
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ $mailer->setTransport(new \Cake\Mailer\Transport\DebugTransport());
Configuration options can also be provided as a `DSN` string. This is
useful when working with environment variables or `PaaS` providers:

``` css
``` php
TransportFactory::setConfig('default', [
'url' => 'smtp://my@gmail.com:secret@smtp.gmail.com:587?tls=true',
]);
Expand Down
6 changes: 3 additions & 3 deletions docs/en/core-libraries/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ You can use this same approach to bind listener objects.
### Interacting with Existing Listeners

Assuming several event listeners have been registered the presence or absence
of a particular event pattern can be used as the basis of some action.:
of a particular event pattern can be used as the basis of some action.

``` php
// Attach listeners to EventManager.
Expand Down Expand Up @@ -469,8 +469,8 @@ $this->getEventManager()
The listeners of the `View.afterRender` callback should have the following
signature:

``` javascript
function (EventInterface $event, $viewFileName)
``` php
function (EventInterface $event, string $fileName)
```

Each value provided to the Event constructor will be converted into function
Expand Down
8 changes: 3 additions & 5 deletions docs/en/core-libraries/hash.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ a matching path is not found the default value will be returned.
[Hash Path Syntax](#hash-path-syntax). You can use extract to retrieve data from arrays
or object implementing `ArrayAccess` interface, along arbitrary paths
quickly without having to loop through the data structures. Instead you
use path expressions to qualify which elements you want returned :
use path expressions to qualify which elements you want returned:

``` php
// Common Usage:
Expand Down Expand Up @@ -777,8 +777,7 @@ $result = Hash::diff($a, $b);
This function merges two arrays and pushes the differences in
data to the bottom of the resultant array.

**Example 1**
:
**Example 1:**

``` php
$array1 = ['ModelOne' => ['id' => 1001, 'field_one' => 'a1.m1.f1', 'field_two' => 'a1.m1.f2']];
Expand All @@ -797,8 +796,7 @@ $res = Hash::mergeDiff($array1, $array2);
*/
```

**Example 2**
:
**Example 2:**

``` php
$array1 = ["a" => "b", 1 => 20938, "c" => "string"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ msgstr "J'ai {0,number} ans"

### Extract Pot Files with I18n Shell

To create the pot files from <span class="title-ref">\_\_()</span> and other internationalized types of
To create the pot files from `__()` and other internationalized types of
messages that can be found in the application code, you can use the i18n command.
Please read the [following chapter](../console-commands/i18n) to
learn more.
Expand Down Expand Up @@ -368,7 +368,7 @@ use the ICU matching aliases. Instead of writing:

You can do:

``` css
``` text
zero{No Results} one{One result} few{...} many{...} other{...}
```

Expand Down
6 changes: 3 additions & 3 deletions docs/en/core-libraries/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ Log::setConfig('otherFile', [

When configuring a log engine the `className` parameter is used to
locate and load the log handler. All of the other configuration
properties are passed to the log engine's constructor as an array. :
properties are passed to the log engine's constructor as an array.

``` php
namespace App\Log\Engine;
Expand Down Expand Up @@ -493,12 +493,12 @@ Write a message into all the configured loggers.

`static` Cake\\Log\\Log::**levels**(): array

Call this method without arguments, eg: <span class="title-ref">Log::levels()</span> to obtain current
Call this method without arguments, eg: `Log::levels()` to obtain current
level configuration.

### Convenience Methods

The following convenience methods were added to log <span class="title-ref">\$message</span> with the
The following convenience methods were added to log `$message` with the
appropriate log level.

#### Log::emergency()
Expand Down
4 changes: 2 additions & 2 deletions docs/en/core-libraries/number.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ retrieve the `intl.default_locale` ini value if set and `'en_US'` if not.

This method displays a number with the specified amount of
precision (decimal places). It will round in order to maintain the
level of precision defined. :
level of precision defined.

``` php
// Called as NumberHelper
Expand All @@ -142,7 +142,7 @@ echo Number::precision(456.91873645, 2);
Like `Cake\I18n\Number::precision()`, this method formats a number
according to the supplied precision (where numbers are rounded to meet the
given precision). This method also expresses the number as a percentage
and appends the output with a percent sign. :
and appends the output with a percent sign.

``` php
// Called as NumberHelper. Output: 45.69%
Expand Down
4 changes: 2 additions & 2 deletions docs/en/core-libraries/text.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ options are:

The UUID method is used to generate unique identifiers as per `4122`. The
UUID is a 128-bit string in the format of
`485fc381-e790-47a3-9794-1337c0a8fe68`. :
`485fc381-e790-47a3-9794-1337c0a8fe68`.

``` php
Text::uuid(); // 485fc381-e790-47a3-9794-1337c0a8fe68
Expand Down Expand Up @@ -407,7 +407,7 @@ Output:
Extracts an excerpt from `$text` surrounding the `$phrase` with a number
of characters on each side determined by `$radius`, and prefix/suffix with
`$ellipsis`. This method is especially handy for search results. The query
string or keywords can be shown within the resulting document. :
string or keywords can be shown within the resulting document.

``` php
// Called as TextHelper
Expand Down
2 changes: 1 addition & 1 deletion docs/en/core-libraries/validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ $validator
->notEmptyString('comment', 'You need to give a comment.');

$errors = $validator->validate($this->request->getData());
if (empty($errors)) {
if (!$errors) {
// Send an email.
}
```
Expand Down
18 changes: 3 additions & 15 deletions docs/en/development/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,6 @@ to configure a few things like your database credentials.
Additionally, there are optional configuration options that allow you to swap
out default values & implementations with ones tailored to your application.

<div class="index">

app.php, app_local.example.php

</div>

<div class="index">

configuration

</div>

## Configuring your Application

Configuration is generally stored in either PHP or INI files, and loaded during
Expand Down Expand Up @@ -120,7 +108,7 @@ files too.
App.base
The base directory the app resides in. If `false` this
will be auto detected. If not `false`, ensure your string starts
with a <span class="title-ref">/</span> and does NOT end with a <span class="title-ref">/</span>. For example, <span class="title-ref">/basedir</span> is a valid
with a `/` and does NOT end with a `/`. For example, `/basedir` is a valid
App.base.

App.encoding
Expand All @@ -140,7 +128,7 @@ root. This is used when generating absolute URLs. By default this value
is generated using the `$_SERVER` environment. However, you should define it
manually to optimize performance or if you are concerned about people
manipulating the `Host` header.
In a CLI context (from command) the <span class="title-ref">fullBaseUrl</span> cannot be read from \$\_SERVER,
In a CLI context (from command) the `fullBaseUrl` cannot be read from $_SERVER,
as there is no webserver involved. You do need to specify it yourself if
you do need to generate URLs from a shell (for example, when sending emails).

Expand Down Expand Up @@ -497,7 +485,7 @@ the existing runtime configuration. By setting `$merge` to `true`, values
will not ever overwrite the existing configuration.

> [!WARNING]
> When merging configuration files with <span class="title-ref">\$merge = true</span>, dot notation in keys is
> When merging configuration files with `$merge = true`, dot notation in keys is
> not expanded:
>
> ``` php
Expand Down
4 changes: 2 additions & 2 deletions docs/en/development/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ When dumping data with `Debugger` or rendering error pages, you may want to
hide sensitive keys like passwords or API keys. In your **config/bootstrap.php**
you can mask specific keys:

``` css
``` php
Debugger::setOutputMask([
'password' => 'xxxxx',
'awsKey' => 'yyyyy',
Expand Down Expand Up @@ -155,7 +155,7 @@ the order of currently running functions (stack frames).

Grab an excerpt from the file at \$path (which is an absolute
filepath), highlights line number \$line with \$context number of
lines around it. :
lines around it.

``` php
pr(Debugger::excerpt(ROOT . DS . LIBS . 'debugger.php', 321, 2));
Expand Down
Loading