Skip to content

Bug: Autoload over Composer #2461

Description

@wingdu

Hello,

i have try to load composer over autoload. That works but then its not possible to call the function on the normal way.

As example in a normal PHP Files works:
require_once(DIR . '../../vendor/autoload.php');

// Configure HTTP basic authorization: BasicAuth
$config = ClickSend\Configuration::getDefaultConfiguration()
->setUsername('USERNAME')
->setPassword('PASSWORD');

$apiInstance = new ClickSend\Api\FAXApi(new GuzzleHttp\Client(),$config);
$fax_message_list= new \ClickSend\Model\FaxMessage();
$fax_message_list->setSource("php");
$fax_message_list->setTo("+498954883877");
$fax_message_list->setCustomString("custom_string");
$fax_message_list->setFromEmail("rolf@netzwerkadmins.de");
// \ClickSend\Model\FaxMessageCollection | FaxMessageCollection model
$fax_message = new \ClickSend\Model\FaxMessageCollection();
$fax_message->setMessages([$fax_message_list]);
$fax_message->setFileUrl("https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_public/_examples/document.pdf");

try {
$result = $apiInstance->faxSendPost($fax_message);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FAXApi->faxSendPost: ', $e->getMessage(), PHP_EOL;
}

Here no error nothing:

In Codeigniter 4 you can place the same code in a function and you get a error messages that:

Class 'App\Controllers\ClickSend\Configuration' not found

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified issues on the current code behavior or pull requests that will fix them

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions