Question

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:

<?php
namespace ABCSolutions\Connector365\Api\Customer

interface ConnectorCustomerRepositoryInterface{
..
}

and the extended Class

<?php
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>
 <resources ref="Magento_Customer::customer"/>
</resources>
</route>

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?

Was it helpful?

Solution 2

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.

OTHER TIPS

  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

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top