-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[PhpunitBridge] Read environment variable from superglobals #31954
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
[PhpunitBridge] Read environment variable from superglobals #31954
Conversation
2a955f8
to
afe721e
Compare
@nicolas-grekas should I do something similar here: symfony/src/Symfony/Bridge/PhpUnit/bootstrap.php Lines 38 to 40 in 1dce522
? |
Please resolve #31955 first |
I'd propose merging this as a bug fix on 4.3, which is the very of Dotenv that relates here, WDYT? |
It can be viewed as a bug if you use the bridge v4.3 and a recent version of dotenv so yeah, let's do this :) |
afe721e
to
0e832ca
Compare
0e832ca
to
e9971b5
Compare
Done. What about my question about the bootstrap file above? |
Let's update the bootstrap file too. |
e9971b5
to
936cb7d
Compare
I should really test before I push 😓 |
Apparently having the class not defined at all is a requirement in disabled mode, so let's do this. |
e7e3593
to
72cb77a
Compare
Is setting via |
72cb77a
to
1fe6eb2
Compare
IMHO, this is quite important to finish and release as if I understand correctly, for now there is no way to configure the SYMFONY_DEPRECATIONS_HELPER variable except by using a real env var (quite cumbersome and the documentation is very misleading on this subject if that's true). Or am I missing something? I'd be happy to give a hand to finish this if needed. |
Thanks for proposing your help @tgalopin . To me, this could very well be finished already, the only doubts I have are sum up in my previous comment. @nicolas-grekas what do you think the next steps are regarding this? |
1fe6eb2
to
8dea1ee
Compare
I do not reproduce the build failure locally (I use php 7.3). They are probably due to autoloading conflicts, as usual. |
8dea1ee
to
1bbfbc4
Compare
Can you have a look at the broken tests? |
be0ecf5
to
3945785
Compare
The Dotenv component has recently been switched to using superglobals instead of putenv(). Let us support both and give priority to superglobals. Closes symfony#31857
3945785
to
88cfcb5
Compare
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.
I reverted the changes on bootstrap.php
: Dotenv
always runs after the file is executed so that they were not needed. I also simplified the code: false
already does what we planned for null
to do.
Tests will pass once this is merged up to master.
Thank you @greg0ire. |
…s (greg0ire) This PR was merged into the 4.3 branch. Discussion ---------- [PhpunitBridge] Read environment variable from superglobals | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #31857 | License | MIT | Doc PR | n/a The Dotenv component has recently been switched to using superglobals instead of putenv(). Let us support both and give priority to superglobals. Commits ------- 88cfcb5 [PhpunitBridge] Read environment variable from superglobals
The Dotenv component has recently been switched to using superglobals
instead of putenv(). Let us support both and give priority to
superglobals.