doctrine / doctrine/annotations
DCOM-243: 'Zend OPcache' PHP extension might prevent AnnotationReader from getting entity class comments
- Dominant language
- PHP
- Stars
- 6.7k
- Forks
- 234
- PR merge metrics
- No merged PRs in 30d
Description
_From @doctrinebot on May 22, 2014 8:0_
Jira issue originally created by user VictorSmirnov:
If module `Zend OPcache` is installed and configured not to save comments the `AnnotationReader` class fails to parse data for entities.
Output from `php -m` contains line `Zend OPcache`.
The module is configured with the following parameter `opcache.save_comments=0`.
I would expect the `AnnotationReader` constructor to throw an exception. But it does not check if the module is loaded.
In addition to the check for `opcache` module
```
if (extension*loaded('opcache') && ini_get('opcache.save*comments') == 0) {
throw AnnotationException::optimizerPlusSaveComments();
}
```
we might have a new check for the `Zend OPcache` module
```
if (extension*loaded('Zend OPcache') && ini_get('opcache.save*comments') == 0) {
throw AnnotationException::optimizerPlusSaveComments();
}
```
_Copied from original issue: doctrine/common#551_
Contributor guide
Assessment
This issue has not been assessed yet.