Skip to content

Commit 7c8e190

Browse files
committed
Merge branch '5.next' into 6.x
2 parents 783bbf8 + 38271f4 commit 7c8e190

File tree

5 files changed

+56
-26
lines changed

5 files changed

+56
-26
lines changed

.vitepress/config.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import baseConfig from '@cakephp/docs-skeleton/config'
1+
import baseConfig, { substitutionsReplacer } from '@cakephp/docs-skeleton/config'
22

33
import { createRequire } from "module";
44
const require = createRequire(import.meta.url);
@@ -19,9 +19,21 @@ const versions = {
1919
],
2020
};
2121

22+
const substitutions = {
23+
'|phpversion|': { value: '8.5', format: 'bold' },
24+
'|minphpversion|': { value: '8.4', format: 'italic' },
25+
'|cakeversion|': '6.0.0',
26+
'|cakefullversion|': 'CakePHP 6 (dev)',
27+
};
28+
2229
// This file contains overrides for .vitepress/config.js
2330
export default {
2431
extends: baseConfig,
32+
markdown: {
33+
config(md) {
34+
md.use(substitutionsReplacer, { substitutions });
35+
}
36+
},
2537
base: "/6.x/",
2638
rewrites: {
2739
"en/:slug*": ":slug*",
@@ -50,12 +62,6 @@ export default {
5062
linkText: 'Go to latest docs.'
5163
}
5264
},
53-
substitutions: {
54-
'|phpversion|': { value: '8.5', format: 'bold' },
55-
'|minphpversion|': { value: '8.4', format: 'italic' },
56-
'|cakeversion|': '6.0.0',
57-
'|cakefullversion|': 'CakePHP 6 (dev)',
58-
},
5965
locales: {
6066
root: {
6167
label: "English",

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

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,48 @@ bin/cake upgrade rector --rules cakephp54 <path/to/app/src>
1616

1717
## Behavior Changes
1818

19+
### Commands
20+
21+
- `BaseCommand::initialize()` is now being triggered **AFTER** arguments and options have been parsed.
22+
1923
### I18n
2024

21-
`Number::parseFloat()` now returns `null` instead of `0.0` when parsing
22-
fails. This also affects `FloatType` and `DecimalType` database types.
25+
- `Number::parseFloat()` now returns `null` instead of `0.0` when parsing
26+
fails. This also affects `FloatType` and `DecimalType` database types.
2327

2428
### ORM
2529

26-
The default eager loading strategy for `HasMany` and `BelongsToMany` associations
27-
has changed from `select` to `subquery`. If you need the previous behavior,
28-
explicitly set `'strategy' => 'select'` when defining associations.
30+
- The default eager loading strategy for `HasMany` and `BelongsToMany` associations
31+
has changed from `select` to `subquery`. If you need the previous behavior,
32+
explicitly set `'strategy' => 'select'` when defining associations.
2933

3034
### Controller
3135

32-
Loading a component with the same alias as the controller's default table now
33-
triggers a warning. See [Component Alias Conflicts](../controllers/components#component-alias-conflicts).
36+
- Loading a component with the same alias as the controller's default table now
37+
triggers a warning. See [Component Alias Conflicts](../controllers/components#component-alias-conflicts).
3438

3539
## Deprecations
3640

37-
- WIP
41+
### Mailer
42+
43+
- The `Mailer::$name` property is unused and has been deprecated.
3844

3945
## New Features
4046

47+
### Core
48+
49+
- `PluginConfig::getInstalledPlugins()` was added to retrieve a list of all installed plugins
50+
including flags to indicate about their scope and state.
51+
- A backwards compatible Container implementation has been added to the core. You can opt-in to use it instead of the current
52+
`league/container` implementation by setting `App.container` to `cake` inside your `config/app.php`.
53+
See [Dependency Injection Container](../development/dependency-injection) for more details.
54+
55+
### Commands
56+
57+
- You can use `$this->io` and `$this->args` inside your commands to access input/output and argument objects
58+
without needing to pass them down from the `execute()` method. **This will be the default in CakePHP 6.0**
59+
as those arguments will be removed from the `execute()` method signature.
60+
4161
### Controller
4262

4363
- Added `#[RequestToDto]` attribute for automatic mapping of request data to
@@ -75,7 +95,9 @@ triggers a warning. See [Component Alias Conflicts](../controllers/components#co
7595

7696
- Added `Cake\Utility\Fs\Finder` class for fluent file discovery with pattern matching,
7797
depth control, and custom filters. Added `Cake\Utility\Fs\Path` for cross-platform
78-
path manipulation.
98+
path manipulation. See [Filesystem Utilities](../core-libraries/filesystem.md).
99+
- `Security::encrypt()` can now be configured to use longer keys with separate encryption and authentication keys that are derived from the provided key.
100+
You can set `Security.encryptWithRawKey` to enable this behavior. See [here](https://github.com/cakephp/cakephp/pull/19325) for more details.
79101

80102
### Collection
81103

docs/en/console-commands/commands.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,16 @@ You should see the following output:
4848

4949
Hello world.
5050

51-
::: info
52-
The `Arguments` and `ConsoleIo` instances passed to `execute()` are also
53-
available on the command instance as `$this->args` and `$this->io`.
54-
In 6.x, the `execute()` method signature will drop these arguments
55-
and `$this->args` / `$this->io` will be the only way to access
56-
these objects. See the
57-
[6.x command refactor](https://github.com/cakephp/cakephp/pull/18983) for
58-
details.
51+
::: info Added in version 5.4.0
52+
In CakePHP 5.4 and newer, the `Arguments` and `ConsoleIo` instances are also
53+
available on the command instance as `$this->args` and `$this->io` properties.
54+
This lets you access input, output, and arguments inside your command methods
55+
without passing these objects down from `execute()`.
56+
57+
This will become the default in CakePHP 6.0, where the `execute()` method
58+
signature will no longer include `Arguments $args` and `ConsoleIo $io`.
59+
Updating your commands to use `$this->args` and `$this->io` now is
60+
recommended.
5961
:::
6062

6163
Our `execute()` method isn't very interesting let's read some input from the

docs/ja/development/dependency-injection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ class BillingServiceProvider extends ServiceProvider
211211

212212
public function services(ContainerInterface $container): void
213213
{
214-
$container->add(StripService::class);
214+
$container->add(StripeService::class);
215215
$container->add('configKey', 'some value');
216216
}
217217
}

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)