summaryrefslogtreecommitdiffstats
path: root/php-nette-application-upstream.patch
blob: a46d10b5a206e9b13513fd9dc7523f8aec11ebc8 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
From e071611a93ce117c0983ad824c817c0ba0d242bb Mon Sep 17 00:00:00 2001
From: David Grudl <david@grudl.com>
Date: Tue, 17 May 2016 18:00:56 +0200
Subject: [PATCH] tests: compatibility with DI & Latte 2.4

---
 tests/Bridges.DI/ApplicationExtension.basic.phpt       | 2 +-
 tests/Bridges.DI/ApplicationExtension.invalidLink.phpt | 8 ++++----
 tests/Bridges.DI/ApplicationExtension.scan.phpt        | 6 +++---
 tests/Bridges.DI/LatteExtension.basic.phpt             | 2 +-
 tests/Bridges.DI/RoutingExtension.basic.phpt           | 2 +-
 tests/Bridges.DI/RoutingExtension.cache.phpt           | 6 +++---
 tests/Bridges.Latte/UIMacros.link.2.phpt               | 4 ++--
 7 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/tests/Bridges.DI/ApplicationExtension.basic.phpt b/tests/Bridges.DI/ApplicationExtension.basic.phpt
index ee98341..d3b74cd 100644
--- a/tests/Bridges.DI/ApplicationExtension.basic.phpt
+++ b/tests/Bridges.DI/ApplicationExtension.basic.phpt
@@ -21,7 +21,7 @@ test(function () {
 	$builder->addDefinition('myHttpRequest')->setFactory('Nette\Http\Request', array(new DI\Statement('Nette\Http\UrlScript')));
 	$builder->addDefinition('myHttpResponse')->setClass('Nette\Http\Response');
 
-	$code = $compiler->compile(array(), 'Container1');
+	$code = @$compiler->compile(array(), 'Container1'); // @ compatibility with 2.4
 	eval($code);
 
 	$container = new Container1;
diff --git a/tests/Bridges.DI/ApplicationExtension.invalidLink.phpt b/tests/Bridges.DI/ApplicationExtension.invalidLink.phpt
index 95d2fa4..fb11893 100644
--- a/tests/Bridges.DI/ApplicationExtension.invalidLink.phpt
+++ b/tests/Bridges.DI/ApplicationExtension.invalidLink.phpt
@@ -36,7 +36,7 @@ test(function () {
 		presenter: Presenter1
 	');
 	$compiler->addExtension('application', new ApplicationExtension(TRUE));
-	$code = $compiler->compile(NULL, 'Container4');
+	$code = @$compiler->compile(NULL, 'Container4'); // @ compatibility with 2.4
 	eval($code);
 
 	$container = new Container4;
@@ -57,7 +57,7 @@ test(function () {
 		presenter: Presenter1
 	');
 	$compiler->addExtension('application', new ApplicationExtension(TRUE));
-	$code = $compiler->compile(NULL, 'Container5');
+	$code = @$compiler->compile(NULL, 'Container5'); // @ compatibility with 2.4
 	eval($code);
 
 	$container = new Container5;
@@ -78,7 +78,7 @@ test(function () {
 		presenter: Presenter1
 	');
 	$compiler->addExtension('application', new ApplicationExtension(FALSE));
-	$code = $compiler->compile(NULL, 'Container6');
+	$code = @$compiler->compile(NULL, 'Container6'); // @ compatibility with 2.4
 	eval($code);
 
 	$container = new Container6;
@@ -99,7 +99,7 @@ test(function () {
 		presenter: Presenter1
 	');
 	$compiler->addExtension('application', new ApplicationExtension(FALSE));
-	$code = $compiler->compile(NULL, 'Container7');
+	$code = @$compiler->compile(NULL, 'Container7'); // @ compatibility with 2.4
 	eval($code);
 
 	$container = new Container7;
diff --git a/tests/Bridges.DI/ApplicationExtension.scan.phpt b/tests/Bridges.DI/ApplicationExtension.scan.phpt
index 7535091..24e2e39 100644
--- a/tests/Bridges.DI/ApplicationExtension.scan.phpt
+++ b/tests/Bridges.DI/ApplicationExtension.scan.phpt
@@ -21,7 +21,7 @@ test(function () {
 	$builder->addDefinition('myRouter')->setClass('Nette\Application\Routers\SimpleRouter');
 	$builder->addDefinition('myHttpRequest')->setFactory('Nette\Http\Request', array(new DI\Statement('Nette\Http\UrlScript')));
 	$builder->addDefinition('myHttpResponse')->setClass('Nette\Http\Response');
-	$code = $compiler->compile(array(
+	$code = @$compiler->compile(array( // @ compatibility with 2.4
 		'application' => array('debugger' => FALSE),
 	), 'Container1');
 	eval($code);
@@ -42,7 +42,7 @@ test(function () {
 	$builder->addDefinition('myRouter')->setClass('Nette\Application\Routers\SimpleRouter');
 	$builder->addDefinition('myHttpRequest')->setFactory('Nette\Http\Request', array(new DI\Statement('Nette\Http\UrlScript')));
 	$builder->addDefinition('myHttpResponse')->setClass('Nette\Http\Response');
-	$code = $compiler->compile(array(
+	$code = @$compiler->compile(array( // @ compatibility with 2.4
 		'application' => array(
 			'scanDirs' => array(__DIR__ . '/files'),
 			'debugger' => FALSE,
@@ -77,7 +77,7 @@ test(function () {
 			setup:
 				- setView(test)
 	', 'neon'));
-	$code = $compiler->compile($config, 'Container3');
+	$code = @$compiler->compile($config, 'Container3'); // @ compatibility with 2.4
 	eval($code);
 
 	$container = new Container3;
diff --git a/tests/Bridges.DI/LatteExtension.basic.phpt b/tests/Bridges.DI/LatteExtension.basic.phpt
index 5f0d215..fc473f3 100644
--- a/tests/Bridges.DI/LatteExtension.basic.phpt
+++ b/tests/Bridges.DI/LatteExtension.basic.phpt
@@ -74,7 +74,7 @@ latte:
 $compiler = new DI\Compiler;
 $compiler->addExtension('latte', new Nette\Bridges\ApplicationDI\LatteExtension(NULL, FALSE));
 $compiler->addExtension('another', new AnotherExtension);
-$code = $compiler->compile($config, 'Container');
+$code = @$compiler->compile($config, 'Container'); // @ compatibility with 2.4
 eval($code);
 
 $container = new Container;
diff --git a/tests/Bridges.DI/RoutingExtension.basic.phpt b/tests/Bridges.DI/RoutingExtension.basic.phpt
index b8d8f90..c05d116 100644
--- a/tests/Bridges.DI/RoutingExtension.basic.phpt
+++ b/tests/Bridges.DI/RoutingExtension.basic.phpt
@@ -23,7 +23,7 @@ test(function () {
 
 	$compiler = new DI\Compiler;
 	$compiler->addExtension('routing', new RoutingExtension(FALSE));
-	$code = $compiler->compile($config, 'Container1');
+	$code = @$compiler->compile($config, 'Container1'); // @ compatibility with 2.4
 	eval($code);
 
 	$container = new Container1;
diff --git a/tests/Bridges.DI/RoutingExtension.cache.phpt b/tests/Bridges.DI/RoutingExtension.cache.phpt
index 9f1aad7..fd0d96d 100644
--- a/tests/Bridges.DI/RoutingExtension.cache.phpt
+++ b/tests/Bridges.DI/RoutingExtension.cache.phpt
@@ -39,7 +39,7 @@ test(function () {
 
 	$compiler = new DI\Compiler;
 	$compiler->addExtension('routing', new RoutingExtension(FALSE));
-	$code = $compiler->compile($config, 'Container1');
+	$code = @$compiler->compile($config, 'Container1'); // @ compatibility with 2.4
 	eval($code);
 
 	$container = new Container1;
@@ -60,7 +60,7 @@ test(function () {
 
 	$compiler = new DI\Compiler;
 	$compiler->addExtension('routing', new RoutingExtension(FALSE));
-	$code = $compiler->compile($config, 'Container2');
+	$code = @$compiler->compile($config, 'Container2'); // @ compatibility with 2.4
 	eval($code);
 
 	$container = new Container2;
@@ -88,5 +88,5 @@ Assert::exception(function () {
 
 	$compiler = new DI\Compiler;
 	$compiler->addExtension('routing', new RoutingExtension(FALSE));
-	$compiler->compile($config, 'Container3');
+	@$compiler->compile($config, 'Container3'); // @ compatibility with 2.4
 }, 'Nette\DI\ServiceCreationException', 'Unable to cache router due to error: %a%');
diff --git a/tests/Bridges.Latte/UIMacros.link.2.phpt b/tests/Bridges.Latte/UIMacros.link.2.phpt
index c1d88ea..a7d8421 100644
--- a/tests/Bridges.Latte/UIMacros.link.2.phpt
+++ b/tests/Bridges.Latte/UIMacros.link.2.phpt
@@ -87,7 +87,7 @@ link:['login']
 <a href="link:['default!#hash',10,20]"></a>
 EOD
 
-, $latte->renderToString(<<<EOD
+, strtr($latte->renderToString(<<<EOD
 {plink Homepage:}
 
 {plink  Homepage: }
@@ -118,4 +118,4 @@ EOD
 
 <a n:href="default!#hash 10, 20"></a>
 EOD
-, $params));
+, $params), ['&#039;' => "'"]));