Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[DI] CheckTypeDeclarationsPass now checks if value is type of parameter type #35429

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

Merged
merged 1 commit into from
Jan 27, 2020

Conversation

pfazzi
Copy link
Contributor

@pfazzi pfazzi commented Jan 22, 2020

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets #35420
License MIT

@nicolas-grekas nicolas-grekas changed the base branch from master to 4.4 January 22, 2020 08:35
@nicolas-grekas nicolas-grekas added this to the 4.4 milestone Jan 22, 2020
@nicolas-grekas nicolas-grekas changed the title Issue 35420 [DI] CheckTypeDeclarationsPass now checks if value is type of parameter type Jan 22, 2020
@nicolas-grekas
Copy link
Member

Can you provide a reproducer for the issue? Maybe a test case?
There is already such a check when $value is a Definition.
Which triggers this: what's the type/class of $value in your case and more importantly how does it get there?

@pfazzi
Copy link
Contributor Author

pfazzi commented Jan 22, 2020

Yes i can. Let me anticipate you that error happens when $value is not a Definition but instance of Symfony\Component\ExpressionLanguage\Expression

@pfazzi
Copy link
Contributor Author

pfazzi commented Jan 22, 2020

@nicolas-grekas I have just integrated a test case

@pfazzi pfazzi requested a review from nicolas-grekas January 25, 2020 10:08
@nicolas-grekas nicolas-grekas force-pushed the issue_35420 branch 2 times, most recently from d64a00b to 89cfb0b Compare January 25, 2020 14:30
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I pushed some changes on your fork to make the code less error-prone)

@nicolas-grekas
Copy link
Member

Thank you @pfazzi.

nicolas-grekas added a commit that referenced this pull request Jan 27, 2020
… of parameter type (pfazzi)

This PR was merged into the 4.4 branch.

Discussion
----------

[DI]  CheckTypeDeclarationsPass now checks if value is type of parameter type

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | #35420
| License       | MIT

Commits
-------

0d4c0a6 [DI]  CheckTypeDeclarationsPass now checks if value is type of parameter type
@nicolas-grekas nicolas-grekas merged commit 0d4c0a6 into symfony:4.4 Jan 27, 2020
This was referenced Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants