Skip to content

Add the name of the env to RuntimeException #37538

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
Jul 31, 2020
Merged

Conversation

sFreezer
Copy link

@sFreezer sFreezer commented Jul 9, 2020

Q A
Branch? master for features
Bug fix? yes
New feature? no
Deprecations? no
Tickets  
License MIT
Doc PR

if you have the name of the env in the exception message it is much easier to find the error

from -> symfony/dependency-injection#20

@@ -79,7 +79,7 @@ public function getEnv(string $prefix, string $name, \Closure $getEnv)
}

if (!isset($array[$key]) && !\array_key_exists($key, $array)) {
throw new EnvNotFoundException(sprintf('Key "%s" not found in %s (resolved from "%s").', $key, json_encode($array), $next));
throw new EnvNotFoundException(sprintf('Key "%s" not found in "%s" (resolved from "%s").', $key, json_encode($array), $next));
Copy link
Member

Choose a reason for hiding this comment

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

please revert his one, that's a false positive

Copy link
Author

Choose a reason for hiding this comment

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

@nicolas-grekas fabbot.io told me so, but okay

Copy link
Member

Choose a reason for hiding this comment

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

that's exactly what Nicolas said: it was a false positive of fabbot.io. The tool is not 100% perfect.

Copy link
Author

Choose a reason for hiding this comment

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

ok, revert is done

@nicolas-grekas nicolas-grekas added this to the next milestone Jul 9, 2020
@sFreezer
Copy link
Author

how do we move on with this? Is there anything else I need to do, or can you merge the pull request

@fabpot
Copy link
Member

fabpot commented Jul 31, 2020

Thank you @sFreezer.

@fabpot fabpot merged commit 281a752 into symfony:master Jul 31, 2020
@nicolas-grekas nicolas-grekas modified the milestones: next, 5.2 Oct 5, 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.

6 participants