minor #25752 Don't right trim the deprecation message (alexpott)
This PR was submitted for the 3.4 branch but it was squashed and merged into the 3.3 branch instead (closes #25752).
Discussion
----------
Don't right trim the deprecation message
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | maybe yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->
The PhpUnit bridge lists deprecation messages after a test. In order to do this it outputs the message but it right trims the message - removing any fullstops. This is unexpected. It does this to add the number of time the message appears but this is not really necessary because the number of the times a deprecation message is triggered and from where is added below.
Commits
-------
0b03631
Don't right trim the deprecation message
This commit is contained in:
commit
63a303d826
@ -223,7 +223,7 @@ class DeprecationErrorHandler
|
|||||||
uasort($deprecations[$group], $cmp);
|
uasort($deprecations[$group], $cmp);
|
||||||
|
|
||||||
foreach ($deprecations[$group] as $msg => $notices) {
|
foreach ($deprecations[$group] as $msg => $notices) {
|
||||||
echo "\n", rtrim($msg, '.'), ': ', $notices['count'], "x\n";
|
echo "\n ", $notices['count'], 'x: ', $msg, "\n";
|
||||||
|
|
||||||
arsort($notices);
|
arsort($notices);
|
||||||
|
|
||||||
|
@ -63,20 +63,20 @@ $foo->testNonLegacyBar();
|
|||||||
--EXPECTF--
|
--EXPECTF--
|
||||||
Unsilenced deprecation notices (3)
|
Unsilenced deprecation notices (3)
|
||||||
|
|
||||||
unsilenced foo deprecation: 2x
|
2x: unsilenced foo deprecation
|
||||||
2x in FooTestCase::testLegacyFoo
|
2x in FooTestCase::testLegacyFoo
|
||||||
|
|
||||||
unsilenced bar deprecation: 1x
|
1x: unsilenced bar deprecation
|
||||||
1x in FooTestCase::testNonLegacyBar
|
1x in FooTestCase::testNonLegacyBar
|
||||||
|
|
||||||
Remaining deprecation notices (1)
|
Remaining deprecation notices (1)
|
||||||
|
|
||||||
silenced bar deprecation: 1x
|
1x: silenced bar deprecation
|
||||||
1x in FooTestCase::testNonLegacyBar
|
1x in FooTestCase::testNonLegacyBar
|
||||||
|
|
||||||
Legacy deprecation notices (1)
|
Legacy deprecation notices (1)
|
||||||
|
|
||||||
Other deprecation notices (1)
|
Other deprecation notices (1)
|
||||||
|
|
||||||
root deprecation: 1x
|
1x: root deprecation
|
||||||
|
|
||||||
|
@ -55,20 +55,20 @@ $foo->testNonLegacyBar();
|
|||||||
--EXPECTF--
|
--EXPECTF--
|
||||||
Unsilenced deprecation notices (3)
|
Unsilenced deprecation notices (3)
|
||||||
|
|
||||||
unsilenced foo deprecation: 2x
|
2x: unsilenced foo deprecation
|
||||||
2x in FooTestCase::testLegacyFoo
|
2x in FooTestCase::testLegacyFoo
|
||||||
|
|
||||||
unsilenced bar deprecation: 1x
|
1x: unsilenced bar deprecation
|
||||||
1x in FooTestCase::testNonLegacyBar
|
1x in FooTestCase::testNonLegacyBar
|
||||||
|
|
||||||
Remaining deprecation notices (1)
|
Remaining deprecation notices (1)
|
||||||
|
|
||||||
silenced bar deprecation: 1x
|
1x: silenced bar deprecation
|
||||||
1x in FooTestCase::testNonLegacyBar
|
1x in FooTestCase::testNonLegacyBar
|
||||||
|
|
||||||
Legacy deprecation notices (1)
|
Legacy deprecation notices (1)
|
||||||
|
|
||||||
Other deprecation notices (1)
|
Other deprecation notices (1)
|
||||||
|
|
||||||
root deprecation: 1x
|
1x: root deprecation
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user