-
Notifications
You must be signed in to change notification settings - Fork 22
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
switch to new serialization mechanism #114
Conversation
Codecov Report
@@ Coverage Diff @@
## master #114 +/- ##
==========================================
- Coverage 85.73% 85.66% -0.08%
==========================================
Files 42 42
Lines 9193 9210 +17
==========================================
+ Hits 7882 7890 +8
- Misses 1311 1320 +9
Continue to review full report at Codecov.
|
Notice: I kept old behavior to raise a warning for bad data during unserialization, but probably make sense to raise an exception, like in php-src (ex in Spl) |
Thanks! Looks like this requires a new major version, due to dropping Serializable. |
So it looks like it would be best to keep both, |
n00b question: does this imply that supporting ZEND_ACC_NOT_SERIALIZABLE is also recommended? See a comparable issue for the msgpack extension: msgpack/msgpack-php#161 |
FWIW: I am running into new deprecations with PHP 8.1.0 beta 1:
|
Yes, I'm not sure how to handle this yet; it probably needs a new major version fixing the method signatures. |
* Fixed PHP-8.1 compatibility (see gh issues #114, #115 and #118) * Fixed cookies failing with libcurl >= 7.77 (see gh issue #116) * Fixed tests using $_ENV instead of getenv() to find executables in PATH (see gh issue #113) * Added http\Env::reset(): resets internal HTTP request cache (see gh issue #90)
* Fixed PHP-8.1 compatibility (see gh issues #114, #115 and #118) * Fixed cookies failing with libcurl >= 7.77 (see gh issue #116) * Fixed tests using $_ENV instead of getenv() to find executables in PATH (see gh issue #113) * Added http\Env::reset(): resets internal HTTP request cache (see gh issue #90)
See
https://wiki.php.net/rfc/phase_out_serializable
https://wiki.php.net/rfc/custom_object_serialization
So this is supported since 7.4, and mandatory in 8.1
Drop Serializable interface usage, and implement new magic methods
NOTICE: this mean incompatibility with previous version and serialized data.
BTW.... serialized data should only be used for local temporary data... should be...
Test suite passes with both 8.0.7 and 8.1.0alpha1
P.S. old implementation is kept where used for toString.