Skip to content
Advertisement

Prestashop Repository not found

Good morning.

i have a problem using the new Symfony architecture. i created a modern controller where routing is working perfect. now i want to search products with ProductRepository.

MyModule/src/Repository/ProductRepository

JavaScript

}

MyModule/config/services.yml

JavaScript

MyController

JavaScript

Now i get the following error: “Attempted to load class “ProductRepository” from namespace “PrestaShopModuleMyModuleRepository”. Did you forget a “use” statement for another namespace?”

What im missing there? Thx for your time and help.

update – Stacktrace:

JavaScript

Advertisement

Answer

It’s look like you didn’t create composer.json file with predefined namespaces.

Here example:

JavaScript

OR if you want with Prestashop right way

JavaScript

Then run composer install and add to your YourModuleName.php file require_once.

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement