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 1111 - 5.4
1212 - 5.5
1313 - 5.6
14+ - 7
1415 - hhvm
1516
1617before_script :
Original file line number Diff line number Diff line change @@ -162,13 +162,14 @@ public function __construct()
162162 throw AnnotationException::optimizerPlusSaveComments ();
163163 }
164164
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+ }
165169
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+ }
172173 }
173174
174175 AnnotationRegistry::registerFile (__DIR__ . '/Annotation/IgnoreAnnotation.php ' );
Original file line number Diff line number Diff line change @@ -1180,6 +1180,11 @@ public function testCastNegativeFloat()
11801180
11811181 public function testReservedKeywordsInAnnotations ()
11821182 {
1183+ if (PHP_VERSION_ID >= 70000 ) {
1184+ $ this ->markTestSkipped ('This test requires PHP 5.6 or lower. ' );
1185+ }
1186+ require 'ReservedKeywordsClasses.php ' ;
1187+
11831188 $ parser = $ this ->createTestParser ();
11841189
11851190 $ result = $ parser ->parse ('@Doctrine\Tests\Common\Annotations\True ' );
@@ -1356,15 +1361,6 @@ class Marker {
13561361 public $ value ;
13571362}
13581363
1359- /** @Annotation */
1360- class True {}
1361-
1362- /** @Annotation */
1363- class False {}
1364-
1365- /** @Annotation */
1366- class Null {}
1367-
13681364namespace Doctrine \Tests \Common \Annotations \FooBar ;
13691365
13701366/** @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