PHP 8.5.1 deprecation

PHP 8.5.1 deprecated code

Deprecated function: Drupal\entity_copy_reference\EntityCopyReference::isCopyEnabled(): Implicitly marking parameter $user as nullable is deprecated, the explicit nullable type must be used instead in include() (line 576 of vendor\composer\ClassLoader.php).

and

Deprecated: Drupal\entity_copy_reference\EntityCopyReference::isCopyEnabled(): Implicitly marking parameter $user as nullable is deprecated, the explicit nullable type must be used instead in ...\modules\contrib\entity_copy_reference\src\EntityCopyReference.php on line 43
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sirclickalot created an issue. See original summary.

amritsingh09’s picture

Assigned: Unassigned » amritsingh09

I will work on a patch for this PHP 8.5.1 deprecation issue.

amritsingh09’s picture

Patch uploaded to fix PHP 8.5 nullable parameter deprecation in EntityCopyReference::isCopyEnabled().

Tested against Drupal 10.

nickolaj’s picture

Status: Active » Needs review

Added explicit nullable type for `$user` parameter in `isCopyEnabled()` to fix PHP 8.5 deprecation "Implicitly marking parameter as nullable is deprecated".

sirclickalot’s picture

Issue summary: View changes
sirclickalot’s picture

6.patch from #4 does the job nicely!

Thanks