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

PHP 8.4 compatibility #17786

Merged
merged 2 commits into from
Nov 26, 2024
Merged

PHP 8.4 compatibility #17786

merged 2 commits into from
Nov 26, 2024

Conversation

@cedric-anne cedric-anne self-assigned this Sep 3, 2024
@cedric-anne cedric-anne force-pushed the 11.0/php-8.4 branch 6 times, most recently from 01de74a to 8fc71f9 Compare September 5, 2024 06:14
@cedric-anne cedric-anne added this to the 11.0.0 milestone Sep 5, 2024
@cedric-anne
Copy link
Member Author

I changed the error reporting level in our test suite to not report deprecations. I have done this because I spend too much time on every new PHP version to report/fix the deprecated usages in the vendor libraries.

The lint task will still be able to detect most deprecations (see https://github.com/glpi-project/glpi/actions/runs/12029123283/job/33533716142?pr=17786). We may miss some of them, for instance the deprecations triggered when a param has a specific value, but not fixing them ASAP is not an issue. Indeed, they are supposed to have no functional impact and we will anyway be able to detect and fix them when it will be a real issue, i.e. when we will work on a new PHP major version (next will be PHP 9.0 and is still not planned).

We may put back the deprecations report in our test suite later, but it requires either to refactor our error handler (for instance to filter the reports depending on their backtrace, and that may be complex), or completely remove our usage of atoum and use the ignoreIndirectDeprecations=true PHPUnit configuration.

The only library I had to patch is the apereo/phpcas library because it is always loaded early due to https://github.com/apereo/phpCAS/blob/690d431005e4f88651499458469536201623b057/composer.json#L35-L36 and was therefore triggering the deprecation before the error reporting level setting, and that was causing the failure of our test suite.

@cedric-anne cedric-anne marked this pull request as ready for review November 26, 2024 11:31
@cedric-anne cedric-anne merged commit efb7cf9 into glpi-project:main Nov 26, 2024
8 checks passed
@cedric-anne cedric-anne deleted the 11.0/php-8.4 branch November 26, 2024 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants