Cannot autowire (…) it references class "WSDLWSDLCreator" but no such service exists

I installed package composer require georgo/wsdl-creator.

The path to file I wanted to use is: vendor/georgo/wsdl-creator/src/WSDL/WSDLCreator.php

Inside this file it has namespace and class:

namespace WSDL;

class WSDLCreator

vendor/georgo/wsdl-creator/composer.josn has following code:

"autoload": {
    "psr-0": {
      "WSDL": "src/",

In my controller I used that class: use WSDLWSDLCreator;

Then I wanted to use it public function createWSDL(WSDLCreator $WSDLCreator){...}

Then exception happened:

Cannot autowire argument $WSDLCreator of
"AppControllerSOAPController::createWSDL()": it references class
"WSDLWSDLCreator" but no such service exists.

I tried to modify that composer.json with additional "WSDL" since there is "WSDL" folder after "src":

"WSDL": "src/WSDL"

After clearing the cache multiple times the same exception happened.

Please help.

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *