Problem/Motivation

Panels module is not compatible with php 8.4 and throwing warning on drush cr.

Steps to reproduce

2 Warnings :

  1. PHP Deprecated: Drupal\panels\Form\PanelsAddBlockForm::buildForm(): Implicitly marking parameter $request as nullable is deprecated, the explicit nullable type must be used instead in /var/www/docroot/modules/contrib/panels/src/Form/PanelsAddBlockForm.php on line 65
  2. Deprecated: Drupal\panels\Form\PanelsAddBlockForm::buildForm(): Implicitly marking parameter $request as nullable is deprecated, the explicit nullable type must be used instead in /var/www/docroot/modules/contrib/panels/src/Form/PanelsAddBlockForm.php on line 65

    Proposed resolution

Remaining tasks

Fix php code and make it compatible

User interface changes

NONE

API changes

NONE

Data model changes

NONE

CommentFileSizeAuthor
#3 panels_php84_fix.patch799 bytesnehajyoti

Issue fork panels-3534531

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

nehajyoti created an issue. See original summary.

nehajyoti’s picture

Issue summary: View changes
nehajyoti’s picture

StatusFileSize
new799 bytes

https://git.drupalcode.org/issue/panels-3534531/-/merge_requests/new?mer...

Unable to create MR. Link mentioned above.

Hence attaching the patch

joelpittet’s picture

Version: 8.x-4.9 » 8.x-4.x-dev
Status: Active » Needs review

joelpittet’s picture

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

Barring any merge issues, this should be fixed—thanks @nehajyoti! Also you almost had the MR working, just needed to create it, the commit was there and everything.

As a side note, I’d recommend moving to Layout Builder instead of Panels if you have the opportunity.

  • joelpittet committed 55700b96 on 8.x-4.x
    Issue #3534531 by nehajyoti, joelpittet: php 8.4 compatibility issue
    
joelpittet’s picture

Status: Reviewed & tested by the community » Fixed
joelpittet’s picture

Status: Fixed » Closed (fixed)

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

rajab natshah’s picture

Thank you for the fix in this issue.
Hoping for a release.

jaswinsingh’s picture

Tested MR 32 on PHP 8.4.17, there are still some warnings reported by phpcs

FILE: /panels/panels_ipe/src/Form/PanelsIPELayoutForm.php
97 | WARNING | Implicitly marking a parameter as nullable is deprecated since PHP 8.4. Update the type to be explicitly nullable instead. Found implicitly nullable parameter: $panels_display.

FILE: /panels/panels_ipe/src/Form/PanelsIPEBlockPluginForm.php
111 | WARNING | Implicitly marking a parameter as nullable is deprecated since PHP 8.4. Update the type to be explicitly nullable instead. Found implicitly nullable parameter: $panels_display.

joseph.olstad’s picture

@joelpitted, 7 or 8 months without a tagged release, we're now chasing our tails.

By simply tagging 8.x-4.10 we could have avoided the duplicate issue mentioned here:
#3577740: PHP 8.4 deprecation: implicitly nullable parameters in Panels cause deprecation notices

xem8vfdh’s picture

thanks @joseph.olstad for the help here.

I see you still arent in maintainers.json

Have you had any traction with any of the maintainers?

I DMed all of them asking for a release. I got no responses.

If you have same experience, who can we appeal to at drupal.org to have you added to list of release maintainers?

thanks again :)

joelpittet’s picture

Just need to find some time, it’s on my list of things to make a release for… (currently on phone)

I would like to get the d11 stuff but maybe some sorted that already…

joseph.olstad’s picture

we've been using panels on D11.3.x for quite some time now, it's included in our distro (WxT 6.3.0). The tagged release is needed so that we can stop using the patch. Someone already merged the fix in 4.x and we just need 4.x tagged and released.

There's nothing to do except cut a release from dev.

xem8vfdh’s picture

thanks @joelpitter and @joseph.olstad

I am also uding on D11 and it seems fine

I agree with Joseph on tag

xem8vfdh’s picture

any news on the release?

joseph.olstad’s picture

@xem8vfdh , the tagged release is already here:

https://www.drupal.org/project/panels/releases/8.x-4.10

Thanks to @joelpittet!

xem8vfdh’s picture

Ahh okay, I thought this fix wasnt included in that but thanks for the clarification