[DependencyInjection] Ignore argument type check in CheckTypeDeclarationsPass if it's a Definition with a factory#44879
Merged
Conversation
…ionsPass if it's a Definition with a factory
45f1e38 to
b9095e6
Compare
Member
|
What about using the factory return type when it has one? |
Contributor
Author
|
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. |
Member
|
The class is supposed to be used for that purpose. Can't we fix the class of the definition instead? |
Contributor
Author
|
I don’t think so because we are talking about
AbstractAdapter::createConnection from the Cache component which can return
different values depending of the passed dsn. The factory class should be
set 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:
***@***.***>
|
Member
These various connections instances could probably be wrapped in a core domain object. |
fabpot
approved these changes
Jan 9, 2022
Member
|
Thank you @fancyweb. |
This was referenced Jan 28, 2022
Merged
Merged
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a definition uses a factory, we don't know what it returns.