Yii2-queue third party class not found

I’m using yii2-queue

in the execute() function i’m calling a component which use a third party library that i installed using composer. The component is working in my app but not in the queue job, the class is not found.

Any suggestion ?

    public function execute($queue)

        $result = Yii::$app->myComponentr->myFunction();



[49] app\jobs\MyJob (attempt: 1, PID: 558) is finished with error: Error: Class 'Composer\MyClass\Myclass' 
not found in /app/application/conponents/MyComponent.php:53

Its probably a configuration issue of your console application (compare the yii executable with your web/index.php file (any missing includes?). If the console application is running on a different operating system it could also be a case error (Myclass vs MyClass).