Skip to content
Snippets Groups Projects
Commit 5ffe0e19 authored by Lucas Hedding's avatar Lucas Hedding
Browse files

Issue #3088922 by heddn: Check for updates to polyfills mid December 2019

parent f687049a
No related branches found
No related tags found
No related merge requests found
......@@ -12,12 +12,12 @@
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
"reference": "37e4db276f38376a63ea67e96b09571d74312779"
"reference": "2667cf1143d1c79a81a2c65d9f7a87a9c549c259"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/semver/zipball/37e4db276f38376a63ea67e96b09571d74312779",
"reference": "37e4db276f38376a63ea67e96b09571d74312779",
"url": "https://api.github.com/repos/composer/semver/zipball/2667cf1143d1c79a81a2c65d9f7a87a9c549c259",
"reference": "2667cf1143d1c79a81a2c65d9f7a87a9c549c259",
"shasum": ""
},
"require": {
......@@ -65,7 +65,7 @@
"validation",
"versioning"
],
"time": "2019-04-14T09:35:30+00:00"
"time": "2019-12-02T13:30:57+00:00"
},
{
"name": "drupal/core-version",
......@@ -202,16 +202,16 @@
},
{
"name": "paragonie/sodium_compat",
"version": "v1.12.0",
"version": "v1.12.1",
"source": {
"type": "git",
"url": "https://github.com/paragonie/sodium_compat.git",
"reference": "8228b286d6b8fe24825f42ce02403f72656ac826"
"reference": "063cae9b3a7323579063e7037720f5b52b56c178"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/paragonie/sodium_compat/zipball/8228b286d6b8fe24825f42ce02403f72656ac826",
"reference": "8228b286d6b8fe24825f42ce02403f72656ac826",
"url": "https://api.github.com/repos/paragonie/sodium_compat/zipball/063cae9b3a7323579063e7037720f5b52b56c178",
"reference": "063cae9b3a7323579063e7037720f5b52b56c178",
"shasum": ""
},
"require": {
......@@ -280,7 +280,7 @@
"secret-key cryptography",
"side-channel resistant"
],
"time": "2019-10-19T15:30:42+00:00"
"time": "2019-11-07T17:07:24+00:00"
}
],
"packages-dev": [],
......
......@@ -6,12 +6,12 @@
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
"reference": "37e4db276f38376a63ea67e96b09571d74312779"
"reference": "2667cf1143d1c79a81a2c65d9f7a87a9c549c259"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/semver/zipball/37e4db276f38376a63ea67e96b09571d74312779",
"reference": "37e4db276f38376a63ea67e96b09571d74312779",
"url": "https://api.github.com/repos/composer/semver/zipball/2667cf1143d1c79a81a2c65d9f7a87a9c549c259",
"reference": "2667cf1143d1c79a81a2c65d9f7a87a9c549c259",
"shasum": ""
},
"require": {
......@@ -20,7 +20,7 @@
"require-dev": {
"phpunit/phpunit": "^4.5 || ^5.0.5"
},
"time": "2019-04-14T09:35:30+00:00",
"time": "2019-12-02T13:30:57+00:00",
"type": "library",
"extra": {
"branch-alias": {
......@@ -203,17 +203,17 @@
},
{
"name": "paragonie/sodium_compat",
"version": "v1.12.0",
"version_normalized": "1.12.0.0",
"version": "v1.12.1",
"version_normalized": "1.12.1.0",
"source": {
"type": "git",
"url": "https://github.com/paragonie/sodium_compat.git",
"reference": "8228b286d6b8fe24825f42ce02403f72656ac826"
"reference": "063cae9b3a7323579063e7037720f5b52b56c178"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/paragonie/sodium_compat/zipball/8228b286d6b8fe24825f42ce02403f72656ac826",
"reference": "8228b286d6b8fe24825f42ce02403f72656ac826",
"url": "https://api.github.com/repos/paragonie/sodium_compat/zipball/063cae9b3a7323579063e7037720f5b52b56c178",
"reference": "063cae9b3a7323579063e7037720f5b52b56c178",
"shasum": ""
},
"require": {
......@@ -227,7 +227,7 @@
"ext-libsodium": "PHP < 7.0: Better performance, password hashing (Argon2i), secure memory management (memzero), and better security.",
"ext-sodium": "PHP >= 7.0: Better performance, password hashing (Argon2i), secure memory management (memzero), and better security."
},
"time": "2019-10-19T15:30:42+00:00",
"time": "2019-11-07T17:07:24+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
......
......@@ -184,7 +184,7 @@ class Constraint implements ConstraintInterface
// '!=' operator is match when other operator is not '==' operator or version is not match
// these kinds of comparisons always have a solution
if ($isNonEqualOp || $isProviderNonEqualOp) {
return !$isEqualOp && !$isProviderEqualOp
return (!$isEqualOp && !$isProviderEqualOp)
|| $this->versionCompare($provider->version, $this->version, '!=', $compareBranches);
}
......@@ -197,13 +197,9 @@ class Constraint implements ConstraintInterface
if ($this->versionCompare($provider->version, $this->version, self::$transOpInt[$this->operator], $compareBranches)) {
// special case, e.g. require >= 1.0 and provide < 1.0
// 1.0 >= 1.0 but 1.0 is outside of the provided interval
if ($provider->version === $this->version
return !($provider->version === $this->version
&& self::$transOpInt[$provider->operator] === $providerNoEqualOp
&& self::$transOpInt[$this->operator] !== $noEqualOp) {
return false;
}
return true;
&& self::$transOpInt[$this->operator] !== $noEqualOp);
}
return false;
......
......@@ -46,7 +46,7 @@ class EmptyConstraint implements ConstraintInterface
return $this->prettyString;
}
return $this->__toString();
return (string) $this;
}
/**
......
......@@ -102,7 +102,7 @@ class MultiConstraint implements ConstraintInterface
return $this->prettyString;
}
return $this->__toString();
return (string) $this;
}
/**
......
......@@ -37,9 +37,9 @@ class Semver
$versionParser = self::$versionParser;
$provider = new Constraint('==', $versionParser->normalize($version));
$constraints = $versionParser->parseConstraints($constraints);
$parsedConstraints = $versionParser->parseConstraints($constraints);
return $constraints->matches($provider);
return $parsedConstraints->matches($provider);
}
/**
......
......@@ -52,11 +52,12 @@ class VersionParser
{
$version = preg_replace('{#.+$}i', '', $version);
if ('dev-' === substr($version, 0, 4) || '-dev' === substr($version, -4)) {
if (strpos($version, 'dev-') === 0 || '-dev' === substr($version, -4)) {
return 'dev';
}
preg_match('{' . self::$modifierRegex . '(?:\+.*)?$}i', strtolower($version), $match);
if (!empty($match[3])) {
return 'dev';
}
......@@ -116,7 +117,7 @@ class VersionParser
}
// if requirement is branch-like, use full name
if ('dev-' === strtolower(substr($version, 0, 4))) {
if (stripos($version, 'dev-') === 0) {
return 'dev-' . substr($version, 4);
}
......@@ -236,6 +237,7 @@ class VersionParser
$orConstraints = preg_split('{\s*\|\|?\s*}', trim($constraints));
$orGroups = array();
foreach ($orConstraints as $constraints) {
$andConstraints = preg_split('{(?<!^|as|[=>< ,]) *(?<!-)[, ](?!-) *(?!,|as|$)}', $constraints);
if (count($andConstraints) > 1) {
......@@ -268,9 +270,9 @@ class VersionParser
&& 2 === count($orGroups[0]->getConstraints())
&& 2 === count($orGroups[1]->getConstraints())
&& ($a = (string) $orGroups[0])
&& substr($a, 0, 3) === '[>=' && (false !== ($posA = strpos($a, '<', 4)))
&& strpos($a, '[>=') === 0 && (false !== ($posA = strpos($a, '<', 4)))
&& ($b = (string) $orGroups[1])
&& substr($b, 0, 3) === '[>=' && (false !== ($posB = strpos($b, '<', 4)))
&& strpos($b, '[>=') === 0 && (false !== ($posB = strpos($b, '<', 4)))
&& substr($a, $posA + 2, -1) === substr($b, 4, $posB - 5)
) {
$constraint = new MultiConstraint(array(
......@@ -314,7 +316,7 @@ class VersionParser
// version, to ensure that unstable instances of the current version are allowed. However, if a stability
// suffix is added to the constraint, then a >= match on the current version is used instead.
if (preg_match('{^~>?' . $versionRegex . '$}i', $constraint, $matches)) {
if (substr($constraint, 0, 2) === '~>') {
if (strpos($constraint, '~>') === 0) {
throw new \UnexpectedValueException(
'Could not parse version constraint ' . $constraint . ': ' .
'Invalid operator "~>", you probably meant to use the "~" operator'
......@@ -454,11 +456,11 @@ class VersionParser
try {
$version = $this->normalize($matches[2]);
if (!empty($stabilityModifier) && $this->parseStability($version) === 'stable') {
if (!empty($stabilityModifier) && self::parseStability($version) === 'stable') {
$version .= '-' . $stabilityModifier;
} elseif ('<' === $matches[1] || '>=' === $matches[1]) {
if (!preg_match('/-' . self::$modifierRegex . '$/', strtolower($matches[2]))) {
if (substr($matches[2], 0, 4) !== 'dev-') {
if (strpos($matches[2], 'dev-') !== 0) {
$version .= '-dev';
}
}
......@@ -503,7 +505,7 @@ class VersionParser
// Return null on a carry overflow
if ($i === 1) {
return;
return null;
}
}
}
......
......@@ -47,7 +47,7 @@ if (PHP_VERSION_ID >= 50300) {
require_once dirname(__FILE__) . '/src/PHP52/SplFixedArray.php';
}
if (PHP_VERSION_ID < 70200 || !extension_loaded('sodium')) {
if (PHP_VERSION_ID >= 50300 && !defined('SODIUM_LIBRARY_MAJOR_VERSION')) {
if (PHP_VERSION_ID >= 50300 && !defined('SODIUM_CRYPTO_SCALARMULT_BYTES')) {
require_once dirname(__FILE__) . '/lib/php72compat_const.php';
}
if (PHP_VERSION_ID >= 70000) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment