8000 [DependencyInjection] [Bugfix] EnvPlaceholderParameterBag::get() can't return UnitEnum by php-rock · Pull Request #47634 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[DependencyInjection] [Bugfix] EnvPlaceholderParameterBag::get() can't return UnitEnum #47634

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
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Bugfix: add \UnitEnum as a result of get() method
  • Loading branch information
jack.shpartko committed Sep 20, 2022
commit 40e60096d046f2e5a781414e81a7f15e78828e44
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class EnvPlaceholderParameterBag extends ParameterBag

private static int $counter = 0;

public function get(string $name): array|bool|string|int|float|null
public function get(string $name): array|bool|string|int|float|\UnitEnum|null
{
if (str_starts_with($name, 'env(') && str_ends_with($name, ')') && 'env()' !== $name) {
$env = substr($name, 4, -1);
Expand Down
0