Problem/Motivation

When running head of the latest 8.x-3.x dev release of charts, getting a php 8.0 related issue when running php 8.0
Deprecated: Required parameter $pluginType follows optional parameter $defaults in charts/src/Settings/ChartsBaseSettingsForm.php on line 52

Steps to reproduce

install php 8.0, this module, start using it. You may see the error.

Proposed resolution

working on it

Remaining tasks

TBD

User interface changes

N/A

API changes

TBD

Data model changes

N/A

Comments

joseph.olstad created an issue. See original summary.

joseph.olstad’s picture

StatusFileSize
new5.2 KB

see patch

joseph.olstad’s picture

Tested with charts 3.x dev and this patch, no more errors running php 8.0

joseph.olstad’s picture

Assigned: joseph.olstad » Unassigned
Status: Active » Reviewed & tested by the community

tested my own patch, it's ready

joseph.olstad’s picture

not quite ready yet

joseph.olstad’s picture

StatusFileSize
new5.99 KB
new1.05 KB

try this one

The last submitted patch, 2: charts3x-3247344-2.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

joseph.olstad’s picture

StatusFileSize
new10.69 KB
new7.46 KB

here's a better patch
and interdiff

code sniffer fixes also

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 8: charts3x-3247344-8.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

joseph.olstad’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new10.71 KB
new7.49 KB
joseph.olstad’s picture

I just sponsored this project 50 USD$

Hope this patch makes it into a tagged 3.x release soon!

Thanks

joseph.olstad’s picture

StatusFileSize
new873 bytes
new11.36 KB

this "might" help the php 8.0 D9 tests, not sure.

joseph.olstad’s picture

StatusFileSize
new10.48 KB
new20.98 KB

Yet another

joseph.olstad’s picture

joseph.olstad’s picture

Ok patch 14 (in comment 13) looks like it's the one.

The only thing I am curious of is if we change this in the tests:

          $default_value = '';
          if (isset($options['data_fields'][$field_name])) {
            $default_value = $options['data_fields'][$field_name];
          }

To this:

          $default_value = NULL;
          if (isset($options['data_fields'][$field_name])) {
            $default_value = $options['data_fields'][$field_name];
          }

and see if the tests still pass.

andileco’s picture

Thank you, @joseph.olstad! Getting a donation and a patch is a rare treat for a maintainer! I will definitely work to incorporate this ASAP.

joseph.olstad’s picture

I also fixed some code sniffer style changes as you'll maybe notice in the patch.

andileco’s picture

Version: 8.x-3.x-dev » 5.0.x-dev
Status: Reviewed & tested by the community » Needs work

Committed for 8.x-3.x. Changing to 5.0.x.

andileco’s picture

Status: Needs work » Needs review
StatusFileSize
new1.56 KB

Adding a patch for 5.0.x.

  • andileco committed 36ab4e6 on 5.0.x
    Issue #3247344 by joseph.olstad, andileco: PHP 8.0 compatibility
    
andileco’s picture

Status: Needs review » Fixed
joseph.olstad’s picture

added some child issues for followup

joseph.olstad’s picture

*** EDIT ***

No rush, but would be nice to have a tagged release

*** EDIT ***

joseph.olstad’s picture

Please tag and release when you have a chance! Thanks :)

andileco’s picture

I had been hoping to squeeze in another couple fixes, but went ahead and 3.3 is available now. Please do investigate 5.0.x too!

joseph.olstad’s picture

@andileco, thanks so much for this, I have one more favor to ask you, please add php 8.0 to the test default to replace php 7.2, we should only have to test php 7.4, php 8.0 and php 8.1 because in a few days from now PHP 7.3 will be "End of Life"
https://www.drupal.org/node/232629/qa
Drupal 8 will also be EOL soon therefore all tests should cover Drupal 9.2.x and 9.3.x, php 7.4 and php 8.0 (and 8.1)

Status: Fixed » Closed (fixed)

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