[TASK] Fix definition availability checks in DI compiler passes
findDefinition() doesn't actually return a boolean (or null) value on failure but throws an exception instead. As an alternative $container->hasDefintion may be used to check for definition availability. Also adapt the corresponding dashboard test. Executed commands: Build/Scripts/runTests.sh -s phpstanGenerateBaseline Resolves: #96703 Releases main, 11.5 Change-Id: Iab7b9ce098daf685c258f428a4aa241cb0411504 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73244 Tested-by:Benjamin Franzke <bfr@qbus.de> Tested-by:
core-ci <typo3@b13.com> Reviewed-by:
Benjamin Franzke <bfr@qbus.de>
Showing
- Build/phpstan/phpstan-baseline.neon 0 additions, 85 deletionsBuild/phpstan/phpstan-baseline.neon
- typo3/sysext/core/Classes/DependencyInjection/ConsoleCommandPass.php 2 additions, 2 deletions...t/core/Classes/DependencyInjection/ConsoleCommandPass.php
- typo3/sysext/core/Classes/DependencyInjection/ListenerProviderPass.php 3 additions, 4 deletions...core/Classes/DependencyInjection/ListenerProviderPass.php
- typo3/sysext/dashboard/Classes/DependencyInjection/DashboardWidgetPass.php 2 additions, 3 deletions...board/Classes/DependencyInjection/DashboardWidgetPass.php
- typo3/sysext/dashboard/Tests/Unit/DependencyInjection/DashboardWidgetPassTest.php 16 additions, 8 deletions...ests/Unit/DependencyInjection/DashboardWidgetPassTest.php
Please register or sign in to comment