Skip to content

Conversation

@nicolas-grekas
Copy link

WDYT?

@mnapoli
Copy link
Member

mnapoli commented May 5, 2022

Duplicates #35?

@nicolas-grekas
Copy link
Author

nicolas-grekas commented May 5, 2022

Quite close indeed. I'd just not add generics to the keys. Despite #35 being closed, I still think this would be a good idea. Locators scoped to some interface are quite common. It'd be great to hint autocompletion about them:
ContainerInterface<Foo> $container->get('bar')->... and be suggested with what Foo provides.

The fact that psalm/phpstan would complain about this shouldn't be a blocker to me. Eg they could stop complaining when the template type is of mixed.

ro0NL

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet