Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure Matomo is functional with PHP 8.4 #22471

Open
tsteur opened this issue Aug 5, 2024 · 6 comments
Open

Ensure Matomo is functional with PHP 8.4 #22471

tsteur opened this issue Aug 5, 2024 · 6 comments
Assignees
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. triaged
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Aug 5, 2024

PHP 8.4 will be released on 21st Nov 2024 and we need to make sure that Matomo will work with this new version of PHP. That means a release needs to have happened by then.

It's still a few months away but figured to already create the issue now so we can schedule the issue in advance for around the time when the first RC releases come out.

@tsteur tsteur added Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. To Triage An issue awaiting triage by a Matomo core team member labels Aug 5, 2024
@innocraft-automation innocraft-automation added this to the 5.3.0 milestone Aug 6, 2024
@des-innocraft des-innocraft added triaged and removed To Triage An issue awaiting triage by a Matomo core team member labels Aug 8, 2024
@innocraft-automation innocraft-automation modified the milestone: 5.3.0 Sep 13, 2024
@narfk
Copy link

narfk commented Sep 25, 2024

Just a note:
Starting from PHP 8.4, the functions strtok() and md5() are marked as deprecated. Both functions appear frequently in the Matomo code. This won’t throw any errors but may be logged depending on the configuration.

@jostreff
Copy link

Fix PHP 8.4 deprecation: Implicitly marking parameter as nullable is deprecated, the explicit nullable type must be used instead - too many such cases in source.

@jostreff
Copy link

Also I have errors shown like this:

Deprecated: DI\Definition\Resolver\ObjectCreator::setPrivatePropertyValue(): Optional parameter $className declared before required parameter $propertyValue is implicitly treated as a required parameter in /usr/local/www/matomo/vendor/php-di/php-di/src/Definition/Resolver/ObjectCreator.php on line 212

Deprecated: Constant E_STRICT is deprecated in /usr/local/www/matomo/vendor/symfony/var-dumper/Caster/ExceptionCaster.php on line 44

Deprecated: Constant E_STRICT is deprecated in /usr/local/www/matomo/vendor/symfony/var-dumper/Caster/ExceptionCaster.php on line 44

Deprecated: Constant E_STRICT is deprecated in /usr/local/www/matomo/vendor/symfony/var-dumper/Caster/ExceptionCaster.php on line 44

@jostreff
Copy link

My checks are made with
PHP 8.4.0RC2 (cli) (built: Oct 16 2024 18:32:40) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.4.0RC2, Copyright (c) Zend Technologies
with Zend OPcache v8.4.0RC2, Copyright (c), by Zend Technologies

@sgiehl
Copy link
Member

sgiehl commented Oct 21, 2024

For PHP 8.4 we need to disable the error reporting for deprecation notices. While we were able to update all the deprecation notices caused in our code, we are not able to solve those that happen in the vendor libraries we are using.

Unfortunately we can't update libraries like php-di/php-di, as newer versions require at least PHP 8. Same applies for a couple of other libraries. So we may keep deprecation notices disabled for PHP 8.4+ until we dropped support for PHP < 8

@sgiehl
Copy link
Member

sgiehl commented Oct 21, 2024

Just a note:
Starting from PHP 8.4, the functions strtok() and md5() are marked as deprecated. Both functions appear frequently in the Matomo code. This won’t throw any errors but may be logged depending on the configuration.

Neither strtok() nor md5() have been deprecated with PHP 8.4. The suggestions to deprecate those methods have been rejected. See https://wiki.php.net/rfc/deprecations_php_8_4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. triaged
Projects
None yet
Development

No branches or pull requests

6 participants