diff --git a/CHANGELOG.md b/CHANGELOG.md index 02b2398f4216..ef9ff6061454 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,16 @@ # Release Notes for 11.x -## [Unreleased](https://github.com/laravel/framework/compare/v11.45.2...11.x) +## [Unreleased](https://github.com/laravel/framework/compare/v11.46.0...11.x) + +## [v11.46.0](https://github.com/laravel/framework/compare/v11.45.3...v11.46.0) - 2025-09-08 + +## [v11.45.3](https://github.com/laravel/framework/compare/v11.45.2...v11.45.3) - 2025-09-02 + +* [11.x] Test Improvements by [@crynobone](https://github.com/crynobone) in https://github.com/laravel/framework/pull/56649 +* [11.x] Fix exception page not preparing SQL bindings by [@crynobone](https://github.com/crynobone) in https://github.com/laravel/framework/pull/56651 +* [11.x] Test Improvements by [@crynobone](https://github.com/crynobone) in https://github.com/laravel/framework/pull/56849 +* [11.x] Chore: Decouple Str::random() from Validator by [@michaeldyrynda](https://github.com/michaeldyrynda) in https://github.com/laravel/framework/pull/56852 +* [11.x] Allow a wider range of `brick/math` versions by [@GrahamCampbell](https://github.com/GrahamCampbell) in https://github.com/laravel/framework/pull/56890 ## [v11.45.2](https://github.com/laravel/framework/compare/v11.45.1...v11.45.2) - 2025-08-13 diff --git a/src/Illuminate/Database/Eloquent/Model.php b/src/Illuminate/Database/Eloquent/Model.php index 44878f7bf880..2d54b2c82e5e 100644 --- a/src/Illuminate/Database/Eloquent/Model.php +++ b/src/Illuminate/Database/Eloquent/Model.php @@ -2421,7 +2421,15 @@ public function __sleep() $this->classCastCache = []; $this->attributeCastCache = []; - return array_keys(get_object_vars($this)); + // When serializing the model, we may accidentally catch up some virtual properties. + // We will cast the model to a native array to skip them and then apply a function + // to clean each of the property names which is miles faster than using a regex. + return array_map( + fn ($key) => $key[0] === "\0" + ? substr($key, strpos($key, "\0", 1) + 1) + : $key, + array_keys((array) $this) + ); } /** diff --git a/src/Illuminate/Foundation/Application.php b/src/Illuminate/Foundation/Application.php index 1e64989f9f63..bec8cbe9eb42 100755 --- a/src/Illuminate/Foundation/Application.php +++ b/src/Illuminate/Foundation/Application.php @@ -45,7 +45,7 @@ class Application extends Container implements ApplicationContract, CachesConfig * * @var string */ - const VERSION = '11.45.3'; + const VERSION = '11.46.0'; /** * The base path for the Laravel installation.