I'm trying to add Lucene search to my ZF2 project. The package is not listed on the ZF2 packages page. I tried to workaround this by installing it manually from GitHub.
I added this to my composer.json:
"repositories": [{
"type": "package",
"package": {
"name": "zendframework/zendsearch",
"version": "0.1",
"source": {
"url": "https://github.com/zendframework/ZendSearch.git",
"type": "git",
"reference": "master"
}
}
}]
and installed it via composer.phar:
$ ./composer.phar require zendframework/zendsearch:0.1
This installed the package but the autoloading doesn't work. Did anyone get ZendSearch working within the ZF2 skeleton application?
Have a look at the ZendSearch composer.json. Specifically, the
autoload
section:You need that in your 'package' to get autoloading working (in fact your package should be as close as possible to the real composer.json).
This ended up working for me:
This worked for me