0

I am getting below error:

Fatal error: Declaration of Cake\ElasticSearch\Plugin::bootstrap(Cake\Core\PluginApplicationInterface $app) must be compatible with Cake\Core\BasePlugin::bootstrap(Cake\Core\PluginApplicationInterface $app): void in C:\xampp\htdocs\my_app_name\vendor\cakephp\elastic-search\src\Plugin.php on line 33

I have followed this https://book.cakephp.org/elasticsearch/2/en/index.html

ndm
  • 59,784
  • 9
  • 71
  • 110
kadam sunil
  • 233
  • 2
  • 3
  • I would recommend you to use ruffling/elastica directly. We had a lot trouble with this plugin in the past and it is A LOT easier to maintain the application and do ES version updates without the additional layer of the plugin. – floriank Jan 09 '20 at 10:06

1 Answers1

0

The ElasticSearch plugin isn't yet CakePHP 4 compatible, if you're adventurous and you really know what you're doing, then you could try the unstable development version of the 4.x compatible version:

composer require "cakephp/elastic-search:cake-4.x-dev"

This might require changing the minimum-stability settings in your application's composer.json file accordingly.

If you don't feel like doing that, then you'll just have to wait until a stable CakePHP 4.x compatible release is being published.

ndm
  • 59,784
  • 9
  • 71
  • 110
  • @kadamsunil Well, it's a development version after all, if it's not yet fully working, then you'll have to wait... or use elastica directly as suggested by burzum. – ndm Jan 11 '20 at 18:08