summaryrefslogtreecommitdiffstats
path: root/composer-pr6435.patch
blob: 71792a945b8c604464e4186a3d6f8d8ba40caf22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
From 95d82f6fde2795c7193cf4ad15fc71d279989842 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Mon, 22 May 2017 08:01:51 +0200
Subject: [PATCH 1/2] 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 5ab623d02b6e..41e0cccb4f26 100644
--- a/tests/Composer/Test/Json/ComposerSchemaTest.php
+++ b/tests/Composer/Test/Json/ComposerSchemaTest.php
@@ -101,9 +101,10 @@ private function check($json)
         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 <remi@remirepo.net>
Date: Mon, 22 May 2017 08:16:45 +0200
Subject: [PATCH 2/2] 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 ace27a416f53..ff96a011fc0c 100644
--- a/tests/Composer/Test/IO/ConsoleIOTest.php
+++ b/tests/Composer/Test/IO/ConsoleIOTest.php
@@ -218,8 +218,11 @@ public function testAskAndValidate()
             ->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()