Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Replace __sleep/wakeup() by __(un)serialize() for throwing and internal usages#61727

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

Merged
nicolas-grekas merged 1 commit intosymfony:6.4fromnicolas-grekas:sleep-throw
Sep 11, 2025

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekasnicolas-grekas commentedSep 11, 2025
edited
Loading

QA
Branch?6.4
Bug fix?yes
New feature?no
Deprecations?no
Issues-
LicenseMIT

This PR replaces__sleep/wakeup() by__(un)serialize(), for throwing and internal usages.

This follows the merge ofphp/php-src#19435

While this change on 8.5 might be reverted (seehttps://wiki.php.net/rfc/soft-deprecate-sleep-wakeup), we can still remove all those cases.

This DOES NOT replace all use cases of__sleep/wakeup(). We did so already on branch 7.4, but doing it on branch 6.4 is another story. This would basically be way to risky IMHO, with a bunch of non-trivial code to add just to fix the deprecation.

My recommendation for those remaining use cases is to ignore the deprecation. By the time ppl will move to PHP 8.5, they will also move away from Symfony 6.4

I'll submit another PR to the phpunit-bridge for that.

For the record, here is the list of files/classes that cannot be "just" migrated to__(un)serialize()
(I'll let the reader wonder about how they could be - and compare their ideas to what we did in 7.4):

  • src/Symfony/Component/HttpKernel/Profiler/Profile.php
  • src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php
  • src/Symfony/Component/HttpKernel/Kernel.php
  • src/Symfony/Component/String/AbstractString.php
  • src/Symfony/Component/String/LazyString.php
  • src/Symfony/Component/Mime/Part/SMimePart.php
  • src/Symfony/Component/Mime/Part/TextPart.php
  • src/Symfony/Component/Mime/Part/DataPart.php
  • src/Symfony/Component/Validator/Constraint.php
  • src/Symfony/Component/Validator/Mapping/GenericMetadata.php
  • src/Symfony/Component/Validator/Mapping/MemberMetadata.php
  • src/Symfony/Component/Validator/Mapping/ClassMetadata.php
  • src/Symfony/Component/Serializer/Mapping/AttributeMetadata.php
  • src/Symfony/Component/Serializer/Mapping/ClassMetadata.php

@carsonbotcarsonbot added this to the6.4 milestoneSep 11, 2025
@carsonbotcarsonbot changed the titleReplace __sleep/wakeup() by __(un)serialize() for throwing and internal usages Replace __sleep/wakeup() by __(un)serialize() for throwing and internal usagesSep 11, 2025
@nicolas-grekasnicolas-grekasforce-pushed thesleep-throw branch 2 times, most recently fromef6aeb6 tof068888CompareSeptember 11, 2025 09:53
@nicolas-grekasnicolas-grekas merged commit92a6bd1 intosymfony:6.4Sep 11, 2025
9 of 12 checks passed
@nicolas-grekasnicolas-grekas deleted the sleep-throw branchSeptember 11, 2025 10:08
This was referencedSep 27, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@dunglasdunglasAwaiting requested review from dunglasdunglas is a code owner

@jderussejderusseAwaiting requested review from jderussejderusse is a code owner

@xabbuhxabbuhAwaiting requested review from xabbuhxabbuh is a code owner

@ycerutoycerutoAwaiting requested review from ycerutoyceruto is a code owner

Assignees
No one assigned
Projects
None yet
Milestone
6.4
Development

Successfully merging this pull request may close these issues.

2 participants
@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp