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
6 changes: 3 additions & 3 deletions docs/en/appendices/5-0-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ changes made:

- The `SECOND`, `MINUTE`, `HOUR`, `DAY`, `WEEK`, `MONTH`, `YEAR` constants were removed.

- Use of `#[\AllowDynamicProperties]` removed everywhere. It was used for the following classes:
- Use of `#[\AllowDynamicProperties]` removed everywhere. It was used for the following classes:
- `Command/Command`
- `Console/Shell`
- `Controller/Component`
Expand All @@ -37,7 +37,7 @@ changes made:
- `View/Helper`
- `View/View`

- The supported database engine versions were updated:
- The supported database engine versions were updated:
- MySQL (5.7 or higher)
- MariaDB (10.1 or higher)
- PostgreSQL (9.6 or higher)
Expand Down Expand Up @@ -114,7 +114,7 @@ changes made:

- The `DateTimeType` and `DateType` now always return immutable objects.
Additionally the interface for `Date` objects reflects the `ChronosDate`
interface which lacks all of the time related methods that were present in
interface which lacks all the time related methods that were present in
CakePHP 4.x.
- `DateType::setLocaleFormat()` no longer accepts an array.
- `Query` now accepts only `\Closure` parameters instead of `callable`. Callables can be converted
Expand Down
2 changes: 1 addition & 1 deletion docs/en/console-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ unambiguously reference a command.

## Console Applications

By default CakePHP will automatically discover all the commands in your
By default, CakePHP will automatically discover all the commands in your
application and its plugins. You may want to reduce the number of exposed
commands, when building standalone console applications. You can use your
`Application`'s `console()` hook to limit which commands are exposed and
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 @@ -295,7 +295,7 @@ cake user [-h] [-q] [-v]

## Grouping Commands

By default in the help output CakePHP will group commands into core, app, and
By default, in the help output CakePHP will group commands into core, app, and
plugin groups. You can customize the grouping of commands by implementing
`getGroup()`:

Expand Down
2 changes: 1 addition & 1 deletion docs/en/console-commands/input-output.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,6 @@ no styling is done at all. There are three modes you can use.
This is a good mode to use if you are outputting XML or, want to debug why
your styling isn't working.

By default on \*nix systems ConsoleOutput objects default to color output.
By default, on \*nix systems ConsoleOutput objects default to color output.
On Windows systems, plain output is the default unless the `ANSICON`
environment variable is present.
4 changes: 2 additions & 2 deletions docs/en/controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ When a request is made to a CakePHP application, CakePHP's
`Cake\Routing\Router` and `Cake\Routing\Dispatcher`
classes use [Routes Configuration](development/routing#routes-configuration) to find and create the correct
controller instance. The request data is encapsulated in a request object.
CakePHP puts all of the important request information into the `$this->request`
CakePHP puts all the important request information into the `$this->request`
property. See the section on [Cake Request](controllers/request-response#cake-request) for more information on the
CakePHP request object.

Expand Down Expand Up @@ -580,7 +580,7 @@ logic around the request life-cycle:

### Controller Callback Methods

By default the following callback methods are connected to related events if the
By default, the following callback methods are connected to related events if the
methods are implemented by your controllers

#### beforeFilter()
Expand Down
2 changes: 1 addition & 1 deletion docs/en/controllers/components/form-protection.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ in your `initialize()` method.

## Form tampering prevention

By default the `FormProtectionComponent` prevents users from tampering with
By default, the `FormProtectionComponent` prevents users from tampering with
forms in specific ways. It will prevent the following things:

- Form's action (URL) cannot be modified.
Expand Down
6 changes: 3 additions & 3 deletions docs/en/controllers/pagination.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ This object contains the paginated records and the paging params.

## Simple Pagination

By default `Controller::paginate()` uses the `Cake\Datasource\Paging\NumericPaginator`
By default, `Controller::paginate()` uses the `Cake\Datasource\Paging\NumericPaginator`
class which does a `COUNT()` query to calculate the size of the result set so
that page number links can be rendered. On very large datasets this count query
can be very expensive. In situations where you only want to show 'Next' and 'Previous'
Expand Down Expand Up @@ -217,7 +217,7 @@ $unpublishedArticles = $this->paginate(

## Control which Fields Used for Ordering

By default sorting can be done on any non-virtual column a table has. This is
By default, sorting can be done on any non-virtual column a table has. This is
sometimes undesirable as it allows users to sort on un-indexed columns that can
be expensive to order by. You can set the allowed list of fields that can be sorted
using the `sortableFields` option. This option is required when you want to
Expand Down Expand Up @@ -347,7 +347,7 @@ protected array $paginate = [
The number of results that are fetched per page is exposed to the user as the
`limit` parameter. It is generally undesirable to allow users to fetch all
rows in a paginated set. The `maxLimit` option asserts that no one can set
this limit too high from the outside. By default CakePHP limits the maximum
this limit too high from the outside. By default, CakePHP limits the maximum
number of rows that can be fetched to 100. If this default is not appropriate
for your application, you can adjust it as part of the pagination options, for
example reducing it to `10`:
Expand Down
6 changes: 3 additions & 3 deletions docs/en/controllers/request-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ responses from your controllers.
`ServerRequest` is the default request object used in CakePHP. It centralizes a
number of features for interrogating and interacting with request data.
On each request one Request is created and then passed by reference to the
various layers of an application that use request data. By default the request
various layers of an application that use request data. By default, the request
is assigned to `$this->request`, and is available in Controllers, Cells, Views
and Helpers. You can also access it in Components using the controller
reference.
Expand Down Expand Up @@ -182,7 +182,7 @@ be accessed like this:
$attachment = $this->request->getData('attachment');
```

By default file uploads are represented in the request data as objects that implement
By default, file uploads are represented in the request data as objects that implement
[\Psr\Http\Message\UploadedFileInterface](https://www.php-fig.org/psr/psr-7/#16-uploaded-files). In the current
implementation, the `$attachment` variable in the above example would by default hold an instance of
`\Laminas\Diactoros\UploadedFile`.
Expand Down Expand Up @@ -814,7 +814,7 @@ public function sendIcs()
`method` Cake\\Http\\Response::**withHeader**(string $header, string $value): static

Setting headers is done with the `Cake\Http\Response::withHeader()`
method. Like all of the PSR-7 interface methods, this method returns a *new*
method. Like all the PSR-7 interface methods, this method returns a *new*
instance with the new header:

``` php
Expand Down
4 changes: 2 additions & 2 deletions docs/en/core-libraries/email.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ In your email templates you can use these with:
```

You can use helpers in emails as well, much like you can in normal template files.
By default only the `HtmlHelper` is loaded. You can load additional
By default, only the `HtmlHelper` is loaded. You can load additional
helpers using the `ViewBuilder::addHelpers()` method:

``` php
Expand Down Expand Up @@ -364,7 +364,7 @@ class UserMailer extends Mailer
->setTo($user->email)
->setSubject(sprintf('Welcome %s', $user->name))
->viewBuilder()
->setTemplate('welcome_mail'); // By default template with same name as method name is used.
->setTemplate('welcome_mail'); // By default, template with same name as method name is used.
}

public function resetPassword($user)
Expand Down
2 changes: 1 addition & 1 deletion docs/en/core-libraries/global-constants-and-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ways to point to certain files or directories in your CakePHP application.

Here are CakePHP's globally available functions. Most of them are just
convenience wrappers for other CakePHP functionality, such as debugging and
translating content. By default only namespaced functions are autoloaded,
translating content. By default, only namespaced functions are autoloaded,
however you can optionally load global aliases by adding:

``` php
Expand Down
6 changes: 3 additions & 3 deletions docs/en/core-libraries/httpclient.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ addition request information. The following keys can be used in `$options`:
- `cookie` - Array of cookies to use.
- `proxy` - Array of proxy information.
- `auth` - Array of authentication data, the `type` key is used to delegate to
an authentication strategy. By default Basic auth is used.
an authentication strategy. By default, Basic auth is used.
- `ssl_verify_peer` - defaults to `true`. Set to `false` to disable SSL certification
verification (not recommended).
- `ssl_verify_peer_name` - defaults to `true`. Set to `false` to disable
Expand Down Expand Up @@ -187,7 +187,7 @@ $response = $http->get('https://example.com/profile/1', [], [
]);
```

By default `Cake\Http\Client` will use basic authentication if there is no
By default, `Cake\Http\Client` will use basic authentication if there is no
`'type'` key in the auth option.

### Using Digest Authentication
Expand Down Expand Up @@ -491,7 +491,7 @@ $response->getStatusCode();

## Changing Transport Adapters

By default `Http\Client` will prefer using a `curl` based transport adapter.
By default, `Http\Client` will prefer using a `curl` based transport adapter.
If the curl extension is not available a stream based adapter will be used
instead. You can force select a transport adapter using a constructor option:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ echo Number::format(524.23); // Displays 524,23
Make sure you read the [Date & Time](../core-libraries/time) and [Number](../core-libraries/number)
sections to learn more about formatting options.

By default dates returned for the ORM results use the `Cake\I18n\DateTime` class,
By default, dates returned for the ORM results use the `Cake\I18n\DateTime` class,
so displaying them directly in you application will be affected by changing the
current locale.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/core-libraries/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ following keys:
- `flag`: An integer flag to be used for opening the connection to the
logger, by default `LOG_ODELAY` will be used. See `openlog` documentation
for more options
- `facility`: The logging slot to use in syslog. By default `LOG_USER` is
- `facility`: The logging slot to use in syslog. By default, `LOG_USER` is
used. See `syslog` documentation for more options

## Creating Log Engines
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 @@ -579,7 +579,7 @@ $errors = [
```

If you have multiple errors on a single field, an array of error messages will
be returned per field. By default the `getErrors()` method applies rules for
be returned per field. By default, the `getErrors()` method applies rules for
the 'create' mode. If you'd like to apply 'update' rules you can do the
following:

Expand Down
4 changes: 2 additions & 2 deletions docs/en/core-libraries/xml.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ objects with `loadHtml()`:
$html = Xml::loadHtml($htmlString, ['return' => 'domdocument']);
```

By default entity loading and huge document parsing are disabled. These modes
By default, entity loading and huge document parsing are disabled. These modes
can be enabled with the `loadEntities` and `parseHuge` options respectively.

## Transforming a XML String in Array
Expand Down Expand Up @@ -117,7 +117,7 @@ Examples of invalid arrays:
];
```

By default array values will be output as XML tags. If you want to define
By default, array values will be output as XML tags. If you want to define
attributes or text values you can prefix the keys that are supposed to be
attributes with `@`. For value text, use `@` as the key:

Expand Down
6 changes: 3 additions & 3 deletions docs/en/development/application.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ it will be pretty slim and only define a few default
methods:

- `bootstrap` Used to load [configuration files](../development/configuration), define constants and other global functions.
By default this will include **config/bootstrap.php**. This is the ideal place
By default, this will include **config/bootstrap.php**. This is the ideal place
to load [Plugins](../plugins) and global [event listeners](../core-libraries/events).
- `routes` Used to load [routes](../development/routing). By default this
- `routes` Used to load [routes](../development/routing). By default, this
will include **config/routes.php**.
- `middleware` Used to add [middleware](../controllers/middleware) to your application.
- `console` Used to add [console commands](../console-commands) to your
application. By default this will automatically discover console commands in
application. By default, this will automatically discover console commands in
your application and all plugins.

## Bootstrapping your Application
Expand Down
4 changes: 2 additions & 2 deletions docs/en/development/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ The file path to webroot.

App.fullBaseUrl
The fully qualified domain name (including protocol) to your application's
root. This is used when generating absolute URLs. By default this value
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.
Expand Down Expand Up @@ -579,4 +579,4 @@ The built in configuration engines are:
- [IniConfig](https://api.cakephp.org/5.x/class-Cake.Core.Configure.Engine.IniConfig.html)
- [PhpConfig](https://api.cakephp.org/5.x/class-Cake.Core.Configure.Engine.PhpConfig.html)

By default your application will use `PhpConfig`.
By default, your application will use `PhpConfig`.
2 changes: 1 addition & 1 deletion docs/en/development/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ The following configuration options can be set in **config/app.php** to change h
`Debugger` behaves:

- `Debugger.editor` Choose the which editor URL format you want to use.
By default atom, emacs, macvim, phpstorm, sublime, textmate, and vscode are
By default, atom, emacs, macvim, phpstorm, sublime, textmate, and vscode are
available. You can add additional editor link formats using
`Debugger::addEditor()` during your application bootstrap.
- `Debugger.editorBasePath` The path that replaces `ROOT` when generating
Expand Down
4 changes: 2 additions & 2 deletions docs/en/development/dependency-injection.md
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ $container->add(AuditLogServiceInterface::class, function (...$args) {
});
```

Factory functions will receive all of the resolved dependencies for the class
Factory functions will receive all the resolved dependencies for the class
as arguments.

Once you've defined a class, you also need to define the dependencies it
Expand All @@ -559,7 +559,7 @@ be added automatically.
> [!IMPORTANT]
> Services are **not shared by default** - each request creates a new instance. Use `addShared()` to create singleton services that persist across requests.

By default services are not shared. Every object (and dependencies) is created
By default, services are not shared. Every object (and dependencies) is created
each time it is fetched from the container. If you want to re-use a single
instance, often referred to as a singleton, you can mark a service as 'shared':

Expand Down
6 changes: 3 additions & 3 deletions docs/en/development/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ data returned by `getAttributes()` will be exposed as view variables as well.

### Custom Error Page Layout

By default error templates use **templates/layout/error.php** for a layout.
By default, error templates use **templates/layout/error.php** for a layout.
You can use the `layout` property to pick a different layout:

``` php
Expand Down Expand Up @@ -480,7 +480,7 @@ public function view($id = null)
```

The above would cause the configured exception handler to catch and
process the `NotFoundException`. By default this will create an error
process the `NotFoundException`. By default, this will create an error
page, and log the exception.

### Other Built In Exceptions
Expand Down Expand Up @@ -570,7 +570,7 @@ MethodNotAllowedException the rfc2616 says:

## Customizing PHP Error Handling

By default PHP errors are rendered to console or HTML output, and also logged.
By default, PHP errors are rendered to console or HTML output, and also logged.
If necessary, you can swap out CakePHP's error handling logic with your own.

### Custom Error Logging
Expand Down
2 changes: 1 addition & 1 deletion docs/en/development/rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ $middlewareQueue->add(new BodyParserMiddleware());
```

This middleware will use the `content-type` header to detect the format of
request data and parse enabled formats. By default only `JSON` parsing is
request data and parse enabled formats. By default, only `JSON` parsing is
enabled by default. You can enable XML support by enabling the `xml`
constructor option. When a request is made with a `Content-Type` of
`application/json`, CakePHP will decode the request data and update the
Expand Down
8 changes: 4 additions & 4 deletions docs/en/development/routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,7 @@ You can get the `article_id` in `CommentsController` by:
$this->request->getParam('article_id');
```

By default resource routes map to the same prefix as the containing scope. If
By default, resource routes map to the same prefix as the containing scope. If
you have both nested and non-nested resource controllers you can use a different
controller in each context by using prefixes:

Expand All @@ -1216,7 +1216,7 @@ compatible with [Prefix Routing](#prefix-routing).

### Limiting the Routes Created

By default CakePHP will connect 6 routes for each resource. If you'd like to
By default, CakePHP will connect 6 routes for each resource. If you'd like to
only connect specific resource routes you can use the `only` option:

``` php
Expand Down Expand Up @@ -1270,7 +1270,7 @@ $routes->resources('Articles', [
```

In addition to the default routes, this would also connect a route for
`/articles/delete-all`. By default the path segment will match the key name. You
`/articles/delete-all`. By default, the path segment will match the key name. You
can use the 'path' key inside the resource definition to customize the path
name:

Expand Down Expand Up @@ -1338,7 +1338,7 @@ The above will generate URLs styled like: **/blog_posts**.

### Changing the Path Element

By default resource routes use an inflected form of the resource name for the
By default, resource routes use an inflected form of the resource name for the
URL segment. You can set a custom URL segment with the `path` option:

``` php
Expand Down
2 changes: 1 addition & 1 deletion docs/en/development/sessions.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Configure::write('Session', [
]);
```

By default PHP sets the session cookie to expire as soon as the browser is
By default, PHP sets the session cookie to expire as soon as the browser is
closed, regardless of the configured `Session.timeout` value. The cookie
timeout is controlled by the `session.cookie_lifetime` ini value and can be
configured using:
Expand Down
Loading