On Wed, August 13, 2025 at 10:54 Larry Garfield wrote: > (And I think this does lend still more weight to Juliette's frequent request > for more > robust impact analysis for deprecations. Not because deprecations are bad, > but because > we should know what the impact is so we know how to mitigate it effectively.)
I analyzed the top 1500 Composer packages to find and categorize usages of the `__sleep` and `__wakeup` methods. There are a total of 250 `__sleep` methods and 259 `__wakeup` methods in these packages (509 total). Of these, 108 are empty methods containing no code. Most of these are stubs in the jetbrains\phpstorm-stubs package. Another 152 of the methods contain only a single throw statement. This leaves 160 `__sleep` methods and 89 `__wakeup` methods (249 total) which do something else. 150 of these (over 60%) exist in just 9 packages: * doctrine\orm - 14 * drupal\core - 38 * laminas\laminas-server - 7 * maatwebsite\excel - 7 * magento\zend-db - 7 * pdepend\pdepend - 31 * roots\wordpress-no-content - 6 * symfony\mime - 8 * symfony\symfony - 32 Outside of the above packages, `__sleep` and `__wakup` methods generally seem to be few and far between. I created a Google Sheet to view the per-package statistics: https://docs.google.com/spreadsheets/d/1i7GINJdTjXk4lj012vwd7ipZTxuucduYh-JyYm6V6Y8/edit?usp=sharing The raw code for each `__sleep` and `__wakeup` method can be viewed here: https://gist.github.com/theodorejb/965633b9787475dfe64cc53dc941bc49 Kind regards, Theodore