Skip to content

Add compatibility with PHP 8.1 #58

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

Closed
julienloizelet opened this issue Dec 16, 2021 · 5 comments
Closed

Add compatibility with PHP 8.1 #58

julienloizelet opened this issue Dec 16, 2021 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@julienloizelet
Copy link
Collaborator

No description provided.

@julienloizelet julienloizelet self-assigned this Dec 16, 2021
@julienloizelet julienloizelet added the enhancement New feature or request label Dec 16, 2021
@julienloizelet
Copy link
Collaborator Author

julienloizelet commented Dec 16, 2021

At first, we have a PHPUNIT error, so we have update phpunit version to a more 8.1 compatible version : it seems that 8.5.21 is good enough.

Once this done, there is an issue with symfony/cache during unit test :
TypeError: Memcached::setMulti(): Argument #2 ($expiration) must be of type int, int given

It seems that the initial issue is due to memcached itself : php-memcached-dev/php-memcached#496 and that we have to wait for a new release. (the last release was done in 2019)

See also cakephp/cakephp#15534

@julienloizelet
Copy link
Collaborator Author

Here is the error thrown by github action unit tests : https://github.com/julienloizelet/php-cs-bouncer/runs/4555869742?check_suite_focus=true

For some reason, this error is thrown when using tests github actions and ddev local unit test but not when using the local script tests-local-php8.1.sh

@julienloizelet
Copy link
Collaborator Author

For information, we are waiting for a 8.1 compatible release of php-memcached : php-memcached-dev/php-memcached#495

@julienloizelet
Copy link
Collaborator Author

At this moment, the last release memcached (3.1.5) is not compatible with php 8.1 and there is no schedule for a new release.

Considering this, we will just exclude any Memcached test during Unit test using something like :

if (PHP_VERSION_ID >= 80100 && version_compare(phpversion('memcached'), '3.1.5', '<=')) {
    // do not use Memcached
}

@julienloizelet
Copy link
Collaborator Author

Closed : #59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant