Skip to content

Commit b1f1ea9

Browse files
authored
chore: drop PHP 5.x, PHPUnit 5.x and PHPUnit polyfill (#19)
1 parent 9742206 commit b1f1ea9

File tree

6 files changed

+9
-41
lines changed

6 files changed

+9
-41
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ jobs:
2828
fail-fast: false
2929
matrix:
3030
include:
31-
- php-version: '5.6'
32-
composer-flags: '--prefer-stable --prefer-lowest'
3331
- php-version: '7.0'
32+
composer-flags: '--prefer-stable --prefer-lowest'
3433
- php-version: '7.1'
3534
- php-version: '7.2'
3635
- php-version: '7.3'

composer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@
1313
}
1414
],
1515
"require": {
16-
"php": "^5.5 || ^7.0 || ^8.0",
16+
"php": "^7.0 || ^8.0",
1717
"ext-dom": "*",
1818
"ext-libxml": "*",
19-
"phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.0 || ^9.0 || ^10.0",
20-
"phpunitgoodpractices/polyfill": "^1.4"
19+
"phpunit/phpunit": "^6.5.14 || ^7.5.20 || ^8.0 || ^9.0 || ^10.0"
2120
},
2221
"autoload": {
2322
"psr-4": {

src/Constraint/XmlMatchesXsdForV5.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,11 @@ public function __construct($xsd)
5151
$this->xsd = $xsd;
5252
}
5353

54-
/**
55-
* {@inheritdoc}
56-
*/
5754
public function toString()
5855
{
5956
return 'matches XSD';
6057
}
6158

62-
/**
63-
* {@inheritdoc}
64-
*/
6559
protected function failureDescription($other)
6660
{
6761
if (\is_string($other)) {
@@ -79,15 +73,11 @@ protected function failureDescription($other)
7973
return $type.' '.$this->toString();
8074
}
8175

82-
/**
83-
* {@inheritdoc}
84-
*/
8576
protected function matches($other)
8677
{
8778
return \is_string($other)
8879
? $this->stringMatches($other)
89-
: false
90-
;
80+
: false;
9181
}
9282

9383
/**

src/Constraint/XmlMatchesXsdForV7.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,11 @@ public function __construct($xsd)
4747
$this->xsd = $xsd;
4848
}
4949

50-
/**
51-
* {@inheritdoc}
52-
*/
5350
public function toString(): string
5451
{
5552
return 'matches XSD';
5653
}
5754

58-
/**
59-
* {@inheritdoc}
60-
*/
6155
protected function failureDescription($other): string
6256
{
6357
if (\is_string($other)) {
@@ -75,15 +69,11 @@ protected function failureDescription($other): string
7569
return $type.' '.$this->toString();
7670
}
7771

78-
/**
79-
* {@inheritdoc}
80-
*/
8172
protected function matches($other): bool
8273
{
8374
return \is_string($other)
8475
? $this->stringMatches($other)
85-
: false
86-
;
76+
: false;
8777
}
8878

8979
/**

src/Constraint/XmlMatchesXsdForV8.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,11 @@ public function __construct($xsd)
4545
$this->xsd = $xsd;
4646
}
4747

48-
/**
49-
* {@inheritdoc}
50-
*/
5148
public function toString(): string
5249
{
5350
return 'matches XSD';
5451
}
5552

56-
/**
57-
* {@inheritdoc}
58-
*/
5953
protected function failureDescription($other): string
6054
{
6155
if (\is_string($other)) {
@@ -73,15 +67,11 @@ protected function failureDescription($other): string
7367
return $type.' '.$this->toString();
7468
}
7569

76-
/**
77-
* {@inheritdoc}
78-
*/
7970
protected function matches($other): bool
8071
{
8172
return \is_string($other)
8273
? $this->stringMatches($other)
83-
: false
84-
;
74+
: false;
8575
}
8676

8777
/**

tests/Constraint/XmlMatchesXsdTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ public function testAssertXMLMatchesXSD()
3939
}
4040

4141
$constraint->evaluate($content); // should not throw an exception
42-
static::assertTrue($constraint->evaluate($content, '', true));
42+
self::assertTrue($constraint->evaluate($content, '', true));
4343
}
4444

4545
public function testXMLValidConstraintBasics()
4646
{
4747
$constraint = new XmlMatchesXsd('');
48-
static::assertSame(1, $constraint->count());
49-
static::assertSame('matches XSD', $constraint->toString());
48+
self::assertSame(1, $constraint->count());
49+
self::assertSame('matches XSD', $constraint->toString());
5050
}
5151

5252
public function testXMLValidConstraintFalse()

0 commit comments

Comments
 (0)