Skip to content

Commit 0328209

Browse files
dpimglaman
andauthored
Fix implicit nullable parameter on PHP 8.4 (#897)
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', Co-authored-by: Matt Glaman <[email protected]>
1 parent b615d40 commit 0328209

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stubs/Drupal/Core/Access/AccessibleInterface.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ interface AccessibleInterface {
1313
*
1414
* @return ($return_as_object is true ? \Drupal\Core\Access\AccessResultInterface : bool)
1515
*/
16-
public function access(string $operation, AccountInterface $account = NULL, bool $return_as_object = FALSE);
16+
public function access(string $operation, ?AccountInterface $account = NULL, bool $return_as_object = FALSE);
1717
}

0 commit comments

Comments
 (0)