0

When i try to start command setup:di:compile i see this error:

enter image description here

Uncaught Error: Interface 'WebbyTroops\Subscription\Api\SubscriptionRepositoryInterface' not found in /var/www/html/hajery/app/code/Hajery/Subscription/Model/SubscriptionRepository.php:18 but and this is the file SubscriptionRepository.php:

<?php

namespace Magento\Setup\Module\Di\Code\Reader;

use Magento\Store\Model\StoreManagerInterface;
use WebbyTroops\Subscription\Model\ResourceModel\Subscription as SubscriptionResource;
use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
use Magento\Framework\Exception\CouldNotDeleteException;
use Magento\Framework\Exception\CouldNotSaveException;
use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Framework\Exception\ValidatorException;
use Magento\Framework\Exception\StateException;
use WebbyTroops\Subscription\Api\Data\SubscriptionInterface;
use WebbyTroops\Subscription\Api\SubscriptionRepositoryInterface;

/**
 * @class SubscriptionRepository
 */
class SubscriptionRepository implements SubscriptionRepositoryInterfaceEnter
{
    /**
     * @var SubscriptionResource
     */
    protected $resource;

    /**
     * @var SubscriptionFactory
     */
    protected $subscriptionFactory;

    /*
     * @var \WebbyTroops\Subscription\Model\ResourceModel\Subscription\CollectionFactory
     */
    protected $subscriptionCollectionFactory;

    /*
     * @var \WebbyTroops\Subscription\Api\Data\SubscriptionSearchResultsInterfaceFactory
     */
    protected $searchResultsFactory;

    /*
     * @var CollectionProcessorInterface
     */
    protected $collectionProcessor;

    /**
     * @param SubscriptionResource $resource
     * @param SubscriptionFactory $subscriptionFactory
     * @param \WebbyTroops\Subscription\Model\ResourceModel\Subscription\CollectionFactory $subscriptionCollectionFactory
     * @param \WebbyTroops\Subscription\Api\Data\SubscriptionSearchResultsInterfaceFactory $searchResultsFactorys
     * @param CollectionProcessorInterface $collectionProcessor
     */
    public function __construct(
        SubscriptionResource $resource,
        SubscriptionFactory $subscriptionFactory,
        \WebbyTroops\Subscription\Model\ResourceModel\Subscription\CollectionFactory $subscriptionCollectionFactory,
        \WebbyTroops\Subscription\Api\Data\SubscriptionSearchResultsInterfaceFactory $searchResultsFactory,
        CollectionProcessorInterface $collectionProcessor
    ) {
        $this->resource              = $resource;
        $this->subscriptionFactory   = $subscriptionFactory;
        $this->subscriptionCollectionFactory = $subscriptionCollectionFactory;
        $this->searchResultsFactory  = $searchResultsFactory;
        $this->collectionProcessor   = $collectionProcessor;
    }
}

I tried to search but i have not found anything abaout this issue. How can i do?

Thanks

1 Answer 1

0

Class name of the above file is wrong .On above question namespace is namespace Magento\Setup\Module\Di\Code\Reader; it should be WebbyTroops\Subscription\Model and it should exit at var/www/html/hajery/app/code/WebbyTroops/Subscription and di.xml should be updated based on above.

Your Answer

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

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