We have created the custom module and uploaded to Magento Marketplace and Installation & Varnish Test has been failed due to class does not exist.

If the class not exists, How the Code Sniffer passed?

enter image description here But the class is exists. Don't know why extension is failed.

enter image description here

We have a custom interface ConnectorCustomerRepositoryInterface, The Testing says the class does not exist.

The classes are below:

namespace ABCSolutions\Connector365\Api\Customer

interface ConnectorCustomerRepositoryInterface{

and the extended Class

namespace ABCSolutions\Connector365\Model\ResourceModel;

class CustomerRepository implements \ABCSolutions\Connector365\Api\Customer\ConnectorCustomerRepositoryInterface{

And the di.xml

<preference for="ABCSolutions\Connector365\Api\Customer\ConnectorCustomerRepositoryInterface" type="ABCSolutions\Connector365\Model\ResourceModel\CustomerRepository"/>

And webapi.xml file

<route url="/V1/connector/Customer_MultiCreate" method="POST">
<service class="ABCSolutions\Connector365\Api\Customer\ConnectorCustomerRepositoryInterface" method="Customer_MultiCreate"/>
 <resources ref="Magento_Customer::customer"/>

And Installed the Varnish in my local magento system and compiled everything working in my local system.

enter image description here

enter image description here

enter image description here

Any help on this?

  • 1
    the ideal situation would be to perform an install of the full code.. I appreciate it is not possible likely. The ideas that come to mind are module dependency here but that is very much a guess Dec 16, 2020 at 19:53
  • @Bojjaiah - Please shift you { on next line - I have this issue and with no idea it worked Dec 17, 2020 at 15:02
  • @NileshDubey I'm not understood, Please share what you exactly referring.
    – Bojjaiah
    Dec 17, 2020 at 15:10
  • ConnectorCustomerRepositoryInterface{ to ConnectorCustomerRepositoryInterface Dec 17, 2020 at 15:15
  • 1
    @Bojjaiah - Sorry and also see here namespace ABCSolutions\Connector365\Api\Customer there is ";" missing Dec 17, 2020 at 15:39

2 Answers 2

  1. Make sure that the module overriding the CustomerRepositoryInterface is enabled
  2. Make sure that after enabling the module, all DIs are compiled properly
  3. Make sure that the directory structure of the overriding class matches with the namespace declaration

While you are checking above 3 items, please update your question with the XML file that tells the base CustomerRepositoryInterface is overriden by your custom interface

  • Updated my thread please check.
    – Bojjaiah
    Nov 20, 2020 at 6:08
  • @Bojjaiah can you please also attach the error report? Nov 20, 2020 at 8:03
  • Updated my thread with report card. Please see
    – Bojjaiah
    Nov 20, 2020 at 8:55
  • @Bojjaiah does this method really exist both in your Interface and model? Customer_MultiCreate Nov 20, 2020 at 11:18
  • Yes, exists in both interfaces and webapi.xml file. Here the error is ConnectorCustomerRepositoryInterface class is not exists. But the class is exists and compiled without error.
    – Bojjaiah
    Nov 20, 2020 at 11:20

Finally, got the solution. Everything was fine except my composer. In the composer the Case sensitivity is missed of Package and Module Name from PSR-4 section. Now the extension was passed and under marketing review soon will avail in Magento Marketplace. Thanks to #MagentoTeam on the help.

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.