docs icon indicating copy to clipboard operation
docs copied to clipboard

Extend symfony service override/decoration

Open Hlavtox opened this issue 2 years ago • 1 comments

Hi, I struggled for a good time with ClassNotFoundException when trying to override symfony service for the first time.

I was just requiring the one single src/service.php file in mymodule.php. The catch was that even for one file, you must be using composer.

Hlavtox avatar Nov 24 '21 11:11 Hlavtox

@Hlavtox Sorry I find this issue only now. Indeed your code needs to be autoloaded, and the autoload needs to be done before Symfony performs the replacement.

Maybe this is something we could insert in troubleshooting section? https://devdocs.prestashop.com/1.7/faq/

matks avatar Feb 22 '22 08:02 matks