Skip to content

Commit

Permalink
Merge pull request #48 from weierophinney/feature/php-8.1-support
Browse files Browse the repository at this point in the history
Provide PHP 8.1 support
  • Loading branch information
weierophinney authored Dec 2, 2021
2 parents c513b92 + 640e0d4 commit 6124b36
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 122 deletions.
5 changes: 5 additions & 0 deletions .laminas-ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"ignore_php_platform_requirements": {
"8.1": true
}
}
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@
}
},
"require": {
"php": "^7.4 || ~8.0.0",
"laminas/laminas-filter": "^2.9.1",
"php": "^7.4 || ~8.0.0 || ~8.1.0",
"laminas/laminas-filter": "^2.13",
"laminas/laminas-servicemanager": "^3.3.1",
"laminas/laminas-stdlib": "^3.0",
"laminas/laminas-validator": "^2.11",
"laminas/laminas-zendframework-bridge": "^1.0"
"laminas/laminas-validator": "^2.15"
},
"require-dev": {
"laminas/laminas-coding-standard": "~2.2.1",
"laminas/laminas-db": "^2.12",
"laminas/laminas-db": "^2.13.4",
"phpspec/prophecy": "^1.14",
"phpspec/prophecy-phpunit": "^2.0",
"phpunit/phpunit": "^9.4.2",
"phpunit/phpunit": "^9.5.5",
"psalm/plugin-phpunit": "^0.15.1",
"psr/http-message": "^1.0",
"vimeo/psalm": "^4.6"
Expand Down Expand Up @@ -65,7 +65,7 @@
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml",
"static-analysis": "psalm --shepherd --stats"
},
"replace": {
"zendframework/zend-inputfilter": "^2.10.1"
"conflict": {
"zendframework/zend-inputfilter": "*"
}
}
129 changes: 32 additions & 97 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 17 additions & 11 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" bootstrap="vendor/autoload.php" colors="true">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>
<testsuites>
<testsuite name="laminas-inputfilter Test Suite">
<directory>./test</directory>
</testsuite>
</testsuites>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
convertDeprecationsToExceptions="true"
colors="true">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>

<testsuites>
<testsuite name="laminas-inputfilter Test Suite">
<directory>./test</directory>
</testsuite>
</testsuites>
</phpunit>
6 changes: 0 additions & 6 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1547,10 +1547,4 @@
<code>addServiceManager</code>
</MissingReturnType>
</file>
<file src="vendor/laminas/laminas-servicemanager/src/ServiceManager.php">
<ParseError occurrences="2">
<code>=&gt;</code>
<code>fn</code>
</ParseError>
</file>
</files>
9 changes: 9 additions & 0 deletions psalm.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::with"/>
</errorLevel>
</InternalMethod>

<UndefinedClass>
<errorLevel type="suppress">
<referencedClass name="Zend\InputFilter\CollectionInputFilter" />
<referencedClass name="Zend\InputFilter\InputFilter" />
<referencedClass name="Zend\InputFilter\InputFilterPluginManager" />
<referencedClass name="Zend\InputFilter\OptionalInputFilter" />
</errorLevel>
</UndefinedClass>
</issueHandlers>

<plugins>
Expand Down
3 changes: 3 additions & 0 deletions src/BaseInputFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

use Laminas\Stdlib\ArrayUtils;
use Laminas\Stdlib\InitializableInterface;
// phpcs:ignore SlevomatCodingStandard.Namespaces.UnusedUses.UnusedUse
use ReturnTypeWillChange;
use Traversable;

use function array_diff;
Expand Down Expand Up @@ -62,6 +64,7 @@ public function init()
*
* @return int
*/
#[ReturnTypeWillChange]
public function count()
{
return count($this->inputs);
Expand Down

0 comments on commit 6124b36

Please sign in to comment.