From adbfa052d6f203319478e311fb57e1a14a058bb5 Mon Sep 17 00:00:00 2001 From: Corey Taylor Date: Thu, 17 Jun 2021 22:44:36 -0500 Subject: [PATCH 01/18] Normalize order of union types in docblocks --- CacheRegistry.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CacheRegistry.php b/CacheRegistry.php index fb6d0ab06..464689737 100644 --- a/CacheRegistry.php +++ b/CacheRegistry.php @@ -64,7 +64,7 @@ protected function _throwMissingClassError(string $class, ?string $plugin): void * * Part of the template method for Cake\Core\ObjectRegistry::load() * - * @param string|\Cake\Cache\CacheEngine $class The classname or object to make. + * @param \Cake\Cache\CacheEngine|string $class The classname or object to make. * @param string $alias The alias of the object. * @param array $config An array of settings to use for the cache engine. * @return \Cake\Cache\CacheEngine The constructed CacheEngine class. From 57dca48ae59fddc2671bfcd2b12a60a219b2b0d8 Mon Sep 17 00:00:00 2001 From: Corey Taylor Date: Wed, 14 Jul 2021 02:22:04 -0500 Subject: [PATCH 02/18] Convert single type[] array hints to array hints --- Cache.php | 4 ++-- CacheEngine.php | 2 +- Engine/ApcuEngine.php | 4 ++-- Engine/ArrayEngine.php | 2 +- Engine/MemcachedEngine.php | 4 ++-- Engine/RedisEngine.php | 2 +- Engine/WincacheEngine.php | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Cache.php b/Cache.php index fabf32a3a..ddc6269b6 100644 --- a/Cache.php +++ b/Cache.php @@ -71,7 +71,7 @@ class Cache * An array mapping URL schemes to fully qualified caching engine * class names. * - * @var string[] + * @var array * @psalm-var array */ protected static $_dsnClassMap = [ @@ -466,7 +466,7 @@ public static function clear(string $config = 'default'): bool /** * Delete all keys from the cache from all configurations. * - * @return bool[] Status code. For each configuration, it reports the status of the operation + * @return array Status code. For each configuration, it reports the status of the operation */ public static function clearAll(): array { diff --git a/CacheEngine.php b/CacheEngine.php index 56db69536..9c26353ee 100644 --- a/CacheEngine.php +++ b/CacheEngine.php @@ -317,7 +317,7 @@ abstract public function clearGroup(string $group): bool; * and returns the `group value` for each of them, this is * the token representing each group in the cache key * - * @return string[] + * @return array */ public function groups(): array { diff --git a/Engine/ApcuEngine.php b/Engine/ApcuEngine.php index 170ea4a43..085277953 100644 --- a/Engine/ApcuEngine.php +++ b/Engine/ApcuEngine.php @@ -29,7 +29,7 @@ class ApcuEngine extends CacheEngine * Contains the compiled group names * (prefixed with the global configuration prefix) * - * @var string[] + * @var array */ protected $_compiledGroupNames = []; @@ -183,7 +183,7 @@ public function add(string $key, $value): bool * If the group initial value was not found, then it initializes * the group accordingly. * - * @return string[] + * @return array * @link https://secure.php.net/manual/en/function.apcu-fetch.php * @link https://secure.php.net/manual/en/function.apcu-store.php */ diff --git a/Engine/ArrayEngine.php b/Engine/ArrayEngine.php index c33608204..9050537eb 100644 --- a/Engine/ArrayEngine.php +++ b/Engine/ArrayEngine.php @@ -152,7 +152,7 @@ public function clear(): bool * If the group initial value was not found, then it initializes * the group accordingly. * - * @return string[] + * @return array */ public function groups(): array { diff --git a/Engine/MemcachedEngine.php b/Engine/MemcachedEngine.php index 781c4cfc7..e0f273834 100644 --- a/Engine/MemcachedEngine.php +++ b/Engine/MemcachedEngine.php @@ -87,7 +87,7 @@ class MemcachedEngine extends CacheEngine protected $_serializers = []; /** - * @var string[] + * @var array */ protected $_compiledGroupNames = []; @@ -470,7 +470,7 @@ public function add(string $key, $value): bool * If the group initial value was not found, then it initializes * the group accordingly. * - * @return string[] + * @return array */ public function groups(): array { diff --git a/Engine/RedisEngine.php b/Engine/RedisEngine.php index 1eeed8cad..0a94bd94f 100644 --- a/Engine/RedisEngine.php +++ b/Engine/RedisEngine.php @@ -283,7 +283,7 @@ public function add(string $key, $value): bool * If the group initial value was not found, then it initializes * the group accordingly. * - * @return string[] + * @return array */ public function groups(): array { diff --git a/Engine/WincacheEngine.php b/Engine/WincacheEngine.php index 9d9e36eb6..4936f1188 100644 --- a/Engine/WincacheEngine.php +++ b/Engine/WincacheEngine.php @@ -155,7 +155,7 @@ public function clear(): bool * If the group initial value was not found, then it initializes * the group accordingly. * - * @return string[] + * @return array */ public function groups(): array { From 64df16c78a486f586ec14ca16192d99bbdf1b10c Mon Sep 17 00:00:00 2001 From: mscherer Date: Tue, 31 Aug 2021 22:16:09 +0200 Subject: [PATCH 03/18] Start documenting the assoc arrays as per their string key. --- Cache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cache.php b/Cache.php index ddc6269b6..01675a0b3 100644 --- a/Cache.php +++ b/Cache.php @@ -466,7 +466,7 @@ public static function clear(string $config = 'default'): bool /** * Delete all keys from the cache from all configurations. * - * @return array Status code. For each configuration, it reports the status of the operation + * @return array Status code. For each configuration, it reports the status of the operation */ public static function clearAll(): array { From 3b76a9b728f5bf1106bcec3c45f1e5e51c306d17 Mon Sep 17 00:00:00 2001 From: mscherer Date: Fri, 3 Sep 2021 16:00:27 +0200 Subject: [PATCH 04/18] Document the assoc arrays as per their string key. --- CacheEngine.php | 4 ++-- CacheRegistry.php | 2 +- Engine/ApcuEngine.php | 2 +- Engine/FileEngine.php | 4 ++-- Engine/MemcachedEngine.php | 4 ++-- Engine/RedisEngine.php | 4 ++-- Engine/WincacheEngine.php | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/CacheEngine.php b/CacheEngine.php index 9c26353ee..8e9fc613a 100644 --- a/CacheEngine.php +++ b/CacheEngine.php @@ -49,7 +49,7 @@ abstract class CacheEngine implements CacheInterface, CacheEngineInterface * - `warnOnWriteFailures` Some engines, such as ApcuEngine, may raise warnings on * write failures. * - * @var array + * @var array */ protected $_defaultConfig = [ 'duration' => 3600, @@ -72,7 +72,7 @@ abstract class CacheEngine implements CacheInterface, CacheEngineInterface * Called automatically by the cache frontend. Merge the runtime config with the defaults * before use. * - * @param array $config Associative array of parameters for the engine + * @param array $config Associative array of parameters for the engine * @return bool True if the engine has been successfully initialized, false if not */ public function init(array $config = []): bool diff --git a/CacheRegistry.php b/CacheRegistry.php index 464689737..c70835fc0 100644 --- a/CacheRegistry.php +++ b/CacheRegistry.php @@ -66,7 +66,7 @@ protected function _throwMissingClassError(string $class, ?string $plugin): void * * @param \Cake\Cache\CacheEngine|string $class The classname or object to make. * @param string $alias The alias of the object. - * @param array $config An array of settings to use for the cache engine. + * @param array $config An array of settings to use for the cache engine. * @return \Cake\Cache\CacheEngine The constructed CacheEngine class. * @throws \RuntimeException when an object doesn't implement the correct interface. */ diff --git a/Engine/ApcuEngine.php b/Engine/ApcuEngine.php index 085277953..bc90e8f0f 100644 --- a/Engine/ApcuEngine.php +++ b/Engine/ApcuEngine.php @@ -38,7 +38,7 @@ class ApcuEngine extends CacheEngine * * Called automatically by the cache frontend * - * @param array $config array of setting for the engine + * @param array $config array of setting for the engine * @return bool True if the engine has been successfully initialized, false if not */ public function init(array $config = []): bool diff --git a/Engine/FileEngine.php b/Engine/FileEngine.php index 22ec33ce0..e7ce5ea2c 100644 --- a/Engine/FileEngine.php +++ b/Engine/FileEngine.php @@ -57,7 +57,7 @@ class FileEngine extends CacheEngine * cache::gc from ever being called automatically. * - `serialize` Should cache objects be serialized first. * - * @var array + * @var array */ protected $_defaultConfig = [ 'duration' => 3600, @@ -81,7 +81,7 @@ class FileEngine extends CacheEngine * * Called automatically by the cache frontend. * - * @param array $config array of setting for the engine + * @param array $config array of setting for the engine * @return bool True if the engine has been successfully initialized, false if not */ public function init(array $config = []): bool diff --git a/Engine/MemcachedEngine.php b/Engine/MemcachedEngine.php index e0f273834..227161513 100644 --- a/Engine/MemcachedEngine.php +++ b/Engine/MemcachedEngine.php @@ -60,7 +60,7 @@ class MemcachedEngine extends CacheEngine * - `options` - Additional options for the memcached client. Should be an array of option => value. * Use the \Memcached::OPT_* constants as keys. * - * @var array + * @var array */ protected $_defaultConfig = [ 'compress' => false, @@ -96,7 +96,7 @@ class MemcachedEngine extends CacheEngine * * Called automatically by the cache frontend * - * @param array $config array of setting for the engine + * @param array $config array of setting for the engine * @return bool True if the engine has been successfully initialized, false if not * @throws \InvalidArgumentException When you try use authentication without * Memcached compiled with SASL support diff --git a/Engine/RedisEngine.php b/Engine/RedisEngine.php index 0a94bd94f..b7f0fec4b 100644 --- a/Engine/RedisEngine.php +++ b/Engine/RedisEngine.php @@ -51,7 +51,7 @@ class RedisEngine extends CacheEngine * - `timeout` timeout in seconds (float). * - `unix_socket` Path to the unix socket file (default: false) * - * @var array + * @var array */ protected $_defaultConfig = [ 'database' => 0, @@ -72,7 +72,7 @@ class RedisEngine extends CacheEngine * * Called automatically by the cache frontend * - * @param array $config array of setting for the engine + * @param array $config array of setting for the engine * @return bool True if the engine has been successfully initialized, false if not */ public function init(array $config = []): bool diff --git a/Engine/WincacheEngine.php b/Engine/WincacheEngine.php index 4936f1188..e9374b620 100644 --- a/Engine/WincacheEngine.php +++ b/Engine/WincacheEngine.php @@ -39,7 +39,7 @@ class WincacheEngine extends CacheEngine * * Called automatically by the cache frontend * - * @param array $config array of setting for the engine + * @param array $config array of setting for the engine * @return bool True if the engine has been successfully initialized, false if not */ public function init(array $config = []): bool From 15ffd28292153e3b8089bbcab35fc8159a639e01 Mon Sep 17 00:00:00 2001 From: ADmad Date: Sun, 12 Sep 2021 01:18:25 +0530 Subject: [PATCH 05/18] Fix docblock. --- Cache.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Cache.php b/Cache.php index fabf32a3a..56a9c34da 100644 --- a/Cache.php +++ b/Cache.php @@ -579,9 +579,8 @@ public static function enabled(): bool * the cache key is empty. Can be any callable type supported by your PHP. * @param string $config The cache configuration to use for this operation. * Defaults to default. - * @return mixed If the key is found: the cached data, false if the data - * missing/expired, or an error. If the key is not found: boolean of the - * success of the write + * @return mixed If the key is found: the cached data. + * If the key is not found the value returned by the callable. */ public static function remember(string $key, callable $callable, string $config = 'default') { From c3b63d7fe0bd0d277eec6f01bdd714d0157d1128 Mon Sep 17 00:00:00 2001 From: mscherer Date: Mon, 13 Sep 2021 10:54:59 +0200 Subject: [PATCH 06/18] Fix some grammar topics. --- Cache.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cache.php b/Cache.php index 01675a0b3..e5f7f0eb2 100644 --- a/Cache.php +++ b/Cache.php @@ -85,7 +85,7 @@ class Cache ]; /** - * Flag for tracking whether or not caching is enabled. + * Flag for tracking whether caching is enabled. * * @var bool */ @@ -548,7 +548,7 @@ public static function disable(): void } /** - * Check whether or not caching is enabled. + * Check whether caching is enabled. * * @return bool */ From 6dfe11a829fea480605c31502f6e46a281cd4940 Mon Sep 17 00:00:00 2001 From: mscherer Date: Fri, 17 Sep 2021 15:29:13 +0200 Subject: [PATCH 07/18] Fix up types in arrays of var def --- Cache.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cache.php b/Cache.php index e5f7f0eb2..e0ec4815e 100644 --- a/Cache.php +++ b/Cache.php @@ -71,7 +71,7 @@ class Cache * An array mapping URL schemes to fully qualified caching engine * class names. * - * @var array + * @var array * @psalm-var array */ protected static $_dsnClassMap = [ @@ -94,7 +94,7 @@ class Cache /** * Group to Config mapping * - * @var array + * @var array */ protected static $_groups = []; @@ -503,8 +503,8 @@ public static function clearGroup(string $group, string $config = 'default'): bo * $configs will equal to `['posts' => ['daily', 'weekly']]` * Calling this method will load all the configured engines. * - * @param string|null $group group name or null to retrieve all group mappings - * @return array map of group and all configuration that has the same group + * @param string|null $group Group name or null to retrieve all group mappings + * @return array Map of group and all configuration that has the same group * @throws \Cake\Cache\InvalidArgumentException */ public static function groupConfigs(?string $group = null): array From 88fcec0ecf19a0b678008e853d1443ded742b3f1 Mon Sep 17 00:00:00 2001 From: mscherer Date: Wed, 22 Sep 2021 17:00:51 +0200 Subject: [PATCH 08/18] Make docblock var definitions more concrete. --- Engine/MemcachedEngine.php | 2 +- Engine/WincacheEngine.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Engine/MemcachedEngine.php b/Engine/MemcachedEngine.php index 227161513..9bdd3638d 100644 --- a/Engine/MemcachedEngine.php +++ b/Engine/MemcachedEngine.php @@ -82,7 +82,7 @@ class MemcachedEngine extends CacheEngine * * Memcached must be compiled with JSON and igbinary support to use these engines * - * @var array + * @var array */ protected $_serializers = []; diff --git a/Engine/WincacheEngine.php b/Engine/WincacheEngine.php index e9374b620..ca0388e4b 100644 --- a/Engine/WincacheEngine.php +++ b/Engine/WincacheEngine.php @@ -30,7 +30,7 @@ class WincacheEngine extends CacheEngine * Contains the compiled group names * (prefixed with the global configuration prefix) * - * @var array + * @var array */ protected $_compiledGroupNames = []; From e6e98bd958dd2c20dac504b9c99342ae84c1e765 Mon Sep 17 00:00:00 2001 From: mscherer Date: Sun, 26 Sep 2021 02:10:05 +0200 Subject: [PATCH 09/18] Fix up doc typos or missing class links. --- Cache.php | 2 +- CacheRegistry.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cache.php b/Cache.php index 0c8d8d37f..412ad1f2d 100644 --- a/Cache.php +++ b/Cache.php @@ -33,7 +33,7 @@ * * ``` * Cache::config('shared', [ - * 'className' => Cake\Cache\Engine\ApcuEngine::class, + * 'className' => \Cake\Cache\Engine\ApcuEngine::class, * 'prefix' => 'my_app_' * ]); * ``` diff --git a/CacheRegistry.php b/CacheRegistry.php index c70835fc0..1c5aa4660 100644 --- a/CacheRegistry.php +++ b/CacheRegistry.php @@ -24,7 +24,7 @@ /** * An object registry for cache engines. * - * Used by Cake\Cache\Cache to load and manage cache engines. + * Used by {@link \Cake\Cache\Cache} to load and manage cache engines. * * @extends \Cake\Core\ObjectRegistry<\Cake\Cache\CacheEngine> */ From 61e8f5978f4f2b738bd4b1dcf78e030f5012f449 Mon Sep 17 00:00:00 2001 From: mscherer Date: Sun, 26 Sep 2021 12:24:37 +0200 Subject: [PATCH 10/18] Revert one change. --- Cache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cache.php b/Cache.php index 412ad1f2d..0c8d8d37f 100644 --- a/Cache.php +++ b/Cache.php @@ -33,7 +33,7 @@ * * ``` * Cache::config('shared', [ - * 'className' => \Cake\Cache\Engine\ApcuEngine::class, + * 'className' => Cake\Cache\Engine\ApcuEngine::class, * 'prefix' => 'my_app_' * ]); * ``` From cd9b121e93ac30315b862efeb2f957e3450d862e Mon Sep 17 00:00:00 2001 From: Corey Taylor Date: Sun, 24 Oct 2021 15:02:24 -0500 Subject: [PATCH 11/18] Require php 7.4 for packages --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index f78e504ab..385a303b0 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "source": "https://github.com/cakephp/cache" }, "require": { - "php": ">=7.2.0", + "php": ">=7.4.0", "cakephp/core": "^4.0", "psr/simple-cache": "^1.0.0" }, From 02064cc6e9b47a2295c4944afa8b540e75ffa935 Mon Sep 17 00:00:00 2001 From: ADmad Date: Fri, 17 Dec 2021 19:58:04 +0530 Subject: [PATCH 12/18] Revert "Merge branch '4.x' into 4.next" This reverts commit de4eb4f06bb7a7b8512bb4d7ac939e4f63e9a578, reversing changes made to c2e3db0eef03b730cfc5c41eedf9fae64427e59b. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 385a303b0..f78e504ab 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "source": "https://github.com/cakephp/cache" }, "require": { - "php": ">=7.4.0", + "php": ">=7.2.0", "cakephp/core": "^4.0", "psr/simple-cache": "^1.0.0" }, From 0bc1d264b47ae8df51f4c6680d89edf38ac5c5c1 Mon Sep 17 00:00:00 2001 From: ADmad Date: Wed, 26 Jan 2022 17:44:58 +0530 Subject: [PATCH 13/18] Allow v2 of psr/log and psr/simple-cache. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index f78e504ab..001a8a9dc 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "require": { "php": ">=7.2.0", "cakephp/core": "^4.0", - "psr/simple-cache": "^1.0.0" + "psr/simple-cache": "^1.0 || ^2.0" }, "provide": { "psr/simple-cache-implementation": "^1.0.0" From 94a4fda939d218cacfbdd36609eecfe13141789b Mon Sep 17 00:00:00 2001 From: ADmad Date: Thu, 3 Feb 2022 19:44:49 +0530 Subject: [PATCH 14/18] Fix errors reported by static analyzers --- Engine/MemcachedEngine.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Engine/MemcachedEngine.php b/Engine/MemcachedEngine.php index 9bdd3638d..b714f5056 100644 --- a/Engine/MemcachedEngine.php +++ b/Engine/MemcachedEngine.php @@ -134,11 +134,6 @@ public function init(array $config = []): bool $this->_config['servers'] = [$this->_config['servers']]; } - /** @psalm-suppress RedundantPropertyInitializationCheck */ - if (isset($this->_Memcached)) { - return true; - } - if ($this->_config['persistent']) { $this->_Memcached = new Memcached($this->_config['persistent']); } else { From 37997fb3ce2f03d61d8acbb9566ed7d7584229fc Mon Sep 17 00:00:00 2001 From: Mark Story Date: Thu, 24 Feb 2022 11:05:39 -0500 Subject: [PATCH 15/18] Fix deleteMany stopping after the first failure DeleteMany should be more of a best-effort vs stopping at the first missing key. Fixes #16347 --- CacheEngine.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CacheEngine.php b/CacheEngine.php index 8e9fc613a..14006deb5 100644 --- a/CacheEngine.php +++ b/CacheEngine.php @@ -198,14 +198,14 @@ public function deleteMultiple($keys): bool { $this->ensureValidType($keys); + $result = true; foreach ($keys as $key) { - $result = $this->delete($key); - if ($result === false) { - return false; + if (!$this->delete($key)) { + $result = false; } } - return true; + return $result; } /** From a5477023f7bdc2f35d0b9f138a7b8e66a6a13531 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Thu, 24 Feb 2022 22:25:10 -0500 Subject: [PATCH 16/18] Improve API docs for deleteMultiple --- CacheEngine.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CacheEngine.php b/CacheEngine.php index 14006deb5..ed01098e3 100644 --- a/CacheEngine.php +++ b/CacheEngine.php @@ -187,7 +187,11 @@ public function setMultiple($values, $ttl = null): bool } /** - * Deletes multiple cache items in a single operation. + * Deletes multiple cache items as a list + * + * This is a best effort attempt. If deleting an item would + * create an error it will be ignored, and all items will + * be attempted. * * @param iterable $keys A list of string-based keys to be deleted. * @return bool True if the items were successfully removed. False if there was an error. From 4ba3eaf201d25b5bf0b07ac6609cd2f98ad8b1c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Ram=C5=A1ak?= Date: Fri, 11 Mar 2022 10:38:03 +0100 Subject: [PATCH 17/18] Avoid possible TypeError Exception Exception: unlink(): Argument #1 ($filename) must be of type string, bool given In [/home/wotanabx/webseiten/wow-das/vendor/cakephp/cakephp/src/Cache/Engine/FileEngine.php, line 227] 2022-03-11 02:32:30 error: [TypeError] unlink(): Argument #1 ($filename) must be of type string, bool given in /home/wotanabx/webseiten/wow-das/vendor/cakephp/cakephp/src/Cache/Engine/FileEngine.php on line 227 --- Engine/FileEngine.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Engine/FileEngine.php b/Engine/FileEngine.php index e7ce5ea2c..1d508dd8c 100644 --- a/Engine/FileEngine.php +++ b/Engine/FileEngine.php @@ -222,6 +222,10 @@ public function delete($key): bool /** @psalm-suppress PossiblyNullReference */ $path = $this->_File->getRealPath(); $this->_File = null; + + if ($path === false) { + return false; + } // phpcs:disable return @unlink($path); From 778ed613b26da70cd1f7f208278e1a55f742fdf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Ram=C5=A1ak?= Date: Fri, 11 Mar 2022 11:12:35 +0100 Subject: [PATCH 18/18] removed whitespace on empty line --- Engine/FileEngine.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Engine/FileEngine.php b/Engine/FileEngine.php index 1d508dd8c..46a7f187a 100644 --- a/Engine/FileEngine.php +++ b/Engine/FileEngine.php @@ -222,7 +222,7 @@ public function delete($key): bool /** @psalm-suppress PossiblyNullReference */ $path = $this->_File->getRealPath(); $this->_File = null; - + if ($path === false) { return false; }