Commit f76dce7
committed
[BUGFIX] Mitigate deprecated extbase
TYPO3 v11.5 started streamlining the view implementation,
which included deprecating the extbase `ViewInterface`.
Extensions supporting two TYPO3 core version need to take
care and the migration path for controllers overriding the
`initialzeView` method is stated in the changelog [1].
This change follows the recommended migration path and
removes the deprecated interface as method native type
declarion for the `$view` argument, avoiding in TYPO3
v12 the exception
TYPO3\CMS\Extbase\Reflection\Exception\UnknownClassException
Class "TYPO3\CMS\Extbase\Mvc\View\ViewInterface" does not exist.
Reflection failed.
while still making required adjustments. We need to
add one error to the TYPO3 v12 phpstan baseline as
the error is not reported in TYPO3 v11 and using the
`phpstan-ignore` annotation does not work.
Dispatching a callable is slightly modified within
`FileFacade`, moving the callable array into local
variable first to allow phpstan properly deal with
it. That allows us to remove error pattern ignore
from the baseline instead of recreating it with a
changed message.
On top, a small typo (casing) in `runTests.sh` is
fixed along the way to write the updated baselines
to the correct paths.
Used command(s):
```shell
Build/Scripts/runTests.sh -p 8.1 -t 11 -s phpstanGenerateBaseline && \
Build/Scripts/runTests.sh -p 8.2 -t 12 -s phpstanGenerateBaseline
```
[1] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/11.5/Deprecation-95222-ExtbaseViewInterface.html
Resolves: #22ViewInterface
1 parent 5e9260a commit f76dce7
5 files changed
Lines changed: 14 additions & 20 deletions
File tree
- Build
- Scripts
- phpstan
- core11
- core12
- Classes
- Controller
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
617 | 617 | | |
618 | 618 | | |
619 | 619 | | |
620 | | - | |
| 620 | + | |
621 | 621 | | |
622 | 622 | | |
623 | 623 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | 148 | | |
154 | 149 | | |
155 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
68 | 73 | | |
69 | 74 | | |
70 | 75 | | |
| |||
85 | 90 | | |
86 | 91 | | |
87 | 92 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | 163 | | |
169 | 164 | | |
170 | 165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
64 | 63 | | |
65 | 64 | | |
66 | 65 | | |
67 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
68 | 71 | | |
69 | 72 | | |
70 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
290 | | - | |
291 | | - | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
292 | 293 | | |
293 | 294 | | |
294 | 295 | | |
| |||
0 commit comments