Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c16a35a

Browse filesBrowse files
committed
Always show all deprecations except legacy one
When using weak or weak vendors, you want your build to fail on some or all deprecations, but it is still nice to be able to see what you could fix without having to change modes.
1 parent f74bda5 commit c16a35a
Copy full SHA for c16a35a

File tree

6 files changed

+27
-2
lines changed
Filter options

6 files changed

+27
-2
lines changed

‎src/Symfony/Bridge/PhpUnit/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
CHANGELOG
22
=========
33

4+
4.1.0
5+
-----
6+
7+
* all deprecations but those from tests marked with `@group legacy` are always
8+
displayed, regardless of the mode.
9+
410
4.0.0
511
-----
612

‎src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,13 @@ public static function register($mode = 0)
165165

166166
exit(1);
167167
}
168-
if ('legacy' !== $group && !$isWeak) {
168+
if ('legacy' !== $group) {
169169
$ref = &$deprecations[$group][$msg]['count'];
170170
++$ref;
171171
$ref = &$deprecations[$group][$msg][$class.'::'.$method];
172172
++$ref;
173173
}
174-
} elseif (!$isWeak) {
174+
} else {
175175
$ref = &$deprecations[$group][$msg]['count'];
176176
++$ref;
177177
}

‎src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak.phpt

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak.phpt
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ $foo->testLegacyFoo();
3434
--EXPECTF--
3535
Unsilenced deprecation notices (1)
3636

37+
1x: unsilenced foo deprecation
38+
1x in FooTestCase::testLegacyFoo
39+
3740
Legacy deprecation notices (1)
3841

3942
Other deprecation notices (1)
4043

44+
1x: root deprecation

‎src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_eval_d_deprecation.phpt

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_eval_d_deprecation.phpt
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@ eval("@trigger_error('who knows where I come from?', E_USER_DEPRECATED);")
2121
--EXPECTF--
2222

2323
Other deprecation notices (1)
24+
25+
1x: who knows where I come from?

‎src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_phar_deprecation.phpt

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_phar_deprecation.phpt
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ include 'phar://deprecation.phar/deprecation.php';
2323
--EXPECTF--
2424

2525
Other deprecation notices (1)
26+
27+
1x: I come from… afar! :D

‎src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_vendor.phpt

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_vendor.phpt
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,19 @@ require __DIR__.'/fake_vendor/acme/lib/deprecation_riddled.php';
2222
--EXPECTF--
2323
Unsilenced deprecation notices (2)
2424

25+
1x: unsilenced foo deprecation
26+
1x in FooTestCase::testLegacyFoo
27+
28+
1x: unsilenced bar deprecation
29+
1x in FooTestCase::testNonLegacyBar
30+
2531
Remaining vendor deprecation notices (1)
2632

33+
1x: silenced bar deprecation
34+
1x in FooTestCase::testNonLegacyBar
35+
2736
Legacy deprecation notices (1)
2837

2938
Other deprecation notices (1)
39+
40+
1x: root deprecation

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.