You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This approach will not get you a desired result, as PHP by default looks for undefined classes within the same namespace.
51
+
So instead of `Magento\Catalog\Model\ProductFactory` it will generate a class `spec\Acme\CustomMagentoModule\Model\ProductFactory`, that is definitely not a desired behavior.
52
+
53
+
In order to fix that make sure to specify fully qualified name in method signature or via `use` operator in the file header.
54
+
55
+
```php
56
+
<?php
57
+
58
+
namespace spec\Acme\CustomMagentoModule\Model;
59
+
60
+
use Magento\Catalog\Model\Product;
61
+
use Magento\Catalog\Model\ProductFactory; // This class will be automatically generated
0 commit comments