From 618d4b43e2f36fcf8e32a3c663bf28f1a412ceab Mon Sep 17 00:00:00 2001 From: dpi Date: Mon, 4 Aug 2025 17:15:34 +0800 Subject: [PATCH] Fix Implicitly marking parameter on PHP 8.4 This will get one extra test green. There are plenty of other issues emitted by actual non-stub Drupal core code. 2) mglaman\PHPStanDrupal\Tests\StubTest::testValid array ( 0 => array ( 'message' => 'Deprecated in PHP 8.4: Parameter #2 $account (Drupal\\Core\\Session\\AccountInterface) is implicitly nullable via default value null.', 'file' => '/Users/dpi/Code/phpstan-drupal/src/Drupal/../../stubs/Drupal/Core/Access/AccessibleInterface.stub', --- stubs/Drupal/Core/Access/AccessibleInterface.stub | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/Drupal/Core/Access/AccessibleInterface.stub b/stubs/Drupal/Core/Access/AccessibleInterface.stub index 05f3d746..c3293bfb 100644 --- a/stubs/Drupal/Core/Access/AccessibleInterface.stub +++ b/stubs/Drupal/Core/Access/AccessibleInterface.stub @@ -13,5 +13,5 @@ interface AccessibleInterface { * * @return ($return_as_object is true ? \Drupal\Core\Access\AccessResultInterface : bool) */ - public function access(string $operation, AccountInterface $account = NULL, bool $return_as_object = FALSE); + public function access(string $operation, ?AccountInterface $account = NULL, bool $return_as_object = FALSE); }