Skip to content

Commit 63a303d

Browse files
minor symfony#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 symfony#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
2 parents fc9236d + 0b03631 commit 63a303d

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ public static function register($mode = 0)
223223
uasort($deprecations[$group], $cmp);
224224

225225
foreach ($deprecations[$group] as $msg => $notices) {
226-
echo "\n", rtrim($msg, '.'), ': ', $notices['count'], "x\n";
226+
echo "\n ", $notices['count'], 'x: ', $msg, "\n";
227227

228228
arsort($notices);
229229

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/default.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,20 @@ $foo->testNonLegacyBar();
6363
--EXPECTF--
6464
Unsilenced deprecation notices (3)
6565

66-
unsilenced foo deprecation: 2x
66+
2x: unsilenced foo deprecation
6767
2x in FooTestCase::testLegacyFoo
6868

69-
unsilenced bar deprecation: 1x
69+
1x: unsilenced bar deprecation
7070
1x in FooTestCase::testNonLegacyBar
7171

7272
Remaining deprecation notices (1)
7373

74-
silenced bar deprecation: 1x
74+
1x: silenced bar deprecation
7575
1x in FooTestCase::testNonLegacyBar
7676

7777
Legacy deprecation notices (1)
7878

7979
Other deprecation notices (1)
8080

81-
root deprecation: 1x
81+
1x: root deprecation
8282

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_non_vendor.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,20 @@ $foo->testNonLegacyBar();
5555
--EXPECTF--
5656
Unsilenced deprecation notices (3)
5757

58-
unsilenced foo deprecation: 2x
58+
2x: unsilenced foo deprecation
5959
2x in FooTestCase::testLegacyFoo
6060

61-
unsilenced bar deprecation: 1x
61+
1x: unsilenced bar deprecation
6262
1x in FooTestCase::testNonLegacyBar
6363

6464
Remaining deprecation notices (1)
6565

66-
silenced bar deprecation: 1x
66+
1x: silenced bar deprecation
6767
1x in FooTestCase::testNonLegacyBar
6868

6969
Legacy deprecation notices (1)
7070

7171
Other deprecation notices (1)
7272

73-
root deprecation: 1x
73+
1x: root deprecation
7474

0 commit comments

Comments
 (0)