You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: UPGRADE-6.4.md
+49-12Lines changed: 49 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -9,13 +9,50 @@ BrowserKit
9
9
Cache
10
10
-----
11
11
12
-
*`EarlyExpirationHandler` no longer implements `MessageHandlerInterface`, rely on `AsMessageHandler` instead
12
+
*[BC break]`EarlyExpirationHandler` no longer implements `MessageHandlerInterface`, rely on `AsMessageHandler` instead
13
13
14
14
DependencyInjection
15
15
-------------------
16
16
17
17
* Deprecate `ContainerAwareInterface` and `ContainerAwareTrait`, use dependency injection instead
18
18
19
+
*Before*
20
+
```php
21
+
class MailingListService implements ContainerAwareInterface
22
+
{
23
+
use ContainerAwareTrait;
24
+
25
+
public function sendMails()
26
+
{
27
+
$mailer = $this->container->get('mailer');
28
+
29
+
// ...
30
+
}
31
+
}
32
+
```
33
+
34
+
*After*
35
+
```php
36
+
use Symfony\Component\Mailer\MailerInterface;
37
+
38
+
class MailingListService
39
+
{
40
+
public function __construct(
41
+
private MailerInterface $mailer,
42
+
) {
43
+
}
44
+
45
+
public function sendMails()
46
+
{
47
+
$mailer = $this->mailer;
48
+
49
+
// ...
50
+
}
51
+
}
52
+
```
53
+
54
+
To fetch services lazily, you can use a [service subscriber](https://symfony.com/doc/6.4/service_container/service_subscribers_locators.html#defining-a-service-subscriber).
55
+
19
56
DoctrineBridge
20
57
--------------
21
58
@@ -27,7 +64,7 @@ DoctrineBridge
27
64
ErrorHandler
28
65
------------
29
66
30
-
*`FlattenExceptionNormalizer` no longer implements `ContextAwareNormalizerInterface`
67
+
*[BC break]`FlattenExceptionNormalizer` no longer implements `ContextAwareNormalizerInterface`
31
68
32
69
Form
33
70
----
@@ -40,20 +77,20 @@ Form
40
77
FrameworkBundle
41
78
---------------
42
79
43
-
* Add native return type to `Translator` and to `Application::reset()`
80
+
*[BC break]Add native return type to `Translator` and to `Application::reset()`
44
81
* Deprecate the integration of Doctrine annotations, either uninstall the `doctrine/annotations` package or disable
45
82
the integration by setting `framework.annotations` to `false`
46
83
47
84
HttpFoundation
48
85
--------------
49
86
50
-
* Make `HeaderBag::getDate()`, `Response::getDate()`, `getExpires()` and `getLastModified()` return a `DateTimeImmutable`
87
+
*[BC break]Make `HeaderBag::getDate()`, `Response::getDate()`, `getExpires()` and `getLastModified()` return a `DateTimeImmutable`
51
88
52
89
HttpKernel
53
90
----------
54
91
55
-
*`BundleInterface` no longer extends `ContainerAwareInterface`
56
-
* Add native return types to `TraceableEventDispatcher` and to `MergeExtensionConfigurationPass`
92
+
*[BC break]`BundleInterface` no longer extends `ContainerAwareInterface`
93
+
*[BC break]Add native return types to `TraceableEventDispatcher` and to `MergeExtensionConfigurationPass`
57
94
58
95
Messenger
59
96
---------
@@ -63,7 +100,7 @@ Messenger
63
100
MonologBridge
64
101
-------------
65
102
66
-
* Add native return type to `Logger::clear()` and to `DebugProcessor::clear()`
103
+
*[BC break]Add native return type to `Logger::clear()` and to `DebugProcessor::clear()`
67
104
68
105
PsrHttpMessageBridge
69
106
--------------------
@@ -73,15 +110,15 @@ PsrHttpMessageBridge
73
110
Routing
74
111
-------
75
112
76
-
* Add native return type to `AnnotationClassLoader::setResolver()`
113
+
*[BC break]Add native return type to `AnnotationClassLoader::setResolver()`
77
114
* Deprecate Doctrine annotations support in favor of native attributes
78
-
*Change the constructor signature of `AnnotationClassLoader`to `__construct(?string $env = null)`, passing an annotation reader as first argument is deprecated
115
+
*Deprecate passing an annotation reader as first argument to `AnnotationClassLoader`(new signature: `__construct(?string $env = null)`)
79
116
80
117
Security
81
118
--------
82
119
83
-
*`UserValueResolver` no longer implements `ArgumentValueResolverInterface`
84
-
* Make `PersistentToken` immutable
120
+
*[BC break]`UserValueResolver` no longer implements `ArgumentValueResolverInterface`
121
+
*[BC break]Make `PersistentToken` immutable
85
122
* Deprecate accepting only `DateTime` for `TokenProviderInterface::updateToken()`, use `DateTimeInterface` instead
86
123
87
124
Serializer
@@ -93,7 +130,7 @@ Serializer
93
130
Templating
94
131
----------
95
132
96
-
* The component is deprecated and will be removed in 7.0. Use Twig instead.
133
+
* The component is deprecated and will be removed in 7.0, use [Twig](https://twig.symfony.com) instead
0 commit comments