Skip to content

Circular dependency: NameSpaceCrmServiceAccount depends on NameSpaceCrmServiceMoreResults and vice versa

1 exception(s):

Exception #0 (LogicException): Circular dependency: XXXCrmServiceAccount depends on XXXCrmServiceMoreResults and vice versa.

Class: Account
use XXXCrmServiceMoreResults as MoreResultsService;
class Account
{
public function __construct(
MoreResultsService $moreResultsService

    )
    {
        $this->moreResultsService = $moreResultsService;
    }

Class MoreResults :
use XXXCrmServiceAccount as Account;

     public function __construct(Account  $account)

    {
        $this->account = $account;
    }

==> bin/magento c:c && c:f :: Not a solution