Skip to content

Commit 0eae200

Browse files
committed
opcache.load_comments has been removed from PHP 7
1 parent c8927ad commit 0eae200

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lib/Doctrine/Common/Annotations/AnnotationReader.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,14 @@ public function __construct()
162162
throw AnnotationException::optimizerPlusSaveComments();
163163
}
164164

165+
if (PHP_VERSION < 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');

0 commit comments

Comments
 (0)