Skip to content

No PSR-18 clients found. Make sure to install a package providing "psr/http-client-implementation". Example: "php-http/guzzle6-adapter". #4

@gitman2015

Description

@gitman2015

Hello,
I got a psr-18 error when I test your example:

No PSR-18 clients found. Make sure to install a package providing "psr/http-client-implementation". Example: "php-http/guzzle6-adapter".

require 'vendor/autoload.php';

/**
 * Use
 * Single provider
 * To get information of a book on a specific provider:
 */

$htmlGetter = new \MacFJA\BookRetriever\Helper\HtmlGetter();
$isbnTool = new \Isbn\Isbn();

$antoineOnline = new \MacFJA\BookRetriever\Provider\AntoineOnline($htmlGetter, $isbnTool);

// $books contains a list of \MacFJA\BookRetriever\SearchResultInterface
try {
    $books = $antoineOnline->searchIsbn('97822530063249');
} catch(Exception $e) {
    echo $e->getMessage();
}

// symfony/var-dumper
dump($htmlGetter);
dump($isbnTool);
dump($antoineOnline);

I'm testing your library outside the symfony framework, just in a pure php project

Also, can you please show a complete working example. I don't know what to put in $providerConfiguration = ...; either in Configurable provider or Multiple providers.

Finally, can you please add the Eni provider (https://www.editions-eni.fr/)?

I can't wait to test all these features which seem very complete and powerful to me!
Thanks for your help

my composer.json:

{
    "require": {
        "macfja/book-retriever": "^1.1",
        "symfony/var-dumper": "^5.4"
    },
    "autoload": {
        "psr-4": {
            "App\\":"src/"
        }
    }
}

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or requestquestionFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions