[BUGFIX] Mitigate deprecated extbase ViewInterface
#38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
initialzeViewmethod 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
$viewargument, avoiding in TYPO3v12 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-ignoreannotation does not work.Dispatching a callable is slightly modified within
FileFacade, moving the callable array into localvariable 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.shisfixed along the way to write the updated baselines
to the correct paths.
Used command(s):
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: #22