Problem/Motivation

After testing my D11 instance on PHP 8.4, I've come across a few issues:

Deprecated: Drupal\page_manager\Entity\PageVariantViewBuilder::resetCache(): Implicitly marking parameter $entities as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/html/modules/contrib/page_manager/src/Entity/PageVariantViewBuilder.php on line 46

Deprecated: Drupal\page_manager_ui\Form\VariantPluginAddBlockForm::buildForm(): Implicitly marking parameter $request as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/html/modules/contrib/page_manager/page_manager_ui/src/Form/VariantPluginAddBlockForm.php on line 65

Deprecated: Drupal\page_manager\Plugin\SectionStorage\PageManagerSectionStorage::access(): Implicitly marking parameter $account as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/html/modules/contrib/page_manager/src/Plugin/SectionStorage/PageManagerSectionStorage.php on line 206

PHP Deprecated:  Drupal\entityqueue\Controller\EntityQueueUIController::subqueueListForEntity(): Implicitly marking parameter $entity as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/html/modules/contrib/entityqueue/src/Controller/EntityQueueUIController.php on line 76

Steps to reproduce

If you have the module installed, by running drush you'll get the errors

Proposed resolution

Explicitelly declare the variable as nullable: https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullabl...

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

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

danrod created an issue. See original summary.

danrod’s picture

Status: Active » Needs review
danrod’s picture

I've create a MR for it, kindly review.

For some reason the tests are failing, but I see that the other MRs are having the same problem so I guess that's fine for now.

danrod’s picture

Title: [PHP8.4] Misc null deprecation warning on a few files » [PHP8.4] Misc NULL deprecation warning on a few files
danrod’s picture

Assigned: danrod » Unassigned
dhruv.mittal’s picture

reviewing it

dhruv.mittal’s picture

Status: Needs review » Reviewed & tested by the community

Changes looks good to me so moving it to RTBC

rajab natshah made their first commit to this issue’s fork.

rajab natshah’s picture

Having the other way with adding ?

xem8vfdh’s picture

Release would be nice :)

jaydarnell’s picture

MR 46 appears to fix the issue.

josephcheek’s picture

Issue tags: +PHP 8.4

Added PHP 8.4 tag so it will show up in the list of PHP 8.4 fixes at https://www.drupal.org/project/issues/search?issue_tags=PHP%208.4

Also +1 to RTBC. Would love to see a merge.

smulvih2’s picture

+1 RTBC. Adding patch file here to use with my project.

mably’s picture

+1 RTBC

danrod’s picture

+1 RTBC, works fine in the 8.x-4.x-dev version

joelpittet changed the visibility of the branch 3536704-php8.4-misc-null to hidden.

joelpittet’s picture

Status: Reviewed & tested by the community » Fixed

Thank you all for reporting this and sorry for the delay. I will cut a release shortly.

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.

xem8vfdh’s picture

a stable release? Its been quite some time since even a pre-release. A stable sure would be nice :)

joelpittet’s picture

Planning to but need to find a few moments to fix the failing tests due to core drift. If anyone wants to create the follow up for that, that would help me a bit.
I have the fixes half done this morning.

Status: Fixed » Closed (fixed)

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