为什么作曲家不会使用OPcache?

Chl*_*loe 3 php composer-php opcache

我补充道

"require": {
    "ext-opcache": "*",
Run Code Online (Sandbox Code Playgroud)

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.
Run Code Online (Sandbox Code Playgroud)

但是,我确实安装了OPcache!

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

Opcode Caching => Up and Running
Optimization => Enabled
Run Code Online (Sandbox Code Playgroud)

它没有抱怨"ext-gd": "*""ext-mbstring": "*".

PHP 5.6.27

rob*_*006 7

扩展名Zend OPcache不是OPcache.您需要使用全名:

"ext-zend-opcache": "*"
Run Code Online (Sandbox Code Playgroud)