Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged
fabpot merged 1 commit intosymfony:4.4fromfancyweb:di/ignore-factory-arg-lint
Jan 9, 2022

Conversation

@fancyweb
Copy link
Contributor

QA
Branch?4.4
Bug fix?yes
New feature?no
Deprecations?no
Tickets#35599,#44515
LicenseMIT
Doc PR-

When a definition uses a factory, we don't know what it returns.

lugosium reacted with thumbs up emoji
@fancywebfancywebforce-pushed thedi/ignore-factory-arg-lint branch from45f1e38 tob9095e6CompareDecember 31, 2021 15:45
@chalasr
Copy link
Member

What about using the factory return type when it has one?

@fancyweb
Copy link
ContributorAuthor

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
Copy link
Member

The class is supposed to be used for that purpose. Can't we fix the class of the definition instead?

@fancyweb
Copy link
ContributorAuthor

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
Copy link
Member

AbstractAdapter::createConnection from the Cache component which can return
different values depending of the passed dsn.

These various connections instances could probably be wrapped in a core domain object.

Copy link
Member

@chalasrchalasr left a 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
Copy link
Member

Thank you@fancyweb.

@fabpotfabpot merged commitc3674b4 intosymfony:4.4Jan 9, 2022
This was referencedJan 28, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@chalasrchalasrchalasr approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

5 participants

@fancyweb@chalasr@nicolas-grekas@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp