From 95d82f6fde2795c7193cf4ad15fc71d279989842 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 22 May 2017 08:01:51 +0200 Subject: [PATCH 1/3] fix test for json-schema 5.2 --- tests/Composer/Test/Json/ComposerSchemaTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Composer/Test/Json/ComposerSchemaTest.php b/tests/Composer/Test/Json/ComposerSchemaTest.php index 5ab623d02..41e0cccb4 100644 --- a/tests/Composer/Test/Json/ComposerSchemaTest.php +++ b/tests/Composer/Test/Json/ComposerSchemaTest.php @@ -101,9 +101,10 @@ class ComposerSchemaTest extends \PHPUnit_Framework_TestCase if (!$validator->isValid()) { $errors = $validator->getErrors(); - // remove justinrainbow/json-schema 3.0 props so it works with all versions + // remove justinrainbow/json-schema 3.0/5.2 props so it works with all versions foreach ($errors as &$err) { unset($err['pointer']); + unset($err['context']); } return $errors; From 741c8d63fbad0253a53b9558d98ee95b42fdbefc Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 22 May 2017 08:16:45 +0200 Subject: [PATCH 2/3] fix test for Symfony 3.2 --- tests/Composer/Test/IO/ConsoleIOTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/Composer/Test/IO/ConsoleIOTest.php b/tests/Composer/Test/IO/ConsoleIOTest.php index ace27a416..ff96a011f 100644 --- a/tests/Composer/Test/IO/ConsoleIOTest.php +++ b/tests/Composer/Test/IO/ConsoleIOTest.php @@ -218,8 +218,11 @@ class ConsoleIOTest extends TestCase ->will($this->returnValue($helperMock)) ; + $validator = function ($value) { + return true; + }; $consoleIO = new ConsoleIO($inputMock, $outputMock, $setMock); - $consoleIO->askAndValidate('Why?', 'validator', 10, 'default'); + $consoleIO->askAndValidate('Why?', $validator, 10, 'default'); } public function testSelect() From 1f4882a3e6a229ceb878eba74e6a805cad086bf8 Mon Sep 17 00:00:00 2001 From: Li Chuangbo Date: Wed, 26 Apr 2017 20:02:15 +1200 Subject: [PATCH 3/3] Revert "Fixed an issue when a phar file is used in "files" option in composer.json" This reverts commit 41e91f3064cee51dd52f45831dc48748ce37a095. The commit 41e91f3 in current codebase generates absolute path in autoload_static.php for phar file. Also according to http://php.net/manual/en/phar.using.intro.php, the `phar://` prefix is not needed. --- src/Composer/Autoload/AutoloadGenerator.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Composer/Autoload/AutoloadGenerator.php b/src/Composer/Autoload/AutoloadGenerator.php index c637b9438..1953e593a 100644 --- a/src/Composer/Autoload/AutoloadGenerator.php +++ b/src/Composer/Autoload/AutoloadGenerator.php @@ -534,10 +534,6 @@ EOF; } } - if (preg_match('/\.phar$/', $path)) { - $baseDir = "'phar://' . " . $baseDir; - } - return $baseDir . (($path !== false) ? var_export($path, true) : ""); }