8000 [DI] Support PHP 8.1 enums when dumping the container · Issue #40233 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[DI] Support PHP 8.1 enums when dumping the container #40233

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

Closed
stof opened this issue Feb 18, 2021 · 0 comments · Fixed by #40857
Closed

[DI] Support PHP 8.1 enums when dumping the container #40233

stof opened this issue Feb 18, 2021 · 0 comments · Fixed by #40857
Labels
DependencyInjection Feature Help wanted Issues and PRs which are looking for volunteers to complete them.

Comments

@stof
Copy link
Member
stof commented Feb 18, 2021

To support PHP 8.1 enums, we need to be able to use them in arguments in the DI component. For that, the dumper needs to be able to dump such values (which will require a special dumping logic to dump them as \My\Enum::CASE in the generated code)

@nicolas-grekas nicolas-grekas added the Help wanted Issues and PRs which are looking for volunteers to complete them. label Feb 18, 2021
nicolas-grekas added a commit that referenced this issue Jun 23, 2021
…xandre-daubois)

This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Add support of PHP enumerations

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes (new PHP version compatibility)
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #40233
| License       | MIT
| Doc PR        | _(see below)_

Added support of enums using `!php/const` tag, as they work the same way.

Commits
-------

88c69c0 [DependencyInjection] Add support of PHP enumerations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DependencyInjection Feature Help wanted Issues and PRs which are looking for volunteers to complete them.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0