File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change
1
+ UPGRADE FROM 1.x to 2.0
2
+ =======================
3
+
4
+ ### ` JohnKary\PHPUnit\Listener\SpeedTrapListener ` subclasses must implement scalar type hints
5
+
6
+ SpeedTrapListener was upgraded to support PHP 7 scalar type hints. Any
7
+ subclass will need to update the overridden function signature:
8
+
9
+ * Declare strict types at the top of your subclass: ` declare(strict_types=1); `
10
+ * Update method signatures:
11
+
12
+ | Old signature | New signature |
13
+ | -------- | --- |
14
+ | ` protected function isSlow($time, $slowThreshold) ` | ` protected function isSlow(int $time, int $slowThreshold) : bool `
15
+ | ` protected function addSlowTest(TestCase $test, $time) ` | ` protected function addSlowTest(TestCase $test, int $time) `
16
+ | ` protected function hasSlowTests() ` | ` protected function hasSlowTests() : bool `
17
+ | ` protected function toMilliseconds($time) ` | ` protected function toMilliseconds(float $time) : int `
18
+ | ` protected function makeLabel(TestCase $test) ` | ` protected function makeLabel(TestCase $test) : string `
19
+ | ` protected function getReportLength() ` | ` protected function getReportLength() : int `
20
+ | ` protected function getHiddenCount() ` | ` protected function getHiddenCount() : int `
21
+ | ` protected function getSlowThreshold(TestCase $test) ` | ` protected function getSlowThreshold(TestCase $test) : int `
You can’t perform that action at this time.
0 commit comments