File tree Expand file tree Collapse file tree 4 files changed +25
-15
lines changed
lib/Doctrine/Common/Annotations
tests/Doctrine/Tests/Common/Annotations Expand file tree Collapse file tree 4 files changed +25
-15
lines changed Original file line number Diff line number Diff line change 11
11
- 5.4
12
12
- 5.5
13
13
- 5.6
14
+ - 7
14
15
- hhvm
15
16
16
17
before_script :
Original file line number Diff line number Diff line change @@ -162,13 +162,14 @@ public function __construct()
162
162
throw AnnotationException::optimizerPlusSaveComments ();
163
163
}
164
164
165
+ if (PHP_VERSION_ID < 70000 ) {
166
+ if (extension_loaded ('Zend Optimizer+ ' ) && (ini_get ('zend_optimizerplus.load_comments ' ) === "0 " || ini_get ('opcache.load_comments ' ) === "0 " )) {
167
+ throw AnnotationException::optimizerPlusLoadComments ();
168
+ }
165
169
166
- if (extension_loaded ('Zend Optimizer+ ' ) && (ini_get ('zend_optimizerplus.load_comments ' ) === "0 " || ini_get ('opcache.load_comments ' ) === "0 " )) {
167
- throw AnnotationException::optimizerPlusLoadComments ();
168
- }
169
-
170
- if (extension_loaded ('Zend OPcache ' ) && ini_get ('opcache.load_comments ' ) == 0 ) {
171
- throw AnnotationException::optimizerPlusLoadComments ();
170
+ if (extension_loaded ('Zend OPcache ' ) && ini_get ('opcache.load_comments ' ) == 0 ) {
171
+ throw AnnotationException::optimizerPlusLoadComments ();
172
+ }
172
173
}
173
174
174
175
AnnotationRegistry::registerFile (__DIR__ . '/Annotation/IgnoreAnnotation.php ' );
Original file line number Diff line number Diff line change @@ -1180,6 +1180,11 @@ public function testCastNegativeFloat()
1180
1180
1181
1181
public function testReservedKeywordsInAnnotations ()
1182
1182
{
1183
+ if (PHP_VERSION_ID >= 70000 ) {
1184
+ $ this ->markTestSkipped ('This test requires PHP 5.6 or lower. ' );
1185
+ }
1186
+ require 'ReservedKeywordsClasses.php ' ;
1187
+
1183
1188
$ parser = $ this ->createTestParser ();
1184
1189
1185
1190
$ result = $ parser ->parse ('@Doctrine\Tests\Common\Annotations\True ' );
@@ -1356,15 +1361,6 @@ class Marker {
1356
1361
public $ value ;
1357
1362
}
1358
1363
1359
- /** @Annotation */
1360
- class True {}
1361
-
1362
- /** @Annotation */
1363
- class False {}
1364
-
1365
- /** @Annotation */
1366
- class Null {}
1367
-
1368
1364
namespace Doctrine \Tests \Common \Annotations \FooBar ;
1369
1365
1370
1366
/** @Annotation */
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Doctrine \Tests \Common \Annotations ;
4
+
5
+ /** @Annotation */
6
+ class True {}
7
+
8
+ /** @Annotation */
9
+ class False {}
10
+
11
+ /** @Annotation */
12
+ class Null {}
You can’t perform that action at this time.
0 commit comments