I have a 3rd party library and i put it inside lib/internal folder like this :


but when i call the function in my custom module helper/data.php , i got an error undefined function, here's the helper/data.php :

use RocketLabs\SellerCenterSdk\Core\Client;
use RocketLabs\SellerCenterSdk\Core\Configuration;
use RocketLabs\SellerCenterSdk\Core\Request\GenericRequest;
use RocketLabs\SellerCenterSdk\Core\Response\SuccessResponseInterface;

class Data extends \Magento\Framework\App\Helper\AbstractHelper

    public function test()
                $request = new GenericRequest(Client::POST,'GetCategoryTree',GenericRequest::V1, [], []);


1 Answer 1


According to https://packagist.org/packages/rocket-labs/sellercenter-sdk-php, this library 'dev' branch. But magento need at least 'alpha' version. So open composer.json from Magento2 root. edit following line:

"minimum-stability": "alpha",


"minimum-stability": "dev",

After that run following command

composer require rocket-labs/sellercenter-sdk-php

Now magento automatically load this library.

  • is there a way just copy the lib folder without using composer to install the lib?
    – simple guy
    Mar 9, 2017 at 6:00
  • This is the magento2 way to install 3rd party library.
    – Sohel Rana
    Mar 9, 2017 at 6:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.