Skip to content

Commit

Permalink
Merge pull request #1239 from nextcloud/fix/bump-laravel/serializable…
Browse files Browse the repository at this point in the history
…-closure-to-1.2.2-in-master

Bump laravel/serializable-closure to 1.2.2 in master
  • Loading branch information
come-nc authored Nov 28, 2022
2 parents fc9d6ab + fa395b2 commit ccf315f
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 25 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"guzzlehttp/guzzle": "^7.4.0",
"icewind/searchdav": "^3.0",
"icewind/streams": "v0.7.5",
"laravel/serializable-closure": "^1.2",
"laravel/serializable-closure": "^1.2.2",
"mexitek/phpcolors": "^1.0",
"microsoft/azure-storage-blob": "^1.5.4",
"mlocati/ip-lib": "^1.18",
Expand Down
19 changes: 10 additions & 9 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 10 additions & 9 deletions composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -1929,28 +1929,29 @@
},
{
"name": "laravel/serializable-closure",
"version": "v1.2.0",
"version_normalized": "1.2.0.0",
"version": "v1.2.2",
"version_normalized": "1.2.2.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/serializable-closure.git",
"reference": "09f0e9fb61829f628205b7c94906c28740ff9540"
"reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/serializable-closure/zipball/09f0e9fb61829f628205b7c94906c28740ff9540",
"reference": "09f0e9fb61829f628205b7c94906c28740ff9540",
"url": "https://api.github.com/repos/laravel/serializable-closure/zipball/47afb7fae28ed29057fdca37e16a84f90cc62fae",
"reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae",
"shasum": ""
},
"require": {
"php": "^7.3|^8.0"
},
"require-dev": {
"pestphp/pest": "^1.18",
"phpstan/phpstan": "^0.12.98",
"symfony/var-dumper": "^5.3"
"nesbot/carbon": "^2.61",
"pestphp/pest": "^1.21.3",
"phpstan/phpstan": "^1.8.2",
"symfony/var-dumper": "^5.4.11"
},
"time": "2022-05-16T17:09:47+00:00",
"time": "2022-09-08T13:45:54+00:00",
"type": "library",
"extra": {
"branch-alias": {
Expand Down
10 changes: 5 additions & 5 deletions composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => 'nextcloud/3rdparty',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '02ba5bba999b61d40c79a6ed56683b69edf66619',
'reference' => 'fc9d6ab7f2e990ebb09a9c322db6930a0a27444a',
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),
Expand Down Expand Up @@ -254,9 +254,9 @@
'dev_requirement' => false,
),
'laravel/serializable-closure' => array(
'pretty_version' => 'v1.2.0',
'version' => '1.2.0.0',
'reference' => '09f0e9fb61829f628205b7c94906c28740ff9540',
'pretty_version' => 'v1.2.2',
'version' => '1.2.2.0',
'reference' => '47afb7fae28ed29057fdca37e16a84f90cc62fae',
'type' => 'library',
'install_path' => __DIR__ . '/../laravel/serializable-closure',
'aliases' => array(),
Expand Down Expand Up @@ -328,7 +328,7 @@
'nextcloud/3rdparty' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '02ba5bba999b61d40c79a6ed56683b69edf66619',
'reference' => 'fc9d6ab7f2e990ebb09a9c322db6930a0a27444a',
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),
Expand Down
7 changes: 7 additions & 0 deletions laravel/serializable-closure/src/Serializers/Native.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Laravel\SerializableClosure\Serializers;

use Closure;
use DateTimeInterface;
use Laravel\SerializableClosure\Contracts\Serializable;
use Laravel\SerializableClosure\SerializableClosure;
use Laravel\SerializableClosure\Support\ClosureScope;
Expand Down Expand Up @@ -460,6 +461,12 @@ protected function mapByReference(&$data)

$instance = $data;

if ($data instanceof DateTimeInterface) {
$this->scope[$instance] = $data;

return;
}

if ($data instanceof UnitEnum) {
$this->scope[$instance] = $data;

Expand Down
5 changes: 4 additions & 1 deletion laravel/serializable-closure/src/Serializers/Signed.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ public function __unserialize($signature)
throw new InvalidSignatureException();
}

$this->closure = unserialize($signature['serializable'])->getClosure();
/** @var \Laravel\SerializableClosure\Contracts\Serializable $serializable */
$serializable = unserialize($signature['serializable']);

$this->closure = $serializable->getClosure();
}
}
1 change: 1 addition & 0 deletions laravel/serializable-closure/src/Support/ClosureStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Laravel\SerializableClosure\Support;

#[\AllowDynamicProperties]
class ClosureStream
{
/**
Expand Down

0 comments on commit ccf315f

Please sign in to comment.