Skip to content
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

Don't resolve the Deprecation error handler mode until a deprecation is triggered #30247

Merged
merged 1 commit into from Feb 16, 2019

Conversation

Projects
None yet
3 participants
@ossinkine
Copy link
Contributor

commented Feb 14, 2019

Q A
Branch? 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #30047
License MIT

If an error happens before .env.test is loaded the mode is set to 0 and cached so SYMFONY_DEPRECATIONS_HELPER is not read from .env.test.

@ossinkine ossinkine changed the base branch from master to 3.4 Feb 14, 2019

@nicolas-grekas nicolas-grekas added this to the 3.4 milestone Feb 14, 2019

@nicolas-grekas
Copy link
Member

left a comment

The issue has been introduced in #20334 btw
Please do not fix the fabbot issues :)

@@ -105,8 +105,7 @@ public static function register($mode = 0)
'remaining vendor' => array(),
);
$deprecationHandler = function ($type, $msg, $file, $line, $context = array()) use (&$deprecations, $getMode, $UtilPrefix, $inVendors) {
$mode = $getMode();
if ((E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) || DeprecationErrorHandler::MODE_DISABLED === $mode) {
if ((E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) || DeprecationErrorHandler::MODE_DISABLED === ($mode = $getMode())) {

This comment has been minimized.

Copy link
@ossinkine

ossinkine Feb 15, 2019

Author Contributor

($mode = $getMode()) or $mode = $getMode() as in original commit?

@nicolas-grekas nicolas-grekas force-pushed the ossinkine:issue-30047 branch from bb9abcf to 1090b8c Feb 16, 2019

@nicolas-grekas

This comment has been minimized.

Copy link
Member

commented Feb 16, 2019

Thank you @ossinkine.

@nicolas-grekas nicolas-grekas merged commit 1090b8c into symfony:3.4 Feb 16, 2019

0 of 3 checks passed

fabbot.io Some changes should be done to comply with our standards.
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

nicolas-grekas added a commit that referenced this pull request Feb 16, 2019

bug #30247 Don't resolve the Deprecation error handler mode until a d…
…eprecation is triggered (ossinkine)

This PR was merged into the 3.4 branch.

Discussion
----------

Don't resolve the Deprecation error handler mode until a deprecation is triggered

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30047
| License       | MIT

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->
If an error happens before `.env.test` is loaded the mode is set to 0 and cached so SYMFONY_DEPRECATIONS_HELPER is not read from `.env.test`.

Commits
-------

1090b8c Don't resolve the Deprecation error handler mode until a deprecation is triggered

This was referenced Mar 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.