Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

services.yaml #56

Open
GothicBezimienny opened this issue Apr 3, 2019 · 1 comment
Open

services.yaml #56

GothicBezimienny opened this issue Apr 3, 2019 · 1 comment

Comments

@GothicBezimienny
Copy link

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;
}`
@sampart
Copy link
Owner

sampart commented Apr 8, 2019

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants