-
-
Notifications
You must be signed in to change notification settings - Fork 338
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.1 deprecations #919
PHP 8.1 deprecations #919
Conversation
I addressed doctrine test crashes separately: #920 |
I'm not sure what to do with this one: 1) Payum\Core\Tests\Security\SensitiveValueTest::shouldNotSerializeValue
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'N;'
+'O:34:"Payum\Core\Security\SensitiveValue":0:{}' You can't serialize to null in 8.1+ |
91d4ad6
to
9e766ff
Compare
Rebased the PR. Serialization seems to be the only problem |
@arokettu I think you can wrap that test just in an if (PHP_VERSION_ID >= 70400) {
$this->assertEquals('O:34:"Payum\Core\Security\SensitiveValue":0:{}', $serializedValue);
} else {
$this->assertEquals('N;', $serializedValue);
} |
@pierredup I'm more concerned whether it is not acceptable / acceptable but bc break / whatever other problem there might be Fixing tests is easy |
@arokettu The IMHO if someone depends on this class being able to serialize to |
Ok, thank you |
Remaining deprecations:
I couldn't trace the last one, may be an external one. I don't know how to fix Klarna because I don't know what values it expects, I never used it. But anyway, Klarna's lib is not PHP 8.1 ready itself so the fix can be postponed. |
If that's ok I think it's ready. At least the Core is now PHP 8.1 ready |
Thank you @arokettu |
#[\ReturnTypeWillChange]
\Serializable
is deprecated when used without__serialize
/__unserialize
: https://wiki.php.net/rfc/phase_out_serializable