From 84cf32868e911a8bb9045e3ae3297e3f72397bcc Mon Sep 17 00:00:00 2001 From: Tim Plunkett <git@plnktt.com> Date: Tue, 21 Jan 2025 19:36:40 -0500 Subject: [PATCH] Move to level 3 --- phpstan.neon | 8 +++++++- src/Controller/InstallerController.php | 5 +++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/phpstan.neon b/phpstan.neon index e0291c80f..6241b2216 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,5 +1,5 @@ parameters: - level: 2 + level: 3 universalObjectCratesClasses: - Drupal\Core\Extension\Extension reportUnmatchedIgnoredErrors: true @@ -24,6 +24,12 @@ parameters: paths: - tests/src/FunctionalJavascript reportUnmatched: false + # Caused by \Drupal\KernelTests\KernelTestBase::$container having the wrong type. + - + message: "#^Property Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:\\$container \\(Drupal\\\\Core\\\\DependencyInjection\\\\ContainerBuilder\\) does not accept Drupal\\\\Component\\\\DependencyInjection\\\\ContainerInterface\\.$#" + paths: + - tests/src/Kernel/DatabaseTablesTest.php + reportUnmatched: false ### Package Manager # Caused by using self instead of static as a return type in \Drupal\fixture_manipulator\FixtureManipulator. diff --git a/src/Controller/InstallerController.php b/src/Controller/InstallerController.php index a06bfceab..fd762a07e 100644 --- a/src/Controller/InstallerController.php +++ b/src/Controller/InstallerController.php @@ -19,6 +19,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; /** * Defines a controller to install projects via UI. @@ -441,10 +442,10 @@ final class InstallerController extends ControllerBase { * @param \Symfony\Component\HttpFoundation\Request $request * The request. * - * @return \Symfony\Component\HttpFoundation\JsonResponse + * @return \Symfony\Component\HttpFoundation\Response * Status message. */ - public function activate(Request $request): JsonResponse { + public function activate(Request $request): Response { foreach ($request->toArray() as $project) { $project = $this->enabledSourceHandler->getStoredProject($project); $this->installState->setState($project, 'activating'); -- GitLab