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

[FrameworkBundle][DependencyInjection] Skip removed ids in the lint container command and its associated pass #34935

Conversation

fancyweb
Copy link
Contributor

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

We remove the "removing" passes again and to avoid what #34502 fixed, we skip validating the "live" container removed ids in the pass (the "live" container is supposed to have the same definitions than the "debug container" one).

Logically, an errored service cannot pass the "live" container compilation without being removed. Consequently, it also skips the errored services that ended up being removed in the "live" container.

@nicolas-grekas nicolas-grekas force-pushed the fwb-di-container-lint-dont-check-removed-ids branch from 07cc424 to a0f581b Compare December 13, 2019 12:19
@nicolas-grekas
Copy link
Member

Thank you @fancyweb.

nicolas-grekas added a commit that referenced this pull request Dec 13, 2019
… the lint container command and its associated pass (fancyweb)

This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle][DependencyInjection] Skip removed ids in the lint container command and its associated pass

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

We remove the "removing" passes again and to avoid what #34502 fixed, we skip validating the "live" container removed ids in the pass (the "live" container is supposed to have the same definitions than the "debug container" one).

Logically, an errored service cannot pass the "live" container compilation without being removed. Consequently, it also skips the errored services that ended up being removed in the "live" container.

Commits
-------

a0f581b [FrameworkBundle][DependencyInjection] Skip removed ids in the lint container command and its associated pass
@nicolas-grekas nicolas-grekas merged commit a0f581b into symfony:4.4 Dec 13, 2019
@fancyweb fancyweb deleted the fwb-di-container-lint-dont-check-removed-ids branch December 13, 2019 12:21
This was referenced Dec 19, 2019
fabpot added a commit that referenced this pull request Jan 7, 2020
…. services (fancyweb)

This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle][ContainerLintCommand] Only skip .errored. services

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

This PR partially reverts #34935 that was a kind of a mistake. Skipping all removed ids cannot work because all private services are in the "removed" ids. So the command ends up not validating much.

To still fix the original issue #34858 we need to skip errored services. However, definition errors are not dumped / read (see #34928). So instead, even if it's bad, we can maybe rely on the name for this particular error since it's hardcoded 😕 At least it fixes this case in a simple way 😕

Commits
-------

d38cdc9 [FrameworkBundle][ContainerLintCommand] Only skip .errored. services
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

3 participants