Skip to content
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

[DependencyInjection][CheckTypeDeclarationsPass] Always resolve parameters #37193

Merged
merged 1 commit into from Jun 11, 2020

Conversation

fancyweb
Copy link
Contributor

@fancyweb fancyweb commented Jun 10, 2020

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets #37166
License MIT
Doc PR -

Only array parameters are not inlined when dumped.

This is true only when the XML debug container is used, not on a live container that can contain unresolved parameters in the %my_param% form. That was my mistake. We have to resolve to get the parameter type.

$value = []; was just an improvement to avoid useless parameter resolve btw.

@fabpot
Copy link
Member

fabpot commented Jun 11, 2020

Thank you @fancyweb.

@fabpot fabpot merged commit b1f2a14 into symfony:4.4 Jun 11, 2020
@fancyweb fancyweb deleted the di-container-lint-param branch June 11, 2020 13:00
@alexander-schranz
Copy link
Contributor

@fancyweb Thank you also from my side 👍🏼

fabpot added a commit that referenced this pull request Jun 12, 2020
…resolved parameters pointing to environment variables (fancyweb)

This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection][CheckTypeDeclarationsPass] Handle unresolved parameters pointing to environment variables

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

Follow up to #37193

Unresolved parameters pointing to environment variables can be added to definitions after ResolveParameterPlaceHoldersPass execution. It is the case in the initial reported bug (RegisterListenersPass is executed after ResolveParameterPlaceHoldersPass). In this case, the parameter value is an env placeholder, so we need to try to resolve it.

Commits
-------

dac3c8f [DependencyInjection][CheckTypeDeclarationsPass] Handle unresolved parameters pointing to environment variables
This was referenced Jun 12, 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.

None yet

5 participants