Skip to content

Commit cce4fde

Browse files
author
Benjamin Pick
committed
After Deployment
1 parent 302ac6c commit cce4fde

7 files changed

+1315
-421
lines changed

readme.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tags: geolocation, locator, geoip, maxmind, ipstack
44
Requires at least: 5.0
55
Tested up to: 6.6
66
Requires PHP: 7.2
7-
Stable tag: 5.4.0
7+
Stable tag: 5.4.1
88
License: GPLv3 or later
99
License URI: http://www.gnu.org/licenses/gpl-3.0.html
1010
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BSYUZHS8FH3CL

vendor/composer/InstalledVersions.php

+12-5
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public static function isInstalled($packageName, $includeDevRequirements = true)
9898
{
9999
foreach (self::getInstalled() as $installed) {
100100
if (isset($installed['versions'][$packageName])) {
101-
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
101+
return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
102102
}
103103
}
104104

@@ -119,7 +119,7 @@ public static function isInstalled($packageName, $includeDevRequirements = true)
119119
*/
120120
public static function satisfies(VersionParser $parser, $packageName, $constraint)
121121
{
122-
$constraint = $parser->parseConstraints($constraint);
122+
$constraint = $parser->parseConstraints((string) $constraint);
123123
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
124124

125125
return $provided->matches($constraint);
@@ -328,7 +328,9 @@ private static function getInstalled()
328328
if (isset(self::$installedByVendor[$vendorDir])) {
329329
$installed[] = self::$installedByVendor[$vendorDir];
330330
} elseif (is_file($vendorDir.'/composer/installed.php')) {
331-
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
331+
/** @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<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
332+
$required = require $vendorDir.'/composer/installed.php';
333+
$installed[] = self::$installedByVendor[$vendorDir] = $required;
332334
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
333335
self::$installed = $installed[count($installed) - 1];
334336
}
@@ -340,12 +342,17 @@ private static function getInstalled()
340342
// only require the installed.php file if this file is loaded from its dumped location,
341343
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
342344
if (substr(__DIR__, -8, 1) !== 'C') {
343-
self::$installed = require __DIR__ . '/installed.php';
345+
/** @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<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
346+
$required = require __DIR__ . '/installed.php';
347+
self::$installed = $required;
344348
} else {
345349
self::$installed = array();
346350
}
347351
}
348-
$installed[] = self::$installed;
352+
353+
if (self::$installed !== array()) {
354+
$installed[] = self::$installed;
355+
}
349356

350357
return $installed;
351358
}

0 commit comments

Comments
 (0)