Skip to content

Commit 9f4f889

Browse files
authored
Merge pull request #15 from nanasess/improve/php8.1RC3
PHP8.1.0RC3 Support
2 parents 24d1814 + 10e0809 commit 9f4f889

File tree

14 files changed

+34
-14
lines changed

14 files changed

+34
-14
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
},
2222
"require": {
2323
"php": ">=5.3.3",
24-
"phpunit/php-file-iterator": "~1.4",
24+
"php5friends/php-file-iterator14": "~1.4.6",
2525
"phpunit/php-text-template": "~1.2",
2626
"phpunit/php-code-coverage": "~2.1",
2727
"phpunit/php-timer": "^1.0.6",
@@ -32,13 +32,13 @@
3232
"sebastian/diff": "~1.2",
3333
"sebastian/environment": "~1.3",
3434
"sebastian/exporter": "~1.2",
35-
"sebastian/global-state": "~1.0",
3635
"sebastian/version": "~1.0",
3736
"ext-dom": "*",
3837
"ext-json": "*",
3938
"ext-pcre": "*",
4039
"ext-reflection": "*",
41-
"ext-spl": "*"
40+
"ext-spl": "*",
41+
"php5friends/global-state11": "~1.1.2"
4242
},
4343
"config": {
4444
"platform": {

src/Extensions/PhptTestCase.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ public function __construct($filename)
7676
*
7777
* @return int
7878
*/
79+
#[\ReturnTypeWillChange]
7980
public function count()
8081
{
8182
return 1;

src/Extensions/TestDecorator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public function basicRun(PHPUnit_Framework_TestResult $result)
6363
*
6464
* @return int
6565
*/
66+
#[\ReturnTypeWillChange]
6667
public function count()
6768
{
6869
return count($this->test);

src/Framework/Constraint.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ protected function matches($other)
8181
*
8282
* @since Method available since Release 3.4.0
8383
*/
84+
#[\ReturnTypeWillChange]
8485
public function count()
8586
{
8687
return 1;

src/Framework/TestCase.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ public function toString()
304304
*
305305
* @return int
306306
*/
307+
#[\ReturnTypeWillChange]
307308
public function count()
308309
{
309310
return 1;

src/Framework/TestResult.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,7 @@ public function run(PHPUnit_Framework_Test $test)
738738
*
739739
* @return int
740740
*/
741+
#[\ReturnTypeWillChange]
741742
public function count()
742743
{
743744
return $this->runTests;

src/Framework/TestSuite.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,7 @@ public function addTestFiles($filenames)
392392
*
393393
* @return int
394394
*/
395+
#[\ReturnTypeWillChange]
395396
public function count($preferCache = false)
396397
{
397398
if ($preferCache && $this->cachedNumTests != null) {
@@ -968,6 +969,7 @@ public function setBackupStaticAttributes($backupStaticAttributes)
968969
*
969970
* @since Method available since Release 3.1.0
970971
*/
972+
#[\ReturnTypeWillChange]
971973
public function getIterator()
972974
{
973975
$iterator = new PHPUnit_Util_TestSuiteIterator($this);

src/Runner/Filter/Group.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ function ($test) {
4444
/**
4545
* @return bool
4646
*/
47+
#[\ReturnTypeWillChange]
4748
public function accept()
4849
{
4950
$test = $this->getInnerIterator()->current();

src/Runner/Filter/Test.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ protected function setFilter($filter)
8888
/**
8989
* @return bool
9090
*/
91+
#[\ReturnTypeWillChange]
9192
public function accept()
9293
{
9394
$test = $this->getInnerIterator()->current();

src/Util/TestSuiteIterator.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public function __construct(PHPUnit_Framework_TestSuite $testSuite)
3636
/**
3737
* Rewinds the Iterator to the first element.
3838
*/
39+
#[\ReturnTypeWillChange]
3940
public function rewind()
4041
{
4142
$this->position = 0;
@@ -46,6 +47,7 @@ public function rewind()
4647
*
4748
* @return bool
4849
*/
50+
#[\ReturnTypeWillChange]
4951
public function valid()
5052
{
5153
return $this->position < count($this->tests);
@@ -56,6 +58,7 @@ public function valid()
5658
*
5759
* @return int
5860
*/
61+
#[\ReturnTypeWillChange]
5962
public function key()
6063
{
6164
return $this->position;
@@ -66,6 +69,7 @@ public function key()
6669
*
6770
* @return PHPUnit_Framework_Test
6871
*/
72+
#[\ReturnTypeWillChange]
6973
public function current()
7074
{
7175
return $this->valid() ? $this->tests[$this->position] : null;
@@ -74,6 +78,7 @@ public function current()
7478
/**
7579
* Moves forward to next element.
7680
*/
81+
#[\ReturnTypeWillChange]
7782
public function next()
7883
{
7984
$this->position++;
@@ -84,6 +89,7 @@ public function next()
8489
*
8590
* @return PHPUnit_Util_TestSuiteIterator
8691
*/
92+
#[\ReturnTypeWillChange]
8793
public function getChildren()
8894
{
8995
return new self(
@@ -96,6 +102,7 @@ public function getChildren()
96102
*
97103
* @return bool
98104
*/
105+
#[\ReturnTypeWillChange]
99106
public function hasChildren()
100107
{
101108
return $this->tests[$this->position] instanceof PHPUnit_Framework_TestSuite;

0 commit comments

Comments
 (0)