Prestashop 8.1.1
PHP 8.1.29
Hi everyone,
I'm trying to create a module, but for a reason that i don't understand, the call to my service in my controller don't work. :
$sendCodeService = ServiceLocator::get('lebrun.lebruntwofa.sendcodeservice'); //C'EST ICI QUE CA MERDE
When i directly call the url https://prestashop.local/module/lebruntwofa/sendcode in the browser, i receive this error :
However, the service is called with the same name that the services.yam name :
services: _defaults: public: true lebrun.lebruntwofa.sendcodeservice: public: true class: Lebrun\Lebruntwofa\Services\SendcodeService
He's well declared :
/var/www/prestashop$ sudo php bin/console debug:container lebrun.lebruntwofa.sendcodeservice
Information for Service "lebrun.lebruntwofa.sendcodeservice"
============================================================
---------------- ---------------------------------------------
Option Value
---------------- ---------------------------------------------
Service ID lebrun.lebruntwofa.sendcodeservice
Class Lebrun\Lebruntwofa\Services\SendcodeService
Tags -
Public yes
Synthetic no
Lazy no
Shared yes
Abstract no
Autowired yes
Autoconfigured yes
---------------- ---------------------------------------------
I think the strucure files and names of files are good :
So i have no idea of what's wrong, i hope someone can help me 🙏
I share you the entire module for a better comprehension.
Thank you !