1
0
Fork 0

Merge branch 'master' into 2.0

Update deps
pull/8444/head
Jordi Boggiano 2019-11-23 12:27:41 +01:00
commit 88b051c96b
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
17 changed files with 273 additions and 331 deletions

View File

@ -37,7 +37,7 @@ matrix:
- php: 7.4snapshot - php: 7.4snapshot
before_install: before_install:
# disable xdebug if available # disable Xdebug if available
- phpenv config-rm xdebug.ini || echo "xdebug not available" - phpenv config-rm xdebug.ini || echo "xdebug not available"
# disable default memory limit # disable default memory limit
- export INI=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - export INI=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini

View File

@ -252,7 +252,7 @@
* Fixed output inconsistencies * Fixed output inconsistencies
* Fixed unicode handling in `init` command for author names * Fixed unicode handling in `init` command for author names
* Fixed useless warning when doing partial updates/removes on packages that are not currently installed * Fixed useless warning when doing partial updates/removes on packages that are not currently installed
* Fixed xdebug disabling issue when combined with disable_functions and allow_url_fopen CLI overrides * Fixed Xdebug disabling issue when combined with disable_functions and allow_url_fopen CLI overrides
### [1.4.1] - 2017-03-10 ### [1.4.1] - 2017-03-10
@ -313,7 +313,7 @@
* Added `gitlab-token` auth config for GitLab private tokens * Added `gitlab-token` auth config for GitLab private tokens
* Added `--strict` to the `outdated` command to return a non-zero exit code when there are outdated packages * Added `--strict` to the `outdated` command to return a non-zero exit code when there are outdated packages
* Added ability to call php scripts using the current php interpreter (instead of finding php in PATH by default) in script handlers via `@php ...` * Added ability to call php scripts using the current php interpreter (instead of finding php in PATH by default) in script handlers via `@php ...`
* Added `COMPOSER_ALLOW_XDEBUG` env var to circumvent the xdebug-disabling behavior * Added `COMPOSER_ALLOW_XDEBUG` env var to circumvent the Xdebug-disabling behavior
* Added `COMPOSER_MIRROR_PATH_REPOS` env var to force mirroring of path repositories vs symlinking * Added `COMPOSER_MIRROR_PATH_REPOS` env var to force mirroring of path repositories vs symlinking
* Added `COMPOSER_DEV_MODE` env var that is set by Composer to forward the dev mode to script handlers * Added `COMPOSER_DEV_MODE` env var that is set by Composer to forward the dev mode to script handlers
* Fixed support for git 2.11 * Fixed support for git 2.11

View File

@ -13,7 +13,7 @@ use Composer\XdebugHandler\XdebugHandler;
error_reporting(-1); error_reporting(-1);
// Restart without xdebug // Restart without Xdebug
$xdebug = new XdebugHandler('Composer', '--ansi'); $xdebug = new XdebugHandler('Composer', '--ansi');
$xdebug->check(); $xdebug->check();
unset($xdebug); unset($xdebug);

View File

@ -31,10 +31,10 @@
"psr/log": "^1.0", "psr/log": "^1.0",
"seld/jsonlint": "^1.4", "seld/jsonlint": "^1.4",
"seld/phar-utils": "^1.0", "seld/phar-utils": "^1.0",
"symfony/console": "^2.7 || ^3.0 || ^4.0", "symfony/console": "^2.7 || ^3.0 || ^4.0 || ^5.0",
"symfony/filesystem": "^2.7 || ^3.0 || ^4.0", "symfony/filesystem": "^2.7 || ^3.0 || ^4.0 || ^5.0",
"symfony/finder": "^2.7 || ^3.0 || ^4.0", "symfony/finder": "^2.7 || ^3.0 || ^4.0 || ^5.0",
"symfony/process": "^2.7 || ^3.0 || ^4.0", "symfony/process": "^2.7 || ^3.0 || ^4.0 || ^5.0",
"react/promise": "^1.2 || ^2.7" "react/promise": "^1.2 || ^2.7"
}, },
"conflict": { "conflict": {

389
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "280f5d5184039085b5f22236d267ae82", "content-hash": "7fb7edae7611d2e07d946d75b9cf2c63",
"packages": [ "packages": [
{ {
"name": "composer/ca-bundle", "name": "composer/ca-bundle",
@ -45,21 +45,7 @@
"license": [ "license": [
"MIT" "MIT"
], ],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
}
],
"description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.",
"keywords": [
"cabundle",
"cacert",
"certificate",
"ssl",
"tls"
],
"time": "2019-08-30T08:44:50+00:00" "time": "2019-08-30T08:44:50+00:00"
}, },
{ {
@ -98,30 +84,7 @@
"license": [ "license": [
"MIT" "MIT"
], ],
"authors": [
{
"name": "Nils Adermann",
"email": "naderman@naderman.de",
"homepage": "http://www.naderman.de"
},
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
},
{
"name": "Rob Bast",
"email": "rob.bast@gmail.com",
"homepage": "http://robbast.nl"
}
],
"description": "Semver library that offers utilities, version constraint parsing and validation.", "description": "Semver library that offers utilities, version constraint parsing and validation.",
"keywords": [
"semantic",
"semver",
"validation",
"versioning"
],
"time": "2019-03-19T17:25:45+00:00" "time": "2019-03-19T17:25:45+00:00"
}, },
{ {
@ -159,51 +122,29 @@
"license": [ "license": [
"MIT" "MIT"
], ],
"authors": [
{
"name": "Nils Adermann",
"email": "naderman@naderman.de",
"homepage": "http://www.naderman.de"
},
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
},
{
"name": "Rob Bast",
"email": "rob.bast@gmail.com",
"homepage": "http://robbast.nl"
}
],
"description": "SPDX licenses list and validation library.", "description": "SPDX licenses list and validation library.",
"keywords": [
"license",
"spdx",
"validator"
],
"time": "2019-07-29T10:31:59+00:00" "time": "2019-07-29T10:31:59+00:00"
}, },
{ {
"name": "composer/xdebug-handler", "name": "composer/xdebug-handler",
"version": "1.3.3", "version": "1.4.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/composer/xdebug-handler.git", "url": "https://github.com/composer/xdebug-handler.git",
"reference": "46867cbf8ca9fb8d60c506895449eb799db1184f" "reference": "cbe23383749496fe0f373345208b79568e4bc248"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/46867cbf8ca9fb8d60c506895449eb799db1184f", "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/cbe23383749496fe0f373345208b79568e4bc248",
"reference": "46867cbf8ca9fb8d60c506895449eb799db1184f", "reference": "cbe23383749496fe0f373345208b79568e4bc248",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^5.3.2 || ^7.0", "php": "^5.3.2 || ^7.0 || ^8.0",
"psr/log": "^1.0" "psr/log": "^1.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@ -221,32 +162,37 @@
"email": "john-stevenson@blueyonder.co.uk" "email": "john-stevenson@blueyonder.co.uk"
} }
], ],
"description": "Restarts a process without xdebug.", "description": "Restarts a process without Xdebug.",
"keywords": [ "keywords": [
"Xdebug", "Xdebug",
"performance" "performance"
], ],
"time": "2019-05-27T17:52:04+00:00" "support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/xdebug-handler/issues",
"source": "https://github.com/composer/xdebug-handler/tree/1.4.0"
},
"time": "2019-11-06T16:40:04+00:00"
}, },
{ {
"name": "justinrainbow/json-schema", "name": "justinrainbow/json-schema",
"version": "5.2.8", "version": "5.2.9",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/justinrainbow/json-schema.git", "url": "https://github.com/justinrainbow/json-schema.git",
"reference": "dcb6e1006bb5fd1e392b4daa68932880f37550d4" "reference": "44c6787311242a979fa15c704327c20e7221a0e4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/dcb6e1006bb5fd1e392b4daa68932880f37550d4", "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/44c6787311242a979fa15c704327c20e7221a0e4",
"reference": "dcb6e1006bb5fd1e392b4daa68932880f37550d4", "reference": "44c6787311242a979fa15c704327c20e7221a0e4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": ">=5.3.3"
}, },
"require-dev": { "require-dev": {
"friendsofphp/php-cs-fixer": "~2.2.20", "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1",
"json-schema/json-schema-test-suite": "1.2.0", "json-schema/json-schema-test-suite": "1.2.0",
"phpunit/phpunit": "^4.8.35" "phpunit/phpunit": "^4.8.35"
}, },
@ -292,20 +238,24 @@
"json", "json",
"schema" "schema"
], ],
"time": "2019-01-14T23:55:14+00:00" "support": {
"issues": "https://github.com/justinrainbow/json-schema/issues",
"source": "https://github.com/justinrainbow/json-schema/tree/5.2.9"
},
"time": "2019-09-25T14:49:45+00:00"
}, },
{ {
"name": "psr/log", "name": "psr/log",
"version": "1.1.0", "version": "1.1.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/php-fig/log.git", "url": "https://github.com/php-fig/log.git",
"reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", "url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801",
"reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -314,7 +264,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.0.x-dev" "dev-master": "1.1.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -339,7 +289,10 @@
"psr", "psr",
"psr-3" "psr-3"
], ],
"time": "2018-11-20T15:27:04+00:00" "support": {
"source": "https://github.com/php-fig/log/tree/1.1.2"
},
"time": "2019-11-01T11:05:21+00:00"
}, },
{ {
"name": "react/promise", "name": "react/promise",
@ -376,27 +329,21 @@
"license": [ "license": [
"MIT" "MIT"
], ],
"authors": [
{
"name": "Jan Sorgalla",
"email": "jsorgalla@gmail.com"
}
],
"description": "A lightweight implementation of CommonJS Promises/A for PHP", "description": "A lightweight implementation of CommonJS Promises/A for PHP",
"time": "2016-03-07T13:46:50+00:00" "time": "2016-03-07T13:46:50+00:00"
}, },
{ {
"name": "seld/jsonlint", "name": "seld/jsonlint",
"version": "1.7.1", "version": "1.7.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Seldaek/jsonlint.git", "url": "https://github.com/Seldaek/jsonlint.git",
"reference": "d15f59a67ff805a44c50ea0516d2341740f81a38" "reference": "e2e5d290e4d2a4f0eb449f510071392e00e10d19"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/d15f59a67ff805a44c50ea0516d2341740f81a38", "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/e2e5d290e4d2a4f0eb449f510071392e00e10d19",
"reference": "d15f59a67ff805a44c50ea0516d2341740f81a38", "reference": "e2e5d290e4d2a4f0eb449f510071392e00e10d19",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -432,7 +379,11 @@
"parser", "parser",
"validator" "validator"
], ],
"time": "2018-01-24T12:46:19+00:00" "support": {
"issues": "https://github.com/Seldaek/jsonlint/issues",
"source": "https://github.com/Seldaek/jsonlint/tree/1.7.2"
},
"time": "2019-10-24T14:27:39+00:00"
}, },
{ {
"name": "seld/phar-utils", "name": "seld/phar-utils",
@ -466,21 +417,12 @@
"license": [ "license": [
"MIT" "MIT"
], ],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be"
}
],
"description": "PHAR file format utilities, for when PHP phars you up", "description": "PHAR file format utilities, for when PHP phars you up",
"keywords": [
"phra"
],
"time": "2015-10-13T18:44:15+00:00" "time": "2015-10-13T18:44:15+00:00"
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v2.8.50", "version": "v2.8.52",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/console.git", "url": "https://github.com/symfony/console.git",
@ -537,6 +479,9 @@
], ],
"description": "Symfony Console Component", "description": "Symfony Console Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/console/tree/v2.8.52"
},
"time": "2018-11-20T15:55:20+00:00" "time": "2018-11-20T15:55:20+00:00"
}, },
{ {
@ -594,11 +539,14 @@
], ],
"description": "Symfony Debug Component", "description": "Symfony Debug Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/debug/tree/v2.8.50"
},
"time": "2018-11-11T11:18:13+00:00" "time": "2018-11-11T11:18:13+00:00"
}, },
{ {
"name": "symfony/filesystem", "name": "symfony/filesystem",
"version": "v2.8.50", "version": "v2.8.52",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/filesystem.git", "url": "https://github.com/symfony/filesystem.git",
@ -644,11 +592,14 @@
], ],
"description": "Symfony Filesystem Component", "description": "Symfony Filesystem Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/filesystem/tree/v2.8.52"
},
"time": "2018-11-11T11:18:13+00:00" "time": "2018-11-11T11:18:13+00:00"
}, },
{ {
"name": "symfony/finder", "name": "symfony/finder",
"version": "v2.8.50", "version": "v2.8.52",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/finder.git", "url": "https://github.com/symfony/finder.git",
@ -693,6 +644,9 @@
], ],
"description": "Symfony Finder Component", "description": "Symfony Finder Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/finder/tree/v2.8.50"
},
"time": "2018-11-11T11:18:13+00:00" "time": "2018-11-11T11:18:13+00:00"
}, },
{ {
@ -733,24 +687,8 @@
"license": [ "license": [
"MIT" "MIT"
], ],
"authors": [
{
"name": "Gert de Pagter",
"email": "BackEndTea@gmail.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for ctype functions", "description": "Symfony polyfill for ctype functions",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"keywords": [
"compatibility",
"ctype",
"polyfill",
"portable"
],
"time": "2019-08-06T08:03:45+00:00" "time": "2019-08-06T08:03:45+00:00"
}, },
{ {
@ -791,30 +729,13 @@
"license": [ "license": [
"MIT" "MIT"
], ],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for the Mbstring extension", "description": "Symfony polyfill for the Mbstring extension",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"keywords": [
"compatibility",
"mbstring",
"polyfill",
"portable",
"shim"
],
"time": "2019-08-06T08:03:45+00:00" "time": "2019-08-06T08:03:45+00:00"
}, },
{ {
"name": "symfony/process", "name": "symfony/process",
"version": "v2.8.50", "version": "v2.8.52",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/process.git", "url": "https://github.com/symfony/process.git",
@ -859,6 +780,9 @@
], ],
"description": "Symfony Process Component", "description": "Symfony Process Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/process/tree/v2.8.50"
},
"time": "2018-11-11T11:18:13+00:00" "time": "2018-11-11T11:18:13+00:00"
} }
], ],
@ -915,6 +839,10 @@
"constructor", "constructor",
"instantiate" "instantiate"
], ],
"support": {
"issues": "https://github.com/doctrine/instantiator/issues",
"source": "https://github.com/doctrine/instantiator/tree/master"
},
"time": "2015-06-14T21:17:01+00:00" "time": "2015-06-14T21:17:01+00:00"
}, },
{ {
@ -958,12 +886,6 @@
"license": [ "license": [
"MIT" "MIT"
], ],
"authors": [
{
"name": "Mike van Riel",
"email": "mike.vanriel@naenius.com"
}
],
"time": "2016-01-25T08:17:30+00:00" "time": "2016-01-25T08:17:30+00:00"
}, },
{ {
@ -1006,27 +928,8 @@
"license": [ "license": [
"MIT" "MIT"
], ],
"authors": [
{
"name": "Konstantin Kudryashov",
"email": "ever.zet@gmail.com",
"homepage": "http://everzet.com"
},
{
"name": "Marcello Duarte",
"email": "marcello.duarte@gmail.com"
}
],
"description": "Highly opinionated mocking framework for PHP 5.3+", "description": "Highly opinionated mocking framework for PHP 5.3+",
"homepage": "https://github.com/phpspec/prophecy", "homepage": "https://github.com/phpspec/prophecy",
"keywords": [
"Double",
"Dummy",
"fake",
"mock",
"spy",
"stub"
],
"time": "2019-10-03T11:07:50+00:00" "time": "2019-10-03T11:07:50+00:00"
}, },
{ {
@ -1089,6 +992,11 @@
"testing", "testing",
"xunit" "xunit"
], ],
"support": {
"irc": "irc://irc.freenode.net/phpunit",
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/2.2"
},
"time": "2015-10-06T15:47:00+00:00" "time": "2015-10-06T15:47:00+00:00"
}, },
{ {
@ -1123,19 +1031,8 @@
"license": [ "license": [
"BSD-3-Clause" "BSD-3-Clause"
], ],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de",
"role": "lead"
}
],
"description": "FilterIterator implementation that filters files based on a list of suffixes.", "description": "FilterIterator implementation that filters files based on a list of suffixes.",
"homepage": "https://github.com/sebastianbergmann/php-file-iterator/", "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
"keywords": [
"filesystem",
"iterator"
],
"time": "2017-11-27T13:52:08+00:00" "time": "2017-11-27T13:52:08+00:00"
}, },
{ {
@ -1165,18 +1062,8 @@
"license": [ "license": [
"BSD-3-Clause" "BSD-3-Clause"
], ],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Simple template engine.", "description": "Simple template engine.",
"homepage": "https://github.com/sebastianbergmann/php-text-template/", "homepage": "https://github.com/sebastianbergmann/php-text-template/",
"keywords": [
"template"
],
"time": "2015-06-21T13:50:34+00:00" "time": "2015-06-21T13:50:34+00:00"
}, },
{ {
@ -1214,18 +1101,8 @@
"license": [ "license": [
"BSD-3-Clause" "BSD-3-Clause"
], ],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de",
"role": "lead"
}
],
"description": "Utility class for timing", "description": "Utility class for timing",
"homepage": "https://github.com/sebastianbergmann/php-timer/", "homepage": "https://github.com/sebastianbergmann/php-timer/",
"keywords": [
"timer"
],
"time": "2017-02-26T11:10:40+00:00" "time": "2017-02-26T11:10:40+00:00"
}, },
{ {
@ -1264,17 +1141,8 @@
"license": [ "license": [
"BSD-3-Clause" "BSD-3-Clause"
], ],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Wrapper around PHP's tokenizer extension.", "description": "Wrapper around PHP's tokenizer extension.",
"homepage": "https://github.com/sebastianbergmann/php-token-stream/", "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
"keywords": [
"tokenizer"
],
"time": "2017-12-04T08:55:13+00:00" "time": "2017-12-04T08:55:13+00:00"
}, },
{ {
@ -1347,6 +1215,10 @@
"testing", "testing",
"xunit" "xunit"
], ],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"source": "https://github.com/sebastianbergmann/phpunit/tree/4.8.36"
},
"time": "2017-06-21T08:07:12+00:00" "time": "2017-06-21T08:07:12+00:00"
}, },
{ {
@ -1390,19 +1262,9 @@
"license": [ "license": [
"BSD-3-Clause" "BSD-3-Clause"
], ],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de",
"role": "lead"
}
],
"description": "Mock Object library for PHPUnit", "description": "Mock Object library for PHPUnit",
"homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
"keywords": [ "abandoned": true,
"mock",
"xunit"
],
"time": "2015-10-02T06:51:40+00:00" "time": "2015-10-02T06:51:40+00:00"
}, },
{ {
@ -1442,31 +1304,8 @@
"license": [ "license": [
"BSD-3-Clause" "BSD-3-Clause"
], ],
"authors": [
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
},
{
"name": "Volker Dusch",
"email": "github@wallbash.com"
},
{
"name": "Bernhard Schussek",
"email": "bschussek@2bepublished.at"
},
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Provides the functionality to compare PHP values for equality", "description": "Provides the functionality to compare PHP values for equality",
"homepage": "http://www.github.com/sebastianbergmann/comparator", "homepage": "http://www.github.com/sebastianbergmann/comparator",
"keywords": [
"comparator",
"compare",
"equality"
],
"time": "2017-01-29T09:50:25+00:00" "time": "2017-01-29T09:50:25+00:00"
}, },
{ {
@ -1504,21 +1343,8 @@
"license": [ "license": [
"BSD-3-Clause" "BSD-3-Clause"
], ],
"authors": [
{
"name": "Kore Nordmann",
"email": "mail@kore-nordmann.de"
},
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Diff implementation", "description": "Diff implementation",
"homepage": "https://github.com/sebastianbergmann/diff", "homepage": "https://github.com/sebastianbergmann/diff",
"keywords": [
"diff"
],
"time": "2017-05-22T07:24:03+00:00" "time": "2017-05-22T07:24:03+00:00"
}, },
{ {
@ -1569,6 +1395,10 @@
"environment", "environment",
"hhvm" "hhvm"
], ],
"support": {
"issues": "https://github.com/sebastianbergmann/environment/issues",
"source": "https://github.com/sebastianbergmann/environment/tree/1.3"
},
"time": "2016-08-18T05:49:44+00:00" "time": "2016-08-18T05:49:44+00:00"
}, },
{ {
@ -1608,34 +1438,8 @@
"license": [ "license": [
"BSD-3-Clause" "BSD-3-Clause"
], ],
"authors": [
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
},
{
"name": "Volker Dusch",
"email": "github@wallbash.com"
},
{
"name": "Bernhard Schussek",
"email": "bschussek@2bepublished.at"
},
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{
"name": "Adam Harvey",
"email": "aharvey@php.net"
}
],
"description": "Provides the functionality to export PHP variables for visualization", "description": "Provides the functionality to export PHP variables for visualization",
"homepage": "http://www.github.com/sebastianbergmann/exporter", "homepage": "http://www.github.com/sebastianbergmann/exporter",
"keywords": [
"export",
"exporter"
],
"time": "2016-06-17T09:04:28+00:00" "time": "2016-06-17T09:04:28+00:00"
}, },
{ {
@ -1676,17 +1480,8 @@
"license": [ "license": [
"BSD-3-Clause" "BSD-3-Clause"
], ],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Snapshotting of global state", "description": "Snapshotting of global state",
"homepage": "http://www.github.com/sebastianbergmann/global-state", "homepage": "http://www.github.com/sebastianbergmann/global-state",
"keywords": [
"global state"
],
"time": "2015-10-12T03:26:01+00:00" "time": "2015-10-12T03:26:01+00:00"
}, },
{ {
@ -1724,20 +1519,6 @@
"license": [ "license": [
"BSD-3-Clause" "BSD-3-Clause"
], ],
"authors": [
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
},
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{
"name": "Adam Harvey",
"email": "aharvey@php.net"
}
],
"description": "Provides functionality to recursively process PHP variables", "description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context", "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
"time": "2016-10-03T07:41:43+00:00" "time": "2016-10-03T07:41:43+00:00"
@ -1766,20 +1547,13 @@
"license": [ "license": [
"BSD-3-Clause" "BSD-3-Clause"
], ],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects", "description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version", "homepage": "https://github.com/sebastianbergmann/version",
"time": "2015-06-21T13:59:46+00:00" "time": "2015-06-21T13:59:46+00:00"
}, },
{ {
"name": "symfony/yaml", "name": "symfony/yaml",
"version": "v2.8.50", "version": "v2.8.52",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/yaml.git", "url": "https://github.com/symfony/yaml.git",
@ -1825,6 +1599,9 @@
], ],
"description": "Symfony Yaml Component", "description": "Symfony Yaml Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/yaml/tree/v2.8.52"
},
"time": "2018-11-11T11:18:13+00:00" "time": "2018-11-11T11:18:13+00:00"
} }
], ],

View File

@ -808,6 +808,10 @@ If set to 1, this env disables the warning about running commands as root/super
It also disables automatic clearing of sudo sessions, so you should really only set this It also disables automatic clearing of sudo sessions, so you should really only set this
if you use Composer as super user at all times like in docker containers. if you use Composer as super user at all times like in docker containers.
### COMPOSER_ALLOW_XDEBUG
If set to 1, this env allows running Composer when the Xdebug extension is enabled, without restarting PHP without it.
### COMPOSER_AUTH ### COMPOSER_AUTH
The `COMPOSER_AUTH` var allows you to set up authentication as an environment variable. The `COMPOSER_AUTH` var allows you to set up authentication as an environment variable.
@ -833,6 +837,10 @@ By default it points to `$COMPOSER_HOME/cache` on \*nix and macOS, and
By setting this environmental value, you can set a path to a certificate bundle By setting this environmental value, you can set a path to a certificate bundle
file to be used during SSL/TLS peer verification. file to be used during SSL/TLS peer verification.
### COMPOSER_DISABLE_XDEBUG_WARN
If set to 1, this env suppresses a warning when Composer is running with the Xdebug extension enabled.
### COMPOSER_DISCARD_CHANGES ### COMPOSER_DISCARD_CHANGES
This env var controls the [`discard-changes`](06-config.md#discard-changes) config option. This env var controls the [`discard-changes`](06-config.md#discard-changes) config option.

View File

@ -260,7 +260,7 @@ driver directly, Composer will still attempt to use GitHub's zip files.
Defaults to `true`. Composer allows repositories to define a notification URL, Defaults to `true`. Composer allows repositories to define a notification URL,
so that they get notified whenever a package from that repository is installed. so that they get notified whenever a package from that repository is installed.
This option allows you to disable that behaviour. This option allows you to disable that behavior.
## discard-changes ## discard-changes

View File

@ -156,10 +156,10 @@ This issue can also happen on cPanel instances, when the shell fork bomb protect
## Xdebug impact on Composer ## Xdebug impact on Composer
To improve performance when the xdebug extension is enabled, Composer automatically restarts PHP without it. To improve performance when the Xdebug extension is enabled, Composer automatically restarts PHP without it.
You can override this behavior by using an environment variable: `COMPOSER_ALLOW_XDEBUG=1`. You can override this behavior by using an environment variable: `COMPOSER_ALLOW_XDEBUG=1`.
Composer will always show a warning if xdebug is being used, but you can override this with an environment variable: Composer will always show a warning if Xdebug is being used, but you can override this with an environment variable:
`COMPOSER_DISABLE_XDEBUG_WARN=1`. If you see this warning unexpectedly, then the restart process has failed: `COMPOSER_DISABLE_XDEBUG_WARN=1`. If you see this warning unexpectedly, then the restart process has failed:
please report this [issue](https://github.com/composer/composer/issues). please report this [issue](https://github.com/composer/composer/issues).

View File

@ -205,7 +205,7 @@ class Application extends BaseApplication
} }
if (extension_loaded('xdebug') && !getenv('COMPOSER_DISABLE_XDEBUG_WARN')) { if (extension_loaded('xdebug') && !getenv('COMPOSER_DISABLE_XDEBUG_WARN')) {
$io->writeError('<warning>You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug</warning>'); $io->writeError('<warning>You are running composer with Xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug</warning>');
} }
if (defined('COMPOSER_DEV_WARNING_TIME') && $commandName !== 'self-update' && $commandName !== 'selfupdate' && time() > COMPOSER_DEV_WARNING_TIME) { if (defined('COMPOSER_DEV_WARNING_TIME') && $commandName !== 'self-update' && $commandName !== 'selfupdate' && time() > COMPOSER_DEV_WARNING_TIME) {

View File

@ -29,6 +29,11 @@ class ArrayRepository extends BaseRepository
/** @var PackageInterface[] */ /** @var PackageInterface[] */
protected $packages; protected $packages;
/**
* @var PackageInterface[] indexed by package unique name and used to cache hasPackage calls
*/
protected $packageMap;
public function __construct(array $packages = array()) public function __construct(array $packages = array())
{ {
foreach ($packages as $package) { foreach ($packages as $package) {
@ -121,15 +126,14 @@ class ArrayRepository extends BaseRepository
*/ */
public function hasPackage(PackageInterface $package) public function hasPackage(PackageInterface $package)
{ {
$packageId = $package->getUniqueName(); if ($this->packageMap === null) {
$this->packageMap = array();
foreach ($this->getPackages() as $repoPackage) { foreach ($this->getPackages() as $repoPackage) {
if ($packageId === $repoPackage->getUniqueName()) { $this->packageMap[$repoPackage->getUniqueName()] = $repoPackage;
return true;
} }
} }
return false; return isset($this->packageMap[$package->getUniqueName()]);
} }
/** /**
@ -151,6 +155,9 @@ class ArrayRepository extends BaseRepository
$this->addPackage($aliasedPackage); $this->addPackage($aliasedPackage);
} }
} }
// invalidate package map cache
$this->packageMap = null;
} }
protected function createAliasPackage(PackageInterface $package, $alias, $prettyAlias) protected function createAliasPackage(PackageInterface $package, $alias, $prettyAlias)
@ -171,6 +178,9 @@ class ArrayRepository extends BaseRepository
if ($packageId === $repoPackage->getUniqueName()) { if ($packageId === $repoPackage->getUniqueName()) {
array_splice($this->packages, $key, 1); array_splice($this->packages, $key, 1);
// invalidate package map cache
$this->packageMap = null;
return; return;
} }
} }

View File

@ -125,7 +125,7 @@ class PlatformRepository extends ArrayRepository
$this->addExtension($name, $prettyVersion); $this->addExtension($name, $prettyVersion);
} }
// Check for xdebug in a restarted process // Check for Xdebug in a restarted process
if (!in_array('xdebug', $loadedExtensions, true) && ($prettyVersion = XdebugHandler::getSkippedVersion())) { if (!in_array('xdebug', $loadedExtensions, true) && ($prettyVersion = XdebugHandler::getSkippedVersion())) {
$this->addExtension('xdebug', $prettyVersion); $this->addExtension('xdebug', $prettyVersion);
} }

View File

@ -143,7 +143,7 @@ class GitDriver extends VcsDriver
public function getChangeDate($identifier) public function getChangeDate($identifier)
{ {
$this->process->execute(sprintf( $this->process->execute(sprintf(
'git log -1 --format=%%at %s', 'git -c log.showSignature=false log -1 --format=%%at %s',
ProcessExecutor::escape($identifier) ProcessExecutor::escape($identifier)
), $output, $this->repoDir); ), $output, $this->repoDir);

View File

@ -85,8 +85,10 @@ class Git
} }
// failed to checkout, first check git accessibility // failed to checkout, first check git accessibility
if (!$this->io->hasAuthentication($match[1]) && !$this->io->isInteractive()) {
$this->throwException('Failed to clone ' . $url . ' via ' . implode(', ', $protocols) . ' protocols, aborting.' . "\n\n" . implode("\n", $messages), $url); $this->throwException('Failed to clone ' . $url . ' via ' . implode(', ', $protocols) . ' protocols, aborting.' . "\n\n" . implode("\n", $messages), $url);
} }
}
// if we have a private github url and the ssh protocol is disabled then we skip it and directly fallback to https // if we have a private github url and the ssh protocol is disabled then we skip it and directly fallback to https
$bypassSshForGitHub = preg_match('{^git@' . self::getGitHubDomainsRegex($this->config) . ':(.+?)\.git$}i', $url) && !in_array('ssh', $protocols, true); $bypassSshForGitHub = preg_match('{^git@' . self::getGitHubDomainsRegex($this->config) . ':(.+?)\.git$}i', $url) && !in_array('ssh', $protocols, true);
@ -97,7 +99,7 @@ class Git
if ($bypassSshForGitHub || 0 !== $this->process->execute($command, $ignoredOutput, $cwd)) { if ($bypassSshForGitHub || 0 !== $this->process->execute($command, $ignoredOutput, $cwd)) {
// private github repository without ssh key access, try https with auth // private github repository without ssh key access, try https with auth
if (preg_match('{^git@' . self::getGitHubDomainsRegex($this->config) . ':(.+?)\.git$}i', $url, $match) if (preg_match('{^git@' . self::getGitHubDomainsRegex($this->config) . ':(.+?)\.git$}i', $url, $match)
|| preg_match('{^(https?)://' . self::getGitHubDomainsRegex($this->config) . '/(.*)}', $url, $match) || preg_match('{^https?://' . self::getGitHubDomainsRegex($this->config) . '/(.*)}', $url, $match)
) { ) {
if (!$this->io->hasAuthentication($match[1])) { if (!$this->io->hasAuthentication($match[1])) {
$gitHubUtil = new GitHub($this->io, $this->config, $this->process); $gitHubUtil = new GitHub($this->io, $this->config, $this->process);

View File

@ -155,7 +155,7 @@ class ProcessExecutor
//@see https://bugs.php.net/bug.php?id=43784 //@see https://bugs.php.net/bug.php?id=43784
//@see https://bugs.php.net/bug.php?id=49446 //@see https://bugs.php.net/bug.php?id=49446
if ('\\' === DIRECTORY_SEPARATOR) { if ('\\' === DIRECTORY_SEPARATOR) {
if ('' === $argument) { if ((string) $argument === '') {
return escapeshellarg($argument); return escapeshellarg($argument);
} }

View File

@ -62,7 +62,7 @@ class ApplicationTest extends TestCase
$outputMock->expects($this->at($index++)) $outputMock->expects($this->at($index++))
->method("write") ->method("write")
->with($this->equalTo('<warning>You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug</warning>')); ->with($this->equalTo('<warning>You are running composer with Xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug</warning>'));
} }
$outputMock->expects($this->at($index++)) $outputMock->expects($this->at($index++))

View File

@ -735,7 +735,7 @@ composer https://github.com/old/url (push)
$cmd = str_replace('cd ', 'cd /D ', $cmd); $cmd = str_replace('cd ', 'cd /D ', $cmd);
$cmd = str_replace('composerPath', getcwd().'/composerPath', $cmd); $cmd = str_replace('composerPath', getcwd().'/composerPath', $cmd);
return str_replace('""', '', strtr($cmd, "'", '"')); return strtr($cmd, "'", '"');
} }
return $cmd; return $cmd;

View File

@ -0,0 +1,145 @@
<?php
namespace Composer\Test\Util;
use Composer\Config;
use Composer\IO\IOInterface;
use Composer\Util\Filesystem;
use Composer\Util\Git;
use Composer\Util\ProcessExecutor;
use PHPUnit\Framework\TestCase;
class GitTest extends TestCase
{
/** @var Git */
private $git;
/** @var IOInterface&\PHPUnit_Framework_MockObject_MockObject */
private $io;
/** @var Config&\PHPUnit_Framework_MockObject_MockObject */
private $config;
/** @var ProcessExecutor&\PHPUnit_Framework_MockObject_MockObject */
private $process;
/** @var Filesystem&\PHPUnit_Framework_MockObject_MockObject */
private $fs;
protected function setUp()
{
$this->io = $this->getMockBuilder('Composer\IO\IOInterface')->getMock();
$this->config = $this->getMockBuilder('Composer\Config')->disableOriginalConstructor()->getMock();
$this->process = $this->getMockBuilder('Composer\Util\ProcessExecutor')->disableOriginalConstructor()->getMock();
$this->fs = $this->getMockBuilder('Composer\Util\Filesystem')->disableOriginalConstructor()->getMock();
$this->git = new Git($this->io, $this->config, $this->process, $this->fs);
}
/**
* @dataProvider publicGithubNoCredentialsProvider
*/
public function testRunCommandPublicGitHubRepositoryNotInitialClone($protocol, $expectedUrl)
{
$that = $this;
$commandCallable = function ($url) use ($that, $expectedUrl) {
$that->assertSame($expectedUrl, $url);
return 'git command';
};
$this->mockConfig($protocol);
$this->process
->expects($this->once())
->method('execute')
->with($this->equalTo('git command'))
->willReturn(0);
$this->git->runCommand($commandCallable, 'https://github.com/acme/repo', null, true);
}
public function publicGithubNoCredentialsProvider()
{
return array(
array('ssh', 'git@github.com:acme/repo'),
array('https', 'https://github.com/acme/repo'),
);
}
/**
* @expectedException \RuntimeException
*/
public function testRunCommandPrivateGitHubRepositoryNotInitialCloneNotInteractiveWithoutAuthentication()
{
$that = $this;
$commandCallable = function ($url) use ($that) {
$that->assertSame('https://github.com/acme/repo', $url);
return 'git command';
};
$this->mockConfig('https');
$this->process
->method('execute')
->willReturnMap(array(
array('git command', null, null, 1),
array('git --version', null, null, 0),
));
$this->git->runCommand($commandCallable, 'https://github.com/acme/repo', null, true);
}
/**
* @dataProvider privateGithubWithCredentialsProvider
*/
public function testRunCommandPrivateGitHubRepositoryNotInitialCloneNotInteractiveWithAuthentication($gitUrl, $protocol, $gitHubToken, $expectedUrl)
{
$commandCallable = function ($url) use ($expectedUrl) {
if ($url !== $expectedUrl) {
return 'git command failing';
}
return 'git command ok';
};
$this->mockConfig($protocol);
$this->process
->method('execute')
->willReturnMap(array(
array('git command failing', null, null, 1),
array('git command ok', null, null, 0),
));
$this->io
->method('isInteractive')
->willReturn(false);
$this->io
->method('hasAuthentication')
->with($this->equalTo('github.com'))
->willReturn(true);
$this->io
->method('getAuthentication')
->with($this->equalTo('github.com'))
->willReturn(array('username' => 'token', 'password' => $gitHubToken));
$this->git->runCommand($commandCallable, $gitUrl, null, true);
}
public function privateGithubWithCredentialsProvider()
{
return array(
array('git@github.com:acme/repo.git', 'ssh', 'MY_GITHUB_TOKEN', 'https://token:MY_GITHUB_TOKEN@github.com/acme/repo.git'),
array('https://github.com/acme/repo', 'https', 'MY_GITHUB_TOKEN', 'https://token:MY_GITHUB_TOKEN@github.com/acme/repo.git'),
);
}
private function mockConfig($protocol)
{
$this->config
->method('get')
->willReturnMap(array(
array('github-domains', 0, array('github.com')),
array('github-protocols', 0, array($protocol)),
));
}
}