1

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. But now, the file classmap_generator.php is missing.

Now I want to get the classmap generator back but without to load the whole framework with all its deoendencies.

Which package do I have to install to get the classmap_generator.php?

automatix
  • 14,018
  • 26
  • 105
  • 230

1 Answers1

3

You do not need the classmap generator at all, and it is removed from V3 anyway.

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.

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!

Thomas Dutrion
  • 1,844
  • 1
  • 11
  • 9
  • 1
    Thanks for your answer! Just to add some further information: The Class Map Generator apparently was part of the `zendframework/zend-loader` package and has been removed (see also the GitHub issue [here](https://github.com/zendframework/zend-loader/issues/12)). – automatix May 14 '17 at 19:11