Skip to content

Fatal error: Puli Factory class does not exist #49

@tegansnyder

Description

@tegansnyder

I'm able to install this client by composer; however, when I attempt to call the CrawlBot API I get an error. Here is my code:

require '/vendor/autoload.php';

use Swader\Diffbot\Diffbot;

$diffbot = new Diffbot('my_token');
$crawl = $diffbot->crawl('SomeSite');
$job = $crawl->call();

var_dump($job->getDownloadUrl("json"));

Here is the error that is returned:

PHP Fatal error:  Uncaught RuntimeException: Puli Factory class does not exist in /app/vendor/php-http/discovery/src/ClassDiscovery.php:38
Stack trace:
#0 /app/vendor/php-http/discovery/src/ClassDiscovery.php(79): Http\Discovery\ClassDiscovery::getPuliFactory()
#1 /app/vendor/php-http/discovery/src/ClassDiscovery.php(99): Http\Discovery\ClassDiscovery::getPuliDiscovery()
#2 /app/vendor/php-http/discovery/src/HttpClientDiscovery.php(21): Http\Discovery\ClassDiscovery::findOneByType('Http\\Client\\Htt...')
#3 /app/vendor/swader/diffbot-php-client/src/Diffbot.php(102): Http\Discovery\HttpClientDiscovery::find()
#4 /app/vendor/swader/diffbot-php-client/src/Diffbot.php(268): Swader\Diffbot\Diffbot->setHttpClient()
#5 /private/var/www/sov/shell/get_diffbot_data.php(17): Swader\Diffbot\Diffbot->crawl('SomeSiteName')
#6 {main}
  thrown in /app/vendor/php-http/discovery/src/ClassDiscovery.php on line 38

My composer.json contains:

{
    "minimum-stability": "dev",
    "prefer-stable": true,
    "require": {
        "php-http/guzzle6-adapter": "~1.0",
        "php-http/message": "^1.2",
        "php-http/discovery": "~0.8.0",
        "puli/cli": "~1.0",
        "php-http/plugins": "~1.0",
        "puli/composer-plugin":"^1.0",
        "swader/diffbot-php-client": "^2.1@dev"
    }
}

I'm wondering if there is an issue upstream somewhere. Ideas?

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions