Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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.
- # ...
- # autowire & autoconfigure: true
- # catalogs included
- AppMyInterface: '@my.configured.implementation'
- my.configured.implementation:
- class: AppMyInterfaceImplementation
- $containerBuilder = new ContainerBuilder();
- $loader = new YamlFileLoader($containerBuilder, new FileLocator(__DIR__));
- $loader->load('services.yaml');
- //Make `MyInterface::class` public so
- //$container->get(MyInterface::class) should work.
- $containerBuilder->getDefinition(MyInterface::class)->setPublic(true);
- $containerBuilder->compile(true);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement