Skip to content

The __sleep() serialization magic method is deprecated #57011

@kocsismate

Description

@kocsismate

Laravel Version

12.2.0

PHP Version

8.5-dev

Database Driver & Version

No response

Description

I'm maintaining PHP's benchmark suite (https://github.com/kocsismate/php-version-benchmarks) that runs every day. I noticed today that the Laravel test fails with the current master branch because the Illuminate\Database\Eloquent\Model class is affected by the https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_sleep_and_wakeup_magic_methods deprecation that had just been implemented: php/php-src@f18e992.

The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary) in ./vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:34

Link to failure: https://github.com/php/php-src/actions/runs/17630658596/job/50097333530#step:16:19969

Steps To Reproduce

The deprecation is triggered by the Laravel demo app.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions