In PHP 8.4, it is deprecated to implicitly mark a parameter as nullable without explicitly declaring the type as nullable using a ?
.
This triggers a deprecation warning when a parameter has a default value of null
but is not type-hinted as nullable.
php -l src/Plugin/Action/CopyPathAction.php
Resulting in this output:
Deprecated: Drupal\fieldable_path\Plugin\Action\CopyPathAction::access(): Implicitly marking parameter $account as nullable is deprecated, the explicit nullable type must be used instead in src/Plugin/Action/CopyPathAction.php on line 44
Update the affected method signature to explicitly declare the parameter as nullable using a ?
before the type name.
Before:
public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE)
After:
public function access($object, ?AccountInterface $account = NULL, $return_as_object = FALSE)
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.