diff --git a/composer.lock b/composer.lock index 8f4ca65..9954441 100644 --- a/composer.lock +++ b/composer.lock @@ -983,16 +983,16 @@ }, { "name": "laminas/laminas-cache", - "version": "3.0.x-dev", + "version": "3.1.2", "source": { "type": "git", "url": "https://github.com/laminas/laminas-cache.git", - "reference": "b658ea257b2578572005185e6460a52603c54f8c" + "reference": "e43a04ad7b04683e372615f729312e3c57d68c8f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-cache/zipball/b658ea257b2578572005185e6460a52603c54f8c", - "reference": "b658ea257b2578572005185e6460a52603c54f8c", + "url": "https://api.github.com/repos/laminas/laminas-cache/zipball/e43a04ad7b04683e372615f729312e3c57d68c8f", + "reference": "e43a04ad7b04683e372615f729312e3c57d68c8f", "shasum": "" }, "require": { @@ -1040,7 +1040,6 @@ "laminas/laminas-cli": "The laminas-cli binary can be used to consume commands provided by this component", "laminas/laminas-serializer": "Laminas\\Serializer component" }, - "default-branch": true, "type": "library", "extra": { "laminas": { @@ -1079,7 +1078,7 @@ "type": "community_bridge" } ], - "time": "2021-08-14T20:15:21+00:00" + "time": "2021-11-18T16:54:49+00:00" }, { "name": "laminas/laminas-cache-storage-adapter-benchmark", @@ -1538,16 +1537,16 @@ }, { "name": "laminas/laminas-stdlib", - "version": "3.6.0", + "version": "3.6.1", "source": { "type": "git", "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "c53d8537f108fac3fae652677a19735db730ba46" + "reference": "db581851a092246ad99e12d4fddf105184924c71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/c53d8537f108fac3fae652677a19735db730ba46", - "reference": "c53d8537f108fac3fae652677a19735db730ba46", + "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/db581851a092246ad99e12d4fddf105184924c71", + "reference": "db581851a092246ad99e12d4fddf105184924c71", "shasum": "" }, "require": { @@ -1593,7 +1592,7 @@ "type": "community_bridge" } ], - "time": "2021-09-02T16:11:32+00:00" + "time": "2021-11-10T11:33:52+00:00" }, { "name": "laminas/laminas-zendframework-bridge", @@ -4278,16 +4277,16 @@ }, { "name": "symfony/console", - "version": "v5.3.10", + "version": "v5.3.11", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3" + "reference": "3e7ab8f5905058984899b05a4648096f558bfeba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3", - "reference": "d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3", + "url": "https://api.github.com/repos/symfony/console/zipball/3e7ab8f5905058984899b05a4648096f558bfeba", + "reference": "3e7ab8f5905058984899b05a4648096f558bfeba", "shasum": "" }, "require": { @@ -4300,7 +4299,6 @@ "symfony/string": "^5.1" }, "conflict": { - "psr/log": ">=3", "symfony/dependency-injection": "<4.4", "symfony/dotenv": "<5.1", "symfony/event-dispatcher": "<4.4", @@ -4357,7 +4355,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.3.10" + "source": "https://github.com/symfony/console/tree/v5.3.11" }, "funding": [ { @@ -4373,7 +4371,7 @@ "type": "tidelift" } ], - "time": "2021-10-26T09:30:15+00:00" + "time": "2021-11-21T19:41:05+00:00" }, { "name": "symfony/deprecation-contracts", @@ -5398,16 +5396,16 @@ }, { "name": "vimeo/psalm", - "version": "4.12.0", + "version": "4.13.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "e42bc4a23f67acba28a23bb09c348e2ff38a1d87" + "reference": "cd489407a0219b93cadd04d5aff9845a942f7e5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/e42bc4a23f67acba28a23bb09c348e2ff38a1d87", - "reference": "e42bc4a23f67acba28a23bb09c348e2ff38a1d87", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/cd489407a0219b93cadd04d5aff9845a942f7e5d", + "reference": "cd489407a0219b93cadd04d5aff9845a942f7e5d", "shasum": "" }, "require": { @@ -5453,7 +5451,8 @@ "weirdan/prophecy-shim": "^1.0 || ^2.0" }, "suggest": { - "ext-igbinary": "^2.0.5" + "ext-curl": "In order to send data to shepherd", + "ext-igbinary": "^2.0.5 is required, used to serialize caching data" }, "bin": [ "psalm", @@ -5497,9 +5496,9 @@ ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.12.0" + "source": "https://github.com/vimeo/psalm/tree/4.13.0" }, - "time": "2021-11-06T10:31:17+00:00" + "time": "2021-11-19T20:24:40+00:00" }, { "name": "webimpress/coding-standard", diff --git a/src/Filesystem.php b/src/Filesystem.php index d61a481..4422045 100644 --- a/src/Filesystem.php +++ b/src/Filesystem.php @@ -106,7 +106,8 @@ public function __construct($options = null, ?FilesystemInteractionInterface $fi // clean total space buffer on change cache_dir $events = $this->getEventManager(); - $handle = null; + $handle = function (): void { + }; $totalSpace = &$this->totalSpace; $callback = function ($event) use (&$events, &$handle, &$totalSpace) { $params = $event->getParams(); diff --git a/test/unit/Filesystem/TestAsset/DelayedFilesystemInteraction.php b/test/unit/Filesystem/TestAsset/DelayedFilesystemInteraction.php index 8410b90..0d8acbe 100644 --- a/test/unit/Filesystem/TestAsset/DelayedFilesystemInteraction.php +++ b/test/unit/Filesystem/TestAsset/DelayedFilesystemInteraction.php @@ -14,9 +14,13 @@ final class DelayedFilesystemInteraction implements FilesystemInteractionInterfa /** @var FilesystemInteractionInterface */ private $filesystem; - /** @var int */ + /** + * @var int + * @psalm-var positive-int + */ private $delay; + /** @psalm-param positive-int $delay */ public function __construct(int $delay) { $this->filesystem = new LocalFilesystemInteraction(); diff --git a/test/unit/FilesystemTest.php b/test/unit/FilesystemTest.php index ebe8f80..e9346cd 100644 --- a/test/unit/FilesystemTest.php +++ b/test/unit/FilesystemTest.php @@ -89,6 +89,16 @@ protected function tearDown(): void parent::tearDown(); } + public function testFileSystemeOptionIsUpdatedWhenFileSystemeOptionIsChange(): void + { + $storage = new Filesystem(); + $options = new FilesystemOptions(); + $storage->setOptions($options); + $options->setCacheDir($this->tmpCacheDir); + + $this->assertSame($this->tmpCacheDir, $storage->getOptions()->getCacheDir()); + } + public function testSetNoAtimeChangesAtimeOfMetadataCapability(): void { $capabilities = $this->storage->getCapabilities();