Symfony 4.4 The "datatable" service or alias has been removed or inlined when the container was compiled

224 Views Asked by At

I am new in Symfony and I have migrated Symfony from 3 to 4. I got this error in this external service:

The "datatable" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.

I am using waldo/datatable-bundle.

Output of bin/console debug:container datatable command is :

---------------- -------------------------------------- 
  Option           Value                                 
 ---------------- -------------------------------------- 
  Service ID       datatable                             
  Class            Waldo\DatatableBundle\Util\Datatable  
  Tags             -                                     
  Public           no                                    
  Synthetic        no                                    
  Lazy             no                                    
  Shared           no                                    
  Abstract         no                                    
  Autowired        no                                    
  Autoconfigured   no                                    
 ---------------- -------------------------------------- 

When I put this into service.yml

    Waldo\DatatableBundle\WaldoDatatableBundle:
    alias: datatable
    public: true

I got this error - The service "Waldo\DatatableBundle\WaldoDatatableBundle" has a dependency on a non-existent service "templating".

Can someone help me?

0

There are 0 best solutions below