1
0
Fork 0

Upgrade to composer/pcre 2.x

pull/10591/head
Jordi Boggiano 2022-02-26 14:02:11 +01:00
parent 1734d86907
commit 18246212db
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
6 changed files with 29 additions and 28 deletions

View File

@ -27,7 +27,7 @@
"composer/metadata-minifier": "^1.0",
"composer/semver": "^3.0",
"composer/spdx-licenses": "^1.2",
"composer/xdebug-handler": "^2 || ^3.0.1",
"composer/xdebug-handler": "^2.0.2 || ^3.0.3",
"justinrainbow/json-schema": "^5.2.11",
"psr/log": "^1.0 || ^2.0 || ^3.0",
"seld/jsonlint": "^1.4",
@ -37,7 +37,7 @@
"symfony/finder": "^5.4 || ^6.0",
"symfony/process": "^5.4 || ^6.0",
"react/promise": "^2.8",
"composer/pcre": "^1.0",
"composer/pcre": "^2 || ^3",
"symfony/polyfill-php73": "^1.24",
"symfony/polyfill-php80": "^1.24"
},

34
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "03b82664ef6f80651118f0c06a49280c",
"content-hash": "3a7c7da73f59287030b9704930778e2b",
"packages": [
{
"name": "composer/ca-bundle",
@ -153,30 +153,30 @@
},
{
"name": "composer/pcre",
"version": "1.0.1",
"version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/composer/pcre.git",
"reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560"
"reference": "c8e9d27cfc5ed22643c19c160455b473ffd8aabe"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/pcre/zipball/67a32d7d6f9f560b726ab25a061b38ff3a80c560",
"reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560",
"url": "https://api.github.com/repos/composer/pcre/zipball/c8e9d27cfc5ed22643c19c160455b473ffd8aabe",
"reference": "c8e9d27cfc5ed22643c19c160455b473ffd8aabe",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0"
"php": "^7.2 || ^8.0"
},
"require-dev": {
"phpstan/phpstan": "^1.3",
"phpstan/phpstan-strict-rules": "^1.1",
"symfony/phpunit-bridge": "^4.2 || ^5"
"symfony/phpunit-bridge": "^5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.x-dev"
"dev-main": "2.x-dev"
}
},
"autoload": {
@ -204,7 +204,7 @@
],
"support": {
"issues": "https://github.com/composer/pcre/issues",
"source": "https://github.com/composer/pcre/tree/1.0.1"
"source": "https://github.com/composer/pcre/tree/2.0.0"
},
"funding": [
{
@ -220,7 +220,7 @@
"type": "tidelift"
}
],
"time": "2022-01-21T20:24:37+00:00"
"time": "2022-02-25T20:05:29+00:00"
},
{
"name": "composer/semver",
@ -385,20 +385,20 @@
},
{
"name": "composer/xdebug-handler",
"version": "3.0.2",
"version": "3.0.3",
"source": {
"type": "git",
"url": "https://github.com/composer/xdebug-handler.git",
"reference": "b11b961ef6b11e380e81a20b27c8cad54eeefe61"
"reference": "ced299686f41dce890debac69273b47ffe98a40c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/b11b961ef6b11e380e81a20b27c8cad54eeefe61",
"reference": "b11b961ef6b11e380e81a20b27c8cad54eeefe61",
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c",
"reference": "ced299686f41dce890debac69273b47ffe98a40c",
"shasum": ""
},
"require": {
"composer/pcre": "^1",
"composer/pcre": "^1 || ^2 || ^3",
"php": "^7.2.5 || ^8.0",
"psr/log": "^1 || ^2 || ^3"
},
@ -431,7 +431,7 @@
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/xdebug-handler/issues",
"source": "https://github.com/composer/xdebug-handler/tree/3.0.2"
"source": "https://github.com/composer/xdebug-handler/tree/3.0.3"
},
"funding": [
{
@ -447,7 +447,7 @@
"type": "tidelift"
}
],
"time": "2022-02-24T20:53:32+00:00"
"time": "2022-02-25T21:32:43+00:00"
},
{
"name": "justinrainbow/json-schema",

View File

@ -263,7 +263,7 @@ class ClassMapGenerator
for ($i = 0, $len = count($matches['type']); $i < $len; $i++) {
if (!empty($matches['ns'][$i])) {
$namespace = str_replace(array(' ', "\t", "\r", "\n"), '', $matches['nsname'][$i]) . '\\';
$namespace = str_replace(array(' ', "\t", "\r", "\n"), '', (string) $matches['nsname'][$i]) . '\\';
} else {
$name = $matches['name'][$i];
// skip anon classes extending/implementing

View File

@ -431,6 +431,7 @@ class JsonManipulator
}
// no child data left, $name was the only key in
unset($match);
Preg::match('#^{ \s*? (?P<content>\S+.*?)? (?P<trailingspace>\s*) }$#sx', $childrenClean, $match);
if (empty($match['content'])) {
$newline = $this->newline;

View File

@ -240,7 +240,7 @@ class RootPackageLoader extends ArrayLoader
}
// parse explicit stability flags to the most unstable
$match = false;
$matched = false;
foreach ($constraints as $constraint) {
if (Preg::isMatch('{^[^@]*?@('.implode('|', array_keys($stabilities)).')$}i', $constraint, $match)) {
$name = strtolower($reqName);
@ -250,11 +250,11 @@ class RootPackageLoader extends ArrayLoader
continue;
}
$stabilityFlags[$name] = $stability;
$match = true;
$matched = true;
}
}
if ($match) {
if ($matched) {
continue;
}

View File

@ -620,26 +620,26 @@ class GitLabDriver extends VcsDriver
*
* @return string|false
*/
private static function determineOrigin(array $configuredDomains, string $guessedDomain, array &$urlParts, string $portNumber)
private static function determineOrigin(array $configuredDomains, string $guessedDomain, array &$urlParts, ?string $portNumber)
{
$guessedDomain = strtolower($guessedDomain);
if (in_array($guessedDomain, $configuredDomains) || ($portNumber && in_array($guessedDomain.':'.$portNumber, $configuredDomains))) {
if ($portNumber) {
if (in_array($guessedDomain, $configuredDomains) || (null !== $portNumber && in_array($guessedDomain.':'.$portNumber, $configuredDomains))) {
if (null !== $portNumber) {
return $guessedDomain.':'.$portNumber;
}
return $guessedDomain;
}
if ($portNumber) {
if (null !== $portNumber) {
$guessedDomain .= ':'.$portNumber;
}
while (null !== ($part = array_shift($urlParts))) {
$guessedDomain .= '/' . $part;
if (in_array($guessedDomain, $configuredDomains) || ($portNumber && in_array(Preg::replace('{:\d+}', '', $guessedDomain), $configuredDomains))) {
if (in_array($guessedDomain, $configuredDomains) || (null !== $portNumber && in_array(Preg::replace('{:\d+}', '', $guessedDomain), $configuredDomains))) {
return $guessedDomain;
}
}