@mattmary opened this Issue on July 21st 2022 Contributor

PHP Fatal error: Declaration of Piwik\Plugins\PagePerformance\JqplotDataGenerator\Chart::setAxisYValues(&$values, $seriesLabels = null) must be compatible with Piwik\Plugins\CoreVisualizations\JqplotDataGenerator\Chart::setAxisYValues(&$values, $seriesMetadata = null, ?array $seriesUnits = null) in piwik/plugins/PagePerformance/JqplotDataGenerator/Chart.php on line 55

Expected Behavior

No Fatal error.

Current Behavior

I get this fatal error:

PHP Fatal error: Declaration of Piwik\Plugins\PagePerformance\JqplotDataGenerator\Chart::setAxisYValues(&$values, $seriesLabels = null) must be compatible with Piwik\Plugins\CoreVisualizations\JqplotDataGenerator\Chart::setAxisYValues(&$values, $seriesMetadata = null, ?array $seriesUnits = null) in piwik/plugins/PagePerformance/JqplotDataGenerator/Chart.php on line 55

Steps to Reproduce (for Bugs)

  1. git clone git@github.com:matomo-org/developer-documentation.git
  2. git checkout php8
  3. ./generate.sh

Your Environment

  • Matomo Version: branch 4.x-dev
  • PHP Version: 8.0.21
  • Server Operating System: Linux (Ubuntu)
  • Additionally installed plugins: none
@bx80 commented on July 21st 2022 Contributor

The method signature of setAxisYValues in plugins\CoreVisualizations/JqplotDataGenerator/Chart was updated with an extra parameter as part of #19353, the PagePerformance plugin overrides this method and already had a slightly different method signature ($seriesLabels vs $seriesMetaData), so the additional parameter has now made them incompatible.

The method signature in PagePerformance needs to be updated to match core.

This Issue was closed on July 27th 2022
Powered by GitHub Issue Mirror