0

I know that I should be using Composer. I've not ventured there just yet.

I want to try Meilisearch Search service, and they have a PHP SDK.

According to the docs of the PHP SDK:

To get started, simply require the project using Composer. You will also need to install packages that "provide" psr/http-client-implementation and psr/http-factory-implementation. A list with compatible HTTP clients and client adapters can be found at php-http.org.

If you don't know which HTTP client to use, we recommend using Guzzle 7

So, This is what I've inserted in my php file:

include './search/guzzle7/src/Client.php';
include './search/guzzle7/src/Promise.php';
include './search/meilisearchPhp/src/MeiliSearch.php';
include './search/meilisearchPhp/src/Client.php';

Given that I get this error:

Fatal error: Uncaught Error: Class 'MeiliSearch\Client' not found

It's pretty clear that I'm adding the files incorrectly. Any advice on this?

The github repos are: Meilisearch Meilisearch PHP SDK Guzzle 7

I have the original Meilisearch project in the same folder as all other projects, the search folder (./search/meilisearch/)

Thanks for your help!

Shobi
  • 10,374
  • 6
  • 46
  • 82
Rosamunda
  • 14,620
  • 10
  • 40
  • 70
  • "I know that I should be using Composer. I've not ventured there just yet." <- is there any reason you haven't? I mean, it makes things 10 times easier. You just run one command to install the given package and include a single vendor/autoload.php file, then everything just works. – Jeto Oct 13 '20 at 21:01
  • Just use composer – Oliver O'Neill Oct 13 '20 at 21:02
  • I think you're right... every time I need to install something is a pain in the backteeth :) – Rosamunda Oct 13 '20 at 21:11
  • Hey @Rosamunda I made a issue on the PHP client of MeilISearch: https://github.com/meilisearch/meilisearch-php/issues/107 feel free to give your opinion – Bidoubiwa Oct 14 '20 at 08:20

0 Answers0