diff --git a/autoload.php b/autoload.php index 2349e8f4a..4a17d6f53 100644 --- a/autoload.php +++ b/autoload.php @@ -14,10 +14,7 @@ echo $err; } } - trigger_error( - $err, - E_USER_ERROR - ); + throw new RuntimeException($err); } require_once __DIR__ . '/composer/autoload_real.php'; diff --git a/composer.json b/composer.json index 84975a4ca..8cab9352e 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "icewind/searchdav": "^3.1.0", "icewind/streams": "^0.7.7", "kornrunner/blurhash": "^1.2", - "laravel/serializable-closure": "^1.3.5", + "laravel/serializable-closure": "^1.3.7", "mexitek/phpcolors": "^1.0", "microsoft/azure-storage-blob": "^1.5.4", "mlocati/ip-lib": "^1.18", diff --git a/composer.lock b/composer.lock index fcf2aebb4..cefb6f287 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "fae6c5070ff2ba0a2dc92740e4175ceb", + "content-hash": "edadab1d353db26286a4b6fd5941449e", "packages": [ { "name": "aws/aws-crt-php", @@ -1679,16 +1679,16 @@ }, { "name": "laravel/serializable-closure", - "version": "v1.3.5", + "version": "v1.3.7", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "1dc4a3dbfa2b7628a3114e43e32120cce7cdda9c" + "reference": "4f48ade902b94323ca3be7646db16209ec76be3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/1dc4a3dbfa2b7628a3114e43e32120cce7cdda9c", - "reference": "1dc4a3dbfa2b7628a3114e43e32120cce7cdda9c", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/4f48ade902b94323ca3be7646db16209ec76be3d", + "reference": "4f48ade902b94323ca3be7646db16209ec76be3d", "shasum": "" }, "require": { @@ -1736,7 +1736,7 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2024-09-23T13:33:08+00:00" + "time": "2024-11-14T18:34:49+00:00" }, { "name": "lcobucci/clock", @@ -6351,15 +6351,15 @@ "packages-dev": [], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { "php": "^8.1" }, - "platform-dev": [], + "platform-dev": {}, "platform-overrides": { "php": "8.1.0" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/composer/InstalledVersions.php b/composer/InstalledVersions.php index 6d29bff66..2052022fd 100644 --- a/composer/InstalledVersions.php +++ b/composer/InstalledVersions.php @@ -26,6 +26,12 @@ */ class InstalledVersions { + /** + * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to + * @internal + */ + private static $selfDir = null; + /** * @var mixed[]|null * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null @@ -322,6 +328,18 @@ public static function reload($data) self::$installedIsLocalDir = false; } + /** + * @return string + */ + private static function getSelfDir() + { + if (self::$selfDir === null) { + self::$selfDir = strtr(__DIR__, '\\', '/'); + } + + return self::$selfDir; + } + /** * @return array[] * @psalm-return list}> @@ -336,7 +354,7 @@ private static function getInstalled() $copiedLocalDir = false; if (self::$canGetVendors) { - $selfDir = strtr(__DIR__, '\\', '/'); + $selfDir = self::getSelfDir(); foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { $vendorDir = strtr($vendorDir, '\\', '/'); if (isset(self::$installedByVendor[$vendorDir])) { diff --git a/composer/installed.json b/composer/installed.json index 16e9e4487..1fc9293ea 100644 --- a/composer/installed.json +++ b/composer/installed.json @@ -1742,17 +1742,17 @@ }, { "name": "laravel/serializable-closure", - "version": "v1.3.5", - "version_normalized": "1.3.5.0", + "version": "v1.3.7", + "version_normalized": "1.3.7.0", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "1dc4a3dbfa2b7628a3114e43e32120cce7cdda9c" + "reference": "4f48ade902b94323ca3be7646db16209ec76be3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/1dc4a3dbfa2b7628a3114e43e32120cce7cdda9c", - "reference": "1dc4a3dbfa2b7628a3114e43e32120cce7cdda9c", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/4f48ade902b94323ca3be7646db16209ec76be3d", + "reference": "4f48ade902b94323ca3be7646db16209ec76be3d", "shasum": "" }, "require": { @@ -1765,7 +1765,7 @@ "phpstan/phpstan": "^1.8.2", "symfony/var-dumper": "^5.4.11|^6.2.0|^7.0.0" }, - "time": "2024-09-23T13:33:08+00:00", + "time": "2024-11-14T18:34:49+00:00", "type": "library", "extra": { "branch-alias": { diff --git a/composer/installed.php b/composer/installed.php index a15957978..829148f0c 100644 --- a/composer/installed.php +++ b/composer/installed.php @@ -218,9 +218,9 @@ 'dev_requirement' => false, ), 'laravel/serializable-closure' => array( - 'pretty_version' => 'v1.3.5', - 'version' => '1.3.5.0', - 'reference' => '1dc4a3dbfa2b7628a3114e43e32120cce7cdda9c', + 'pretty_version' => 'v1.3.7', + 'version' => '1.3.7.0', + 'reference' => '4f48ade902b94323ca3be7646db16209ec76be3d', 'type' => 'library', 'install_path' => __DIR__ . '/../laravel/serializable-closure', 'aliases' => array(), diff --git a/laravel/serializable-closure/src/Serializers/Native.php b/laravel/serializable-closure/src/Serializers/Native.php index 59a1bc6cc..732549026 100644 --- a/laravel/serializable-closure/src/Serializers/Native.php +++ b/laravel/serializable-closure/src/Serializers/Native.php @@ -504,6 +504,10 @@ protected function mapByReference(&$data) continue; } + if (PHP_VERSION >= 8.1 && $property->isReadOnly() && $property->class !== $reflection->name) { + continue; + } + $value = $property->getValue($instance); if (is_array($value) || is_object($value)) { diff --git a/laravel/serializable-closure/src/Support/ReflectionClosure.php b/laravel/serializable-closure/src/Support/ReflectionClosure.php index e489996bb..e92960023 100644 --- a/laravel/serializable-closure/src/Support/ReflectionClosure.php +++ b/laravel/serializable-closure/src/Support/ReflectionClosure.php @@ -806,7 +806,7 @@ public function isScopeRequired() } /** - * The the hash of the current file name. + * The hash of the current file name. * * @return string */