Skip to content

Commit

Permalink
bug #31721 [PHPUnitBridge] Use a more appropriate group when deprecat…
Browse files Browse the repository at this point in the history
…ing mode (greg0ire)

This PR was merged into the 4.3 branch.

Discussion
----------

[PHPUnitBridge] Use a more appropriate group when deprecating mode

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

The deprecation comes from a vendor: the phpunit bridge itself, so it's
either the direct or the indirect group. And since only the end user is
supposed to set the group, then this is supposed to be a direct
deprecation.

Commits
-------

3a88f11 Use a more appropriate group when deprecating mode
  • Loading branch information
nicolas-grekas committed May 30, 2019
2 parents f9beee7 + 3a88f11 commit b33a61b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php
Expand Up @@ -228,9 +228,9 @@ private function getConfiguration()
return $this->configuration = Configuration::inWeakMode();
}
if (self::MODE_WEAK_VENDORS === $mode) {
++$this->deprecations['remaining selfCount'];
++$this->deprecations['remaining directCount'];
$msg = sprintf('Setting SYMFONY_DEPRECATIONS_HELPER to "%s" is deprecated in favor of "max[self]=0"', $mode);
$ref = &$this->deprecations['remaining self'][$msg]['count'];
$ref = &$this->deprecations['remaining direct'][$msg]['count'];
++$ref;
$mode = 'max[self]=0';
}
Expand Down

0 comments on commit b33a61b

Please sign in to comment.