phpsymfonycomposer-phpsymfony4sendinblue

Symfony "Attempted to load class" error after upgrade to Symfony 4.2


I have a new error after upgrading, that should not be related to the upgrade.

I am using SendInBlue Php Library in my project, loaded in my composer with :

"sendinblue/api-v3-sdk": "*@dev",

Used in my Service with:

use SendinBlue\Client\Api\SMTPApi;
use SendinBlue\Client\Model\SendEmail;

Called with :

$api_instance = new SMTPApi();

Since the upgrade I have a new error:

Attempted to load class "SMTPApi" from namespace "SendinBlue\Client\Api". Did you forget a "use" statement for another namespace?

I tried clear cache, have rm -rf remove cache, Invalidate my phpStorm Cache + Restart, remove the two USE statement, and then look what is displayed when I try to create a new instance, but it's still the same USE statement that is added.

If I COMMAND+CLICK on the class called, it does show the related class (SMTPApi).

I am totally lost on what could be the problem here, is it symfony upgrade related ? Is it composer update that changed other things ?

for more information, here is the header of my Service:

namespace App\Services;

use FOS\UserBundle\Mailer\MailerInterface;
use FOS\UserBundle\Model\UserInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Routing\Router;
use SendinBlue\Client\Api\SMTPApi;
use SendinBlue\Client\Model\SendEmail; 

And here is my composer:

{ [...]

"require": {
    "php": "^7.1.3",
    "ext-iconv": "*",
    "aws/aws-sdk-php": "^3.69",
    "beelab/tag-bundle": "^1.4.0",
    "friendsofsymfony/user-bundle": "^2.1",
    "google/apiclient": "^2.0",
    "gumlet/php-image-resize": "^1.9",
    "kunalvarma05/dropbox-php-sdk": "^0.2.1",
    "lildude/phpsmug": "^4.0",
    "sendinblue/api-v3-sdk": "*@dev",
    "sensio/framework-extra-bundle": "^5.1",
    "sensiolabs/security-checker": "^4.1",
    "symfony/apache-pack": "^1.0",
    "symfony/asset": "^4.2",
    "symfony/console": "^4.2",
    "symfony/debug-pack": "^1.0",
    "symfony/dependency-injection": "^4.2",
    "symfony/dotenv": "^4.2",
    "symfony/flex": "^1.0",
    "symfony/form": "^4.2",
    "symfony/framework-bundle": "^4.2",
    "symfony/lock": "^4.2",
    "symfony/maker-bundle": "^1.4",
    "symfony/monolog-bundle": "^3.3",
    "symfony/orm-pack": "^1.0",
    "symfony/swiftmailer-bundle": "^3.0",
    "symfony/translation": "^4.2",
    "symfony/twig-bundle": "4.2",
    "symfony/web-server-bundle": "^4.2",
    "symfony/yaml": "^4.2"
},
"require-dev": {
    "easycorp/easy-log-handler": "^1.0.2",
    "symfony/debug-bundle": "^3.3|^4.2",
    "symfony/profiler-pack": "^1.0",
    "symfony/var-dumper": "^3.3|^4.2"
},
[...]
}

Solution

  • As said up here, needed to revert the library. Maybe now it's fixed by the creator on GIT.