Skip to content

Composer dependency #33

@adrian-tilita

Description

@adrian-tilita

If i try to use to library outside a symfony environment like this:

{
    "require": {
        "leaseweb/api-caller-bundle": "1.2.6"
    }
}

and using the code:

<?php
require_once 'vendor/autoload.php';

use Lsw\ApiCallerBundle\Caller\LoggingApiCaller;
use Lsw\ApiCallerBundle\Call\HttpPostJson;

$caller = new LoggingApiCaller([]);
$curlCall = new HttpPostJson(
    'http://myurl.com',
    ['foo' => 'bar']
);

var_dump(array(
    'body' => $caller->call($curlCall),
    'status' => $caller->getLastStatus()
));

I end up with the following dependency error:

Error: Class 'Doctrine\Common\Util\Inflector' not found in [mypath]/vendor/leaseweb/api-caller-bundle/Lsw/ApiCallerBundle/Helper/Curl.php on line 38

Unfortunately, it is tied to Utils, not separate Inflector lib.

The fix is simple, just include "doctrine/common" in the library composer requirements.
Should I make a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions