0

Magento 2.4.2-p1

PHP 7.4

I've noticed that I get a fatal error allowed memory when I hit any Magento's rest API like

rest/default/V1/guest-carts/zg9WgsI6iTxvcA9YzPQnWqDNr7CLYVy2/estimate-shipping-methods

in the cart and checkout page, I disabled some modules and I saw there is a circular dependency in these 2 class

Exception #0 (LogicException): Circular dependency: Magento\Framework\Authorization depends on Magento\Catalog\Model\Product\Authorization and vice versa.

My question is, why could I have this error in these 2 Magento's classes?, they are part of the vendor and I didn't touch them

3
  • which modules did you disable?
    – smstl
    Nov 3, 2021 at 12:41
  • Modules that I created Nov 4, 2021 at 14:31
  • also, in the __construct of Magento\Catalog\Model\Product\Authorization.php this was the original public function __construct(AuthorizationInterface $authorization, ProductFactory $factory) { $this->authorization = $authorization; $this->productFactory = $factory; } I removes the AuthorizationInterface and it started to work public function __construct(ProductFactory $factory) { $this->productFactory = $factory; } Nov 4, 2021 at 14:32

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.