Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. The "AppMyInterface" 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.
  2.  
  3. # ...
  4. # autowire & autoconfigure: true
  5. # catalogs included
  6.  
  7. AppMyInterface: '@my.configured.implementation'
  8.  
  9. my.configured.implementation:
  10. class: AppMyInterfaceImplementation
  11.  
  12. $containerBuilder = new ContainerBuilder();
  13. $loader = new YamlFileLoader($containerBuilder, new FileLocator(__DIR__));
  14. $loader->load('services.yaml');
  15.  
  16. //Make `MyInterface::class` public so
  17. //$container->get(MyInterface::class) should work.
  18. $containerBuilder->getDefinition(MyInterface::class)->setPublic(true);
  19.  
  20. $containerBuilder->compile(true);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement