I use composer to install Zend Framework 2 and other libraries. Every time after re-installing an application in the same path, I have to manually clear the APC (version 3.1.13) opcode cache (with PHP 5.4.8), otherwise I get errors like
PHP Fatal error: Interface 'Zend\\Mvc\\ApplicationInterface' not found
or
PHP Fatal error: include(): Cannot redeclare class zend\\eventmanager\\eventscapableinterface
The failing class keeps changing after every application install. I have apc.stat=1, so the opcode cache should notice newly deployed php files and recompile them automatically, if I have deployed the application on the same path before.
I have discussed the problem on Github with the composer developers and posted my APC settings here: https://github.com/composer/composer/issues/1662. We agree that this looks more like an APC problem.
touchall your updated files so they have a new timestamp,apcis pretty dumb.apc.include_once_override = 0apc.include_once_override = 0, see here. @ZdenekMachek I'll try but since I delete the whole vendor folder (containing Zend Framework) upon reinstall and then install the contents again (from composer cache), I think the file timestamps should be updated automatically..