[英]How to get the ZF classmap_generator.php via Composer without to install the whole Zend Framework?
Due to some issues with the dependencies ( zend-test
was prohibiting installation of PHPUnit 6), I removed the zendframework/zendframework
dependency from the composer.json
and installed only the Zend packages I really need. 由于依赖项的一些问题(
zend-test
禁止安装PHPUnit 6),我从composer.json
删除了zendframework/zendframework
依赖项,并仅安装了我真正需要的Zend包。 But now, the file classmap_generator.php
is missing. 但现在,文件
classmap_generator.php
丢失了。
Now I want to get the classmap generator back but without to load the whole framework with all its deoendencies. 现在我想得到类图生成器,但是没有加载整个框架及其所有的deoendencies。
Which package do I have to install to get the classmap_generator.php
? 我需要安装哪个软件包来获取
classmap_generator.php
?
You do not need the classmap generator at all, and it is removed from V3 anyway. 您根本不需要类图生成器,无论如何它都会从V3中删除。
What you should do is remove any Zend Autoload configuration (if you have any in your Module.php
files, and replace it with a PSR-0 or PSR-4 config in the autoload
section of your composer.json
. 你应该做的是消除任何的Zend自动加载配置(如果你在任何
Module.php
文件,并与在一个PSR-0或PSR-4的配置替换它autoload
您的部分composer.json
。
This way, composer handles all the autoloading, and you can use composer install --no-dev --optimize-autoloader --classmap-authoritative
for your production deployment, which will generate a very optimised classmap for you! 这样,composer处理所有自动加载,你可以使用
composer install --no-dev --optimize-autoloader --classmap-authoritative
进行生产部署,这将为你生成一个非常优化的类映射!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.