Make the Media module compatible with PHP 8.0.

Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

The Metatag tests use the Media module and it ran into these errors:

fail: [PHP Deprecated] Line 209 of sites/all/modules/media/includes/media.fields.inc:
 Required parameter $form_state follows optional parameter $input

fail: [PHP Deprecated] Line 82 of sites/all/modules/media/modules/media_wysiwyg/includes/media_wysiwyg.features.inc:
 Required parameter $data follows optional parameter $module_name
damienmckenna’s picture

Issue tags: +PHP 8.0, +DrupalFest2021
joseph.olstad’s picture

Thanks, I haven't had a chance to make a patch yet but ya any assistance is appreciated! Thanks so much in advance.

Definately is a priority. file_entity also needs it

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new1.3 KB

This should fix both issues. Incidentally it fixes hook_features_export_render() as the module name is not an optional argument anyway.

joseph.olstad’s picture

Status: Needs review » Reviewed & tested by the community

Nice, ok it's going in

Thanks!

joseph.olstad’s picture

ok I pushed this in, but there's still 16 errors for php 8

tagged new releases maybe prematurely.

the other errors might be related to file_entity not media.
?

joseph.olstad’s picture

no regressions though, that's good

joseph.olstad’s picture

Status: Reviewed & tested by the community » Active

Hmm, patch was good, but need to figure out what else needs to go in , maybe file_entity changes.

joseph.olstad’s picture

Version: 7.x-4.x-dev » 7.x-1.x-dev
StatusFileSize
new506 bytes

patch for 1.x

joseph.olstad’s picture

Version: 7.x-1.x-dev » 7.x-4.x-dev
Status: Active » Needs work
joseph.olstad’s picture

mile23’s picture

You know... This issue showing up as RTBC or NW in the release notes isn't a good look... :-) https://www.drupal.org/project/media/releases/7.x-2.27

Maybe try a new issue?

joseph.olstad’s picture

Patch?

damienmckenna’s picture

There are a bunch of additional errors in the testbot logs: https://www.drupal.org/pift-ci-job/2027264

joseph.olstad’s picture

I suggest we start with the file_entity fixes

#3208277: PHP 8 compatibility for file_entity

joseph.olstad’s picture

Status: Needs work » Fixed

latest core fixes makes all PHP 8.0 tests GREEN!

w00t, thanks @DamienMcKenna

Status: Fixed » Closed (fixed)

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