public class PhpConfigReferenceContributor extends PsiReferenceContributor {
@Override
public void registerReferenceProviders(PsiReferenceRegistrar psiReferenceRegistrar) {
psiReferenceRegistrar.registerReferenceProvider(PhpElementsUtil.methodWithFirstStringPattern(), new PhpStringLiteralExpressionReference(ParameterReference.class)
.addCall("\\Symfony\\Component\\DependencyInjection\\ContainerInterface", "hasParameter")
.addCall("\\Symfony\\Component\\DependencyInjection\\ContainerInterface", "getParameter")
);
psiReferenceRegistrar.registerReferenceProvider(PhpElementsUtil.methodWithFirstStringPattern(), new PhpStringLiteralExpressionReference(ServiceReference.class)
.addCall("\\Symfony\\Component\\DependencyInjection\\ContainerInterface", "has")
.addCall("\\Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller", "has")
);
psiReferenceRegistrar.registerReferenceProvider(PhpElementsUtil.methodWithFirstStringPattern(), new PhpStringLiteralExpressionReference(ServiceIndexedReference.class)
.addCall("\\Symfony\\Component\\DependencyInjection\\ContainerBuilder", "hasDefinition")
.addCall("\\Symfony\\Component\\DependencyInjection\\ContainerBuilder", "getDefinition")
.addCall("\\Symfony\\Component\\DependencyInjection\\ContainerBuilder", "setAlias", 1)
.addCall("\\Symfony\\Component\\DependencyInjection\\ContainerBuilder", "findDefinition")
);
psiReferenceRegistrar.registerReferenceProvider(PhpElementsUtil.methodWithFirstStringPattern(), new PhpStringLiteralExpressionReference(TagReference.class)
.addCall("\\Symfony\\Component\\DependencyInjection\\ContainerBuilder", "findTaggedServiceIds")
);
psiReferenceRegistrar.registerReferenceProvider(PhpElementsUtil.methodWithFirstStringPattern(), new PhpStringLiteralExpressionReference(EventDispatcherEventReference.class)
.addCall("\\Symfony\\Component\\EventDispatcher\\EventDispatcherInterface", "dispatch")
);
psiReferenceRegistrar.registerReferenceProvider(
PlatformPatterns.psiElement(StringLiteralExpression.class).withLanguage(PhpLanguage.INSTANCE),