Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[DependencyInjection] Ignore argument type check in CheckTypeDeclarationsPass if it's a Definition with a factory#44879
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…ionsPass if it's a Definition with a factory
45f1e38 tob9095e6Comparechalasr commentedDec 31, 2021
What about using the factory return type when it has one? |
fancyweb commentedDec 31, 2021
Sure, but that would be a feature isn'it? Because right now, it relies only on the definition class and either it's good or not. Fall backing on the return type is a new behavior. |
nicolas-grekas commentedDec 31, 2021
The class is supposed to be used for that purpose. Can't we fix the class of the definition instead? |
fancyweb commentedDec 31, 2021 via email
I don’t think so because we are talking aboutAbstractAdapter::createConnection from the Cache component which can returndifferent values depending of the passed dsn. The factory class should beset to a sensible value but it can’t always be the case I guess. …On Fri 31 Dec 2021 at 17:29, Nicolas Grekas ***@***.***> wrote: The class is supposed to be used for that purpose. Can't we fix the class of the definition instead? — Reply to this email directly, view it on GitHub <#44879 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AA35DB56HNRQVAWGYFZX733UTXK6DANCNFSM5LBN37MA> . You are receiving this because you authored the thread.Message ID: ***@***.***> |
chalasr commentedJan 4, 2022
These various connections instances could probably be wrapped in a core domain object. |
chalasr left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
👍 as-is for 4.4
fabpot commentedJan 9, 2022
Thank you@fancyweb. |
When a definition uses a factory, we don't know what it returns.