Class 'ZendSearch\\Lucene\\Lucene' not found ZendFramework2

故事扮演 提交于 2019-11-29 18:05:30

The book is giving you weird instructions because it says Zend Search cannot be installed via. Composer, but this is no longer the case not quite true. To fix:

  1. Delete your vendor folder
  2. Edit your composer.json and add zendframework/zendsearch to the require section
  3. Run php composer.phar install to install all packages (including Zend Search)

Then everything should be working.

Edit: okay, for some reason this package isn't listed on packagist. You'll also need to add the repo URL to your composer.json:

"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/zendframework/ZendSearch"
    }
],

then give it another try.

You should put zendsearch in zendframework in vendor folder and after installing it as the book said, you should insert this line at the end of vendor/composer/autoload_namespaces.php:

'ZendSearch' => array($vendorDir . '/zendframework/zendsearch/library')
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!