Bumped by Community user
    Bumped by Community user
    Bumped by Community user
    Bumped by Community user
    Bumped by Community user
    Bumped by Community user
    Bumped by Community user
    Bumped by Community user
    Bumped by Community user
    Bumped by Community user
    Bumped by Community user
    Bumped by Community user
    Bumped by Community user
    Bumped by Community user
    Bumped by Community user
    Bumped by Community user
2 Improving the question
source | link

sorrySorry for the lengthy message. I just wanted to provide as much information as possible. I am writing a new module. I have a custom library that I need to load to use in my module. I have the library classes in vendor/easyask/easyask_search/lib/EasyAsk/Implvendor/easyask/easyask_search/lib/EasyAsk/Impl. The module is in app/code/EasyAsk/Searchapp/code/EasyAsk/Search.

When I try to invoke EasyAsk\Impl\RemoteFactoryEasyAsk\Impl\RemoteFactory, I get a class does not exist error. I know the lib files are not autoloaded as I don't see them referenced in vendor/composer/autoload_namespaces.php file. Can somebody tell me what I am doing wrong?

Can somebody tell me what I'm doing wrong?

Here is the composer.jsoncomposer.json in my module

Here is the composer.jsoncomposer.json from vendor/easyask/easyask_searchvendor/easyask/easyask_search directory

Part of controller class where I amI'm trying to inject RemoteFactory RemoteFactory

use Magento\Framework\Event\Manager;

use EasyAsk\Impl\RemoteFactory;

class Index extends \Magento\CatalogSearch\Controller\Result\Index { /** * @var QueryFactory */ private $_queryFactory;

use EasyAsk\Impl\RemoteFactory;

class Index extends \Magento\CatalogSearch\Controller\Result\Index
{
    /**
     * @var QueryFactory
     */
    private $_queryFactory;

    /**
     * Catalog Layer Resolver
     *
     * @var Resolver
     */
    private $layerResolver;

    protected $scopeConfig;

    protected $_eventManager;

    protected $_remoteFactory;

     /**
     * @param Context $context
     * @param Session $catalogSession
     * @param StoreManagerInterface $storeManager
     * @param QueryFactory $queryFactory
     * @param Resolver $layerResolver
     * @param ScopeConfigInterface $scopeConfig
     */
    public function __construct(
        Context $context,
        Session $catalogSession,
        StoreManagerInterface $storeManager,
        QueryFactory $queryFactory,
        Resolver $layerResolver,
        ScopeConfigInterface $scopeConfig,
        Manager $eventManager,
        RemoteFactory $remoteFactory
    ) {
        parent::__construct($context, $catalogSession, $storeManager, $queryFactory, $layerResolver);
        $this->_storeManager = $storeManager;
        $this->_catalogSession = $catalogSession;
        $this->_queryFactory = $queryFactory;
        $this->layerResolver = $layerResolver;
        $this->scopeConfig = $scopeConfig;
        $this->_eventManager = $eventManager;
        $this->_remoteFactory = $remoteFactory;
    }

Let me know if you need anymoreany more information.

sorry for the lengthy message. I just wanted to provide as much information as possible. I am writing a new module. I have a custom library that I need to load to use in my module. I have the library classes in vendor/easyask/easyask_search/lib/EasyAsk/Impl. The module is in app/code/EasyAsk/Search.

When I try to invoke EasyAsk\Impl\RemoteFactory, I get a class does not exist error. I know the lib files are not autoloaded as I don't see them referenced in vendor/composer/autoload_namespaces.php file. Can somebody tell me what I am doing wrong?

Here is the composer.json in my module

Here is the composer.json from vendor/easyask/easyask_search directory

Part of controller class where I am trying to inject RemoteFactory

use Magento\Framework\Event\Manager;

use EasyAsk\Impl\RemoteFactory;

class Index extends \Magento\CatalogSearch\Controller\Result\Index { /** * @var QueryFactory */ private $_queryFactory;

/**
 * Catalog Layer Resolver
 *
 * @var Resolver
 */
private $layerResolver;

protected $scopeConfig;

protected $_eventManager;

protected $_remoteFactory;

 /**
 * @param Context $context
 * @param Session $catalogSession
 * @param StoreManagerInterface $storeManager
 * @param QueryFactory $queryFactory
 * @param Resolver $layerResolver
 * @param ScopeConfigInterface $scopeConfig
 */
public function __construct(
    Context $context,
    Session $catalogSession,
    StoreManagerInterface $storeManager,
    QueryFactory $queryFactory,
    Resolver $layerResolver,
    ScopeConfigInterface $scopeConfig,
    Manager $eventManager,
    RemoteFactory $remoteFactory
) {
    parent::__construct($context, $catalogSession, $storeManager, $queryFactory, $layerResolver);
    $this->_storeManager = $storeManager;
    $this->_catalogSession = $catalogSession;
    $this->_queryFactory = $queryFactory;
    $this->layerResolver = $layerResolver;
    $this->scopeConfig = $scopeConfig;
    $this->_eventManager = $eventManager;
    $this->_remoteFactory = $remoteFactory;
}

Let me know if you need anymore information.

Sorry for the lengthy message. I just wanted to provide as much information as possible. I am writing a new module. I have a custom library that I need to load to use in my module. I have the library classes in vendor/easyask/easyask_search/lib/EasyAsk/Impl. The module is in app/code/EasyAsk/Search.

When I try to invoke EasyAsk\Impl\RemoteFactory, I get a class does not exist error. I know the lib files are not autoloaded as I don't see them referenced in vendor/composer/autoload_namespaces.php file.

Can somebody tell me what I'm doing wrong?

Here is the composer.json in my module

Here is the composer.json from vendor/easyask/easyask_search directory

Part of controller class where I'm trying to inject RemoteFactory

use Magento\Framework\Event\Manager;
use EasyAsk\Impl\RemoteFactory;

class Index extends \Magento\CatalogSearch\Controller\Result\Index
{
    /**
     * @var QueryFactory
     */
    private $_queryFactory;

    /**
     * Catalog Layer Resolver
     *
     * @var Resolver
     */
    private $layerResolver;

    protected $scopeConfig;

    protected $_eventManager;

    protected $_remoteFactory;

     /**
     * @param Context $context
     * @param Session $catalogSession
     * @param StoreManagerInterface $storeManager
     * @param QueryFactory $queryFactory
     * @param Resolver $layerResolver
     * @param ScopeConfigInterface $scopeConfig
     */
    public function __construct(
        Context $context,
        Session $catalogSession,
        StoreManagerInterface $storeManager,
        QueryFactory $queryFactory,
        Resolver $layerResolver,
        ScopeConfigInterface $scopeConfig,
        Manager $eventManager,
        RemoteFactory $remoteFactory
    ) {
        parent::__construct($context, $catalogSession, $storeManager, $queryFactory, $layerResolver);
        $this->_storeManager = $storeManager;
        $this->_catalogSession = $catalogSession;
        $this->_queryFactory = $queryFactory;
        $this->layerResolver = $layerResolver;
        $this->scopeConfig = $scopeConfig;
        $this->_eventManager = $eventManager;
        $this->_remoteFactory = $remoteFactory;
    }

Let me know if you need any more information.

    Bumped by Community user
    Bumped by Community user
    Bumped by Community user
    Bumped by Community user
    Bumped by Community user
    Bumped by Community user
    Bumped by Community user
    Bumped by Community user