Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Drop \Serializable implementations#30051
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
renanbr commentedJan 31, 2019
This is a work in progress. There are some issues to be solved. KernelInterface APII'm not able to mesure the impact of droping TestsTraces into objectsThis new serialization strategy injects a trace into the serialized objects.
Tests realying on serialized strings
Tests failing
|
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas commentedFeb 1, 2019
I would consider implementing |
Uh oh!
There was an error while loading.Please reload this page.
renanbr commentedFeb 1, 2019
@stof, using __sleep without transient attribute will break serialization for child classes (if parent class has private attributes in the bulk). In other words: Serializing extended classes won't work anymore. Real example: I ketp the trasient attribute in the Here is a list of classes that mention private attributes in
Please, check if I should revert it for some of them. Here is the list of classes mentioning only protected attributes in
Here is the list of classes I did changed the transient attribute approach:
@nicolas-grekas Tests still failing:
|
nicolas-grekas left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM, with a minor comment.
Let's make tests pass and good to go.
We could and should IMHO make all these classes final, in another PR if you're up to.
src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas commentedFeb 5, 2019
Actually, we cannot do that for Maybe split the data-collector related changes to a separate PR to move the rest forward? |
renanbr commentedFeb 5, 2019
I think we can drop |
nicolas-grekas commentedFeb 5, 2019
And we still need to move forward, so we need plans :) |
renanbr commentedFeb 8, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Updates:
❗ Test failing It seems the strategy applyed in Here is an example where native |
chalasr commentedFeb 11, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
OK for dropping |
nicolas-grekas commentedFeb 17, 2019
Changelogs updated. Not sure about upgrade files, so I didn't update them. |
nicolas-grekas commentedFeb 17, 2019
Thank you@renanbr. |
This PR was merged into the 4.3-dev branch.Discussion----------Drop \Serializable implementations| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | no| BC breaks? | yes, it removes `\Serializable` interface from many classes| Deprecations? | no| Tests pass? | yes| Fixed tickets | n/a| License | MIT| Doc PR | n/aThis PR replaces [Serializable](https://secure.php.net/serializable) implementations with [__sleep() and __wakeup()](http://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.sleep).Changes touch these components:- Config- DependencyInjection- Form- HttpKernel- ValidatorCommits-------f8bf973 Drop \Serializable
Uh oh!
There was an error while loading.Please reload this page.
\Serializableinterface from many classesThis PR replacesSerializable implementations with__sleep() and __wakeup().
Changes touch these components: