-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] Get KERNEL_CLASS through $_ENV too for KernelTestCase #24113
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
KERNEL_DIR also should be updated
@@ -106,16 +106,17 @@ private static function getPhpUnitCliConfigArgument() | |||
*/ | |||
protected static function getKernelClass() | |||
{ | |||
if (isset($_SERVER['KERNEL_CLASS'])) { | |||
if (!class_exists($class = $_SERVER['KERNEL_CLASS'])) { | |||
if (isset($_SERVER['KERNEL_CLASS']) || isset($_ENV['KERNEL_CLASS'])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be fixed in 2.7.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed changes regarding to KERNEL_DIR
var only, so KERNEL_CLASS
was introduced in 3.3
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #24115 for 2.7
8d42684
to
73cdb68
Compare
…nelTestCase (yceruto) This PR was merged into the 2.7 branch. Discussion ---------- [FrameworkBundle] Get KERNEL_DIR through $_ENV too for KernelTestCase | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - See #24113 Commits ------- cf11fb9 Get KERNEL_DIR through $_ENV too for KernelTestCase
Thank you @yceruto. |
…ernelTestCase (yceruto) This PR was merged into the 3.3 branch. Discussion ---------- [FrameworkBundle] Get KERNEL_CLASS through $_ENV too for KernelTestCase | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | https://github.com/symfony/recipes/pull/170/files#diff-793b024840ee04ebdff5e04c2cd44f8cR12 | License | MIT | Doc PR | - I guess the check could be simplied in `master` with php7+ /cc @nicolas-grekas Commits ------- 73cdb68 Get KERNEL_CLASS through $_ENV too
I guess the check could be simplied in
master
with php7+/cc @nicolas-grekas