8000 [Debug] Actively discourage using Serializable by triggering a deprecation notice · Issue #30304 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Debug] Actively discourage using Serializable by triggering a deprecation notice #30304

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
nicolas-grekas opened this issue Feb 19, 2019 · 4 comments

Comments

@nicolas-grekas
Copy link
Member

When DebugClassLoader is registered, we could make it unconditionally trigger a deprecation notice when it loads a class that directly implements Serializable.

We should wait for https://wiki.php.net/rfc/custom_object_serialization to be resolved before.

@fancyweb
Copy link
Contributor

unconditionally = for all PHP versions and not only for the buggy 7.3 right ?

@nicolas-grekas
Copy link
Member Author

All PHP versions yes.

@fancyweb
Copy link
Contributor
fancyweb commented Apr 7, 2019

The RFC has been accepted. I will implement this feature today. #eufossa

fabpot added a commit to twigphp/Twig that referenced this issue Apr 7, 2019
This PR was merged into the 1.x branch.

Discussion
----------

Prepare for the new serialization mechanism

#eufossa

related to symfony/symfony#30965

So we are future proof and it will prevent deprecations for symfony/symfony#30304.

Almost future proof actually because the void return type cannot be added in 7.0. I guess we can see the minimum required PHP version here once 7.4 is out and see how we can handle compatibility 😕

Commits
-------

72d7abe Prepare for the new serialization mechanism
symfony-splitter pushed a commit to symfony/form that referenced this issue Apr 8, 2019
This PR was merged into the 4.3-dev branch.

Discussion
----------

Prepare for the new serialization mechanism

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

#eufossa

Should I maybe split this component by component ?

https://wiki.php.net/rfc/custom_object_serialization has been accepted.

Best viewed in "split" mode.

This work is kind of required for symfony/symfony#30304 so we don't trigger 30 deprecations from our own code base.

Commits
-------

d412e77a9c Prepare for the new serialization mechanism
symfony-splitter pushed a commit to symfony/routing that referenced this issue Apr 8, 2019
This PR was merged into the 4.3-dev branch.

Discussion
----------

Prepare for the new serialization mechanism

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

#eufossa

Should I maybe split this component by component ?

https://wiki.php.net/rfc/custom_object_serialization has been accepted.

Best viewed in "split" mode.

This work is kind of required for symfony/symfony#30304 so we don't trigger 30 deprecations from our own code base.

Commits
-------

d412e77a9c Prepare for the new serialization mechanism
fabpot added a commit that referenced this issue Apr 8, 2019
This PR was merged into the 4.3-dev branch.

Discussion
----------

Prepare for the new serialization mechanism

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

#eufossa

Should I maybe split this component by component ?

https://wiki.php.net/rfc/custom_object_serialization has been accepted.

Best viewed in "split" mode.

This work is kind of required for #30304 so we don't trigger 30 deprecations from our own code base.

Commits
-------

d412e77 Prepare for the new serialization mechanism
symfony-splitter pushed a commit to symfony/validator that referenced this issue Apr 8, 2019
This PR was merged into the 4.3-dev branch.

Discussion
----------

Prepare for the new serialization mechanism

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

#eufossa

Should I maybe split this component by component ?

https://wiki.php.net/rfc/custom_object_serialization has been accepted.

Best viewed in "split" mode.

This work is kind of required for symfony/symfony#30304 so we don't trigger 30 deprecations from our own code base.

Commits
-------

d412e77a9c Prepare for the new serialization mechanism
@nicolas-grekas
Copy link
Member Author

Too much work :)
Let's do it during reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
0