Skip to content

[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

Merged
merged 1 commit into from
Sep 7, 2017

Conversation

yceruto
Copy link
Member

@yceruto yceruto commented Sep 6, 2017

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

Copy link
Member

@nicolas-grekas nicolas-grekas left a 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

@yceruto yceruto changed the title [Tests] Get KERNEL_CLASS through $_ENV too [Tests] Get KERNELCLASS/DIR through $_ENV too Sep 6, 2017
@yceruto yceruto changed the title [Tests] Get KERNELCLASS/DIR through $_ENV too [Tests] Get KERNEL_CLASS/DIR through $_ENV too Sep 6, 2017
@nicolas-grekas nicolas-grekas changed the title [Tests] Get KERNEL_CLASS/DIR through $_ENV too [FrameworkBundle] Get KERNEL_CLASS/DIR through $_ENV too for KernelTestCase Sep 6, 2017
@@ -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'])) {
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member Author

@yceruto yceruto Sep 6, 2017

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

@yceruto yceruto force-pushed the fix_get_kernel_class branch from 8d42684 to 73cdb68 Compare September 6, 2017 22:12
@yceruto yceruto changed the title [FrameworkBundle] Get KERNEL_CLASS/DIR through $_ENV too for KernelTestCase [FrameworkBundle] Get KERNEL_CLASS through $_ENV too for KernelTestCase Sep 6, 2017
@nicolas-grekas nicolas-grekas added this to the 3.3 milestone Sep 7, 2017
nicolas-grekas added a commit that referenced this pull request Sep 7, 2017
…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
@nicolas-grekas
Copy link
Member

Thank you @yceruto.

@nicolas-grekas nicolas-grekas merged commit 73cdb68 into symfony:3.3 Sep 7, 2017
nicolas-grekas added a commit that referenced this pull request Sep 7, 2017
…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
@yceruto yceruto deleted the fix_get_kernel_class branch September 7, 2017 10:55
@fabpot fabpot mentioned this pull request Sep 11, 2017
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.

4 participants