Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive with Symfony\Component\DependencyInjection\ContainerBuilder::has #79

Open
emodric opened this issue Apr 24, 2020 · 1 comment

Comments

@emodric
Copy link
Contributor

emodric commented Apr 24, 2020

I have around 10 compiler passes in my code base.

I have NOT configured the path to container XML as I am not interested in testing for existing/non-existing services.

However, somehow, one and only one of my compiler passes fails with the message:

Call to method Symfony\Component\DependencyInjection\ContainerBuilder::has()
with 'fos_http_cache.cache_manager' will always evaluate to false.

The code in question is fairly standard:

if (!$container->has('fos_http_cache.cache_manager')) {
    return;
}

Every other compiler pass uses the same pattern and does not fail.

Why?

Thanks!

@MaxE17677
Copy link

Same here:

Call to method Symfony\Component\DependencyInjection\ContainerBuilder::has() with 'sonata.doctrine…' will always evaluate to false.

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

No branches or pull requests

2 participants