Commit b2a35c7
committed
bug symfony#48110 [HttpKernel] Fix deprecation for DateTimeValueResolver with null on non-nullable argument (GromNaN)
This PR was merged into the 6.1 branch.
Discussion
----------
[HttpKernel] Fix deprecation for DateTimeValueResolver with null on non-nullable argument
| Q | A
| ------------- | ---
| Branch? | 6.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | https://github.com/symfony/symfony/pull/48098/files#r1013918566
| License | MIT
| Doc PR | n/a
Remove deprecation message when the value is `null` and the controller argument is not nullable.
```
Deprecated: DateTimeImmutable::__construct(): Passing null to parameter #1 ($datetime) of type string is deprecated
```
This class have been modified in 6.2. The new test case needs to be updated.
Commits
-------
1d7387b Fix deprecation notice when date argument is not nullable and null value is provided2 files changed
Lines changed: 21 additions & 3 deletions
File tree
- src/Symfony/Component/HttpKernel
- Controller/ArgumentResolver
- Tests/Controller/ArgumentResolver
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | 63 | | |
66 | 64 | | |
67 | 65 | | |
| |||
73 | 71 | | |
74 | 72 | | |
75 | 73 | | |
76 | | - | |
| 74 | + | |
77 | 75 | | |
78 | 76 | | |
79 | 77 | | |
| |||
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
116 | 136 | | |
117 | 137 | | |
118 | 138 | | |
| |||
0 commit comments