作曲家为什么不使用OPcache?

时间:2018-07-20 17:51:35

标签: php composer-php opcache

我添加了

"require": {
    "ext-opcache": "*",

对于composer.json使用eDirectory Symfony 2.8应用程序,但是它给了我一个错误:

$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested PHP extension ext-opcache * is missing from your system. Install or enable PHP's opcache extension.

但是,我要做已安装了OPcache!

$ php -r "phpinfo();" | grep OPcache -a3
Zend OPcache

Opcode Caching => Up and Running
Optimization => Enabled

它不会抱怨"ext-gd": "*""ext-mbstring": "*"

PHP 5.6.27

1 个答案:

答案 0 :(得分:7)

扩展名是Zend OPcache而不是OPcache。您需要提供全名:

"ext-zend-opcache": "*"
相关问题