Why change it?
The interface's nested serialization behavior creates correctness and security problems. The magic methods separate data collection from encoding.
Find it today.
Use this search or static-analysis diagnostic as a first pass. Review each result: text searches find candidates and miss cases that require type or control-flow analysis.
rg -n 'Serializable|FETCH_SERIALIZE' app --glob '*.php'Make the fix earn its place.
Add a test for the path that relied on the old behavior. Check your dependencies as well as your own code, then run with all warnings and deprecations enabled. These examples show the syntax change; adapt them to your application's data and behavior.
Follow the upgrade checklist ↗