Skip to content

Commit 49972ea

Browse files
committed
Dropping PHP 7.3 support
1 parent 6c6a944 commit 49972ea

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

.php-cs-fixer.dist.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@
1111
return $config->setFinder(PhpCsFixer\Finder::create()
1212
->exclude('vendor')
1313
->in(__DIR__.'\src')
14-
->in(__DIR__.'\tests')
1514
);

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ You must make sure autoloading is correctly configured for all classes. This me
5252
The **assertValidPHPFile** and **assertValidPHPDirectory** asserts will test for the proper namespace in the file path (for PSR-0 autoloading and fully pathed PSR-4 autoloading), but you can turn off namespace testing with **skipNamespaceTesting** or exclude a specific namespace tests with **addSkipNamespace**.
5353

5454
## PHP Version
55-
While this library only supports PHP 7.3 and higher, you can create a project and point it to PHP 5.2 or higher. The default is to prefer PHP 7 code, but to prefer or only parse PHP 5, configure phpunit.xml(.dist) with
55+
While this library only supports PHP 7.4 and higher, you can create a project and point it to PHP 5.2 or higher. The default is to prefer PHP 7 code, but to prefer or only parse PHP 5, configure phpunit.xml(.dist) with
5656

5757
~~~xml
5858
<php>

src/PHPFUI/PHPUnitSyntaxCoverage/Extensions.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
class ClassFinder extends \PhpParser\NodeVisitorAbstract
1616
{
17-
private $classes = [];
17+
private array $classes = [];
1818

19-
private $currentNamespace = '';
19+
private string $currentNamespace = '';
2020

2121
public function enterNode(\PhpParser\Node $node) : void
2222
{
@@ -45,11 +45,11 @@ class Extensions extends \PHPUnit\Framework\TestCase implements \PHPUnit\Runner\
4545
{
4646
private static $parser = null;
4747

48-
private $skipDirectories = [];
48+
private array $skipDirectories = [];
4949

50-
private $skipNamespaces = [];
50+
private array $skipNamespaces = [];
5151

52-
private $skipNamespaceTest = false;
52+
private bool $skipNamespaceTest = false;
5353

5454
private $traverser;
5555

@@ -64,7 +64,7 @@ public static function setUpBeforeClass() : void
6464
protected function setUp() : void
6565
{
6666
$this->traverser = new \PhpParser\NodeTraverser();
67-
$this->classFinder = new ClassFinder();
67+
$this->classFinder = new \PHPFUI\PHPUnitSyntaxCoverage\ClassFinder();
6868
}
6969

7070
protected function tearDown() : void
@@ -88,7 +88,7 @@ public function assertValidPHP(string $code, string $message = '') : void
8888
}
8989
catch (\Throwable $e)
9090
{
91-
throw new Exception($message . "\n" . $e->getMessage());
91+
throw new \PHPFUI\PHPUnitSyntaxCoverage\Exception($message . "\n" . $e->getMessage());
9292
}
9393

9494
$this->assertNotEmpty($ast, 'Empty Abstract Syntax tree. ' . $message);
@@ -105,7 +105,7 @@ public function assertValidPHP(string $code, string $message = '') : void
105105
}
106106
catch (\Throwable $e)
107107
{
108-
throw new Exception($message . "\n" . $e->getMessage());
108+
throw new \PHPFUI\PHPUnitSyntaxCoverage\Exception($message . "\n" . $e->getMessage());
109109
}
110110
}
111111
}

0 commit comments

Comments
 (0)