Problem/Motivation

On PHP 8.5 / Drupal 12 a lot of our overrides fire the "method might add a native return type" notice — across the base classes, plugins and managers. Add the return types (or @return) so they stop.

While we're here: fix the one array_key_exists() call that can get a null key, and tag hook_requirements with #[LegacyRequirementsHook].

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

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

velmir_taky created an issue. See original summary.

velmir_taky’s picture

Version: 3.0.x-dev » 3.1.x-dev

velmir_taky’s picture

Status: Active » Needs review

Typed the overrides across the base classes, plugins and managers (+ submodules), fixed the null array_key_exists() in ValueMapping and put #[LegacyRequirementsHook] on the requirements hooks.

guignonv made their first commit to this issue’s fork.

guignonv’s picture

Assigned: Unassigned » velmir_taky
Status: Needs review » Reviewed & tested by the community

Looks good to me. I made a change in the docs: the change logs to reflect the purpose of the 3.1.x. We will update the date when we will be ready to release something. And I added you and AI credits to the README (regarding our discussion yesterday on AI use).
I let you merge when you're ready.

  • velmir_taky committed f20dcb76 on 3.1.x
    Issue #3617205: Add native return types and fix remaining PHP 8.5...
velmir_taky’s picture

Assigned: velmir_taky » Unassigned
Status: Reviewed & tested by the community » Fixed

Thanks @guignonv!
Merged!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.