diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index efdad92..23ada41 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -1,5 +1,7 @@ + (c) SpacePossum + Dariusz Rumiński -This source file is subject to the MIT license that is bundled -with this source code in the file LICENSE. -EOF; + This source file is subject to the MIT license that is bundled + with this source code in the file LICENSE. + EOF; $finder = Finder::create() ->exclude('tests/Fixtures') @@ -32,9 +34,10 @@ return (new Config()) ->setRiskyAllowed(true) ->setRules([ + '@auto' => true, + '@auto:risky' => true, '@PhpCsFixer' => true, '@PhpCsFixer:risky' => true, - '@PHPUnit60Migration:risky' => true, 'header_comment' => ['header' => $header], ]) ->setFinder($finder) diff --git a/dev-tools/composer.json b/dev-tools/composer.json index ce71027..bb2c7a8 100644 --- a/dev-tools/composer.json +++ b/dev-tools/composer.json @@ -1,12 +1,12 @@ { "require": { - "php": "^8.1" + "php": "^8.5" }, "require-dev": { - "ergebnis/composer-normalize": "*", - "maglnet/composer-require-checker": "^3.8", + "ergebnis/composer-normalize": "^2.50", + "maglnet/composer-require-checker": "^4.21", "mi-schi/phpmd-extension": "^4.3", - "php-cs-fixer/shim": "^3.68.5", + "php-cs-fixer/shim": "^3.94.2", "phpmd/phpmd": "^2.15" }, "config": { diff --git a/src/Constraint/XmlMatchesXsd.php b/src/Constraint/XmlMatchesXsd.php index ecb18f2..5cafd12 100644 --- a/src/Constraint/XmlMatchesXsd.php +++ b/src/Constraint/XmlMatchesXsd.php @@ -1,5 +1,7 @@ level) { diff --git a/tests/Constraint/XmlMatchesXsdTest.php b/tests/Constraint/XmlMatchesXsdTest.php index 1128291..3935c39 100644 --- a/tests/Constraint/XmlMatchesXsdTest.php +++ b/tests/Constraint/XmlMatchesXsdTest.php @@ -1,5 +1,7 @@ getXSD()); $sampleFile = $this->getAssetsDir().'xliff_sample.xml'; @@ -42,14 +44,14 @@ public function testAssertXMLMatchesXSD() self::assertTrue($constraint->evaluate($content, '', true)); } - public function testXMLValidConstraintBasics() + public function testXMLValidConstraintBasics(): void { $constraint = new XmlMatchesXsd(''); self::assertSame(1, $constraint->count()); self::assertSame('matches XSD', $constraint->toString()); } - public function testXMLValidConstraintFalse() + public function testXMLValidConstraintFalse(): void { $this->expectException( 'PHPUnit\Framework\ExpectationFailedException' @@ -62,7 +64,7 @@ public function testXMLValidConstraintFalse() $constraint->evaluate(false); } - public function testXMLValidConstraintInt() + public function testXMLValidConstraintInt(): void { $this->expectException( 'PHPUnit\Framework\ExpectationFailedException' @@ -75,7 +77,7 @@ public function testXMLValidConstraintInt() $constraint->evaluate(1); } - public function testXMLValidConstraintInvalidXML() + public function testXMLValidConstraintInvalidXML(): void { $this->expectException( 'PHPUnit\Framework\ExpectationFailedException' @@ -88,7 +90,7 @@ public function testXMLValidConstraintInvalidXML() $constraint->evaluate(''); } - public function testXMLValidConstraintNotMatchingXML() + public function testXMLValidConstraintNotMatchingXML(): void { $this->expectException( 'PHPUnit\Framework\ExpectationFailedException' @@ -101,7 +103,7 @@ public function testXMLValidConstraintNotMatchingXML() $constraint->evaluate(''); } - public function testXMLValidConstraintNull() + public function testXMLValidConstraintNull(): void { $this->expectException( 'PHPUnit\Framework\ExpectationFailedException' @@ -114,7 +116,7 @@ public function testXMLValidConstraintNull() $constraint->evaluate(null); } - public function testXMLValidConstraintObject() + public function testXMLValidConstraintObject(): void { $this->expectException( 'PHPUnit\Framework\ExpectationFailedException' @@ -146,10 +148,10 @@ private function getAssetsDir() /** * @param string $pattern */ - private function expectExceptionMessageRegex($pattern) + private function expectExceptionMessageRegex($pattern): void { if (method_exists($this, 'expectExceptionMessageRegExp')) { - $this->expectExceptionMessageRegExp($pattern); + $this->expectExceptionMessageMatches($pattern); } elseif (method_exists($this, 'expectExceptionMessageMatches')) { $this->expectExceptionMessageMatches($pattern); } elseif (method_exists($this, 'expectDeprecationMessageMatches')) {