File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ UPGRADE FROM 4.x to 5.0
2
+ =======================
3
+
4
+ This library's v4 core file ` JohnKary\PHPUnit\Listener\SpeedTrapListener ` has been
5
+ replaced by ` JohnKary\PHPUnit\Extension\SpeedTrap ` in v5. This change reflects
6
+ switching from PHPUnit's Listener system to its Hook system.
7
+
8
+ The ` SpeedTrap ` Extension must be registered differently in ` phpunit.xml ` :
9
+
10
+ ``` xml
11
+ <phpunit bootstrap =" vendor/autoload.php" >
12
+ ...
13
+ - <listeners >
14
+ - <listener class =" JohnKary\PHPUnit\Listener\SpeedTrapListener" />
15
+ - </listeners >
16
+ + <extensions >
17
+ + <extension class =" JohnKary\PHPUnit\Extension\SpeedTrap" >
18
+ + <arguments >
19
+ + <array >
20
+ + <element key =" slowThreshold" >
21
+ + <integer >500</integer >
22
+ + </element >
23
+ + <element key =" reportLength" >
24
+ + <integer >5</integer >
25
+ + </element >
26
+ + </array >
27
+ + </arguments >
28
+ + </extension >
29
+ + </extensions >
30
+ </phpunit >
31
+ ```
32
+
33
+ If you have extended the old ` JohnKary\PHPUnit\Listener\SpeedTrapListener ` , you
34
+ must extend the new ` JohnKary\PHPUnit\Extension\SpeedTrap ` . There are various
35
+ method name changes that may affect your custom subclass. See [ PR #83 ] ( https://github.com/johnkary/phpunit-speedtrap/pull/83 )
36
+ for how the new class has changed.
37
+
1
38
UPGRADE FROM 3.x to 4.0
2
39
=======================
3
40
You can’t perform that action at this time.
0 commit comments