WhiteOctoberTCPDFBundle icon indicating copy to clipboard operation
WhiteOctoberTCPDFBundle copied to clipboard

services.yaml

Open GothicBezimienny opened this issue 5 years ago • 1 comments

Can you tell me how shoudl be make services.yaml,

i put : "WhiteOctober\TCPDFBundle\Controller\TCPDFController: '@white_october.tcpdf'"
but its not enough becouse all the time I get

Cannot autowire service "App\Controller\BarCodeController": argument "$contener" of method "__construct()" references class "WhiteOctober\TCPDFBundle\WhiteOctoberTCPDFBundle" but no such service exists.

for ` protected $contener;

public function __construct(WhiteOctoberTCPDFBundle $contener)
{
    $this->contener = $contener;
}`

GothicBezimienny avatar Apr 03 '19 11:04 GothicBezimienny

Hi @GothicBezimienny. Your type annotation in the constructor is for WhiteOctoberTCPDFBundle, but your service references TCPDFController. If you update your constructor to look like this:

public function __construct(TCPDFController $contener)

then it should work.

Hope this helps.

sampart avatar Apr 08 '19 08:04 sampart