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

ContainerInterface::get doesn't return a typehinted object if the second argument is supplied #916

Closed
Azenet opened this issue Apr 18, 2017 · 1 comment
Labels

Comments

@Azenet
Copy link

Azenet commented Apr 18, 2017

Hi,

As the title says, when the invalidBehavior argument is supplied to ContainerInterface::get, the returned object is not typehinted for the IDE as what it actually is.

$logger = $this->container->get('logger'); // this is a Logger object for the IDE
$logger = $this->container->get('logger', ContainerInterface::NULL_ON_INVALID_REFERENCE); // this is just an object for the IDE
Haehnchen added a commit that referenced this issue Apr 29, 2017
@Haehnchen
Copy link
Owner

done

Haehnchen added a commit that referenced this issue Apr 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants