We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6f6c39 commit fb5d1cfCopy full SHA for fb5d1cf
1 file changed
src/Composer/InstalledPackageResolver.php
@@ -17,9 +17,9 @@
17
final class InstalledPackageResolver
18
{
19
/**
20
- * @var InstalledPackage[]
+ * @var null|InstalledPackage[]
21
*/
22
- private array $resolvedInstalledPackages = [];
+ private ?array $resolvedInstalledPackages = null;
23
24
public function __construct(
25
private readonly ?string $projectDirectory = null
@@ -37,8 +37,8 @@ public function __construct(
37
38
public function resolve(): array
39
40
- // cache
41
- if ($this->resolvedInstalledPackages !== []) {
+ // already cached, even only empty array
+ if ($this->resolvedInstalledPackages !== null) {
42
return $this->resolvedInstalledPackages;
43
}
44
0 commit comments