Skip to content

Commit

Permalink
Update laminas-validator to 2.61.0
Browse files Browse the repository at this point in the history
2.61.0 has a number of deprecations. Tests adjusted to account for deprecations and those that cannot be dealt with without a BC break are base-lined

Signed-off-by: George Steel <[email protected]>
  • Loading branch information
gsteel committed Jul 12, 2024
1 parent 0ace206 commit f58f705
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 70 deletions.
108 changes: 54 additions & 54 deletions composer.lock

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

19 changes: 18 additions & 1 deletion psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.24.0@462c80e31c34e58cc4f750c656be3927e80e550e">
<files psalm-version="5.25.0@01a8eb06b9e9cc6cfb6a320bf9fb14331919d505">
<file src="src/ArrayInput.php">
<DeprecatedProperty>
<code><![CDATA[$this->value]]></code>
Expand Down Expand Up @@ -50,6 +50,13 @@
</UnusedPsalmSuppress>
</file>
<file src="src/CollectionInputFilter.php">
<DeprecatedInterface>
<code><![CDATA[$notEmptyValidator->getTranslator()]]></code>
</DeprecatedInterface>
<DeprecatedMethod>
<code><![CDATA[getOption]]></code>
<code><![CDATA[getTranslatorTextDomain]]></code>
</DeprecatedMethod>
<ImplementedParamTypeMismatch>
<code><![CDATA[$name]]></code>
<code><![CDATA[$name]]></code>
Expand Down Expand Up @@ -188,6 +195,10 @@
</MoreSpecificImplementedParamType>
</file>
<file src="src/Input.php">
<DeprecatedMethod>
<code><![CDATA[getOption]]></code>
<code><![CDATA[getTranslatorTextDomain]]></code>
</DeprecatedMethod>
<DocblockTypeContradiction>
<code><![CDATA[is_array($this->errorMessage)]]></code>
</DocblockTypeContradiction>
Expand Down Expand Up @@ -543,6 +554,9 @@
</PossiblyUnusedMethod>
</file>
<file src="test/FactoryTest.php">
<DeprecatedMethod>
<code><![CDATA[getMessageTemplates]]></code>
</DeprecatedMethod>
<PossiblyNullReference>
<code><![CDATA[getPluginManager]]></code>
<code><![CDATA[getPluginManager]]></code>
Expand Down Expand Up @@ -673,6 +687,9 @@
</PossiblyInvalidArgument>
</file>
<file src="test/InputTest.php">
<DeprecatedInterface>
<code><![CDATA[$translator]]></code>
</DeprecatedInterface>
<InvalidReturnStatement>
<code><![CDATA[[
// Description => [$value]
Expand Down
22 changes: 11 additions & 11 deletions test/CollectionInputFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
use Laminas\InputFilter\Input;
use Laminas\InputFilter\InputFilter;
use Laminas\InputFilter\InputFilterInterface;
use Laminas\Validator\Between;
use Laminas\Validator\Digits;
use Laminas\Validator\NotEmpty;
use Laminas\Validator\NumberComparison;
use LaminasTest\InputFilter\TestAsset\InputFilterInterfaceStub;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
Expand Down Expand Up @@ -620,7 +620,7 @@ public function testDuplicatedErrorMessages(): void
'required' => false,
'validators' => [
[
'name' => Between::class,
'name' => NumberComparison::class,
'options' => [
'min' => 50,
'max' => 100,
Expand All @@ -633,7 +633,7 @@ public function testDuplicatedErrorMessages(): void
'required' => false,
'validators' => [
[
'name' => Between::class,
'name' => NumberComparison::class,
'options' => [
'min' => 50,
'max' => 100,
Expand Down Expand Up @@ -690,26 +690,26 @@ public function testDuplicatedErrorMessages(): void
'test_field' => [
[
'test_field1' => [
'notBetween' => '-20 is incorrect',
NumberComparison::ERROR_NOT_GREATER_INCLUSIVE => '-20 is incorrect',
],
'price' => [
'notBetween' => '20 is incorrect',
NumberComparison::ERROR_NOT_GREATER_INCLUSIVE => '20 is incorrect',
],
],
[
'test_field1' => [
'notBetween' => '-15 is incorrect',
NumberComparison::ERROR_NOT_GREATER_INCLUSIVE => '-15 is incorrect',
],
'price' => [
'notBetween' => '15 is incorrect',
NumberComparison::ERROR_NOT_GREATER_INCLUSIVE => '15 is incorrect',
],
],
[
'test_field1' => [
'notBetween' => '-10 is incorrect',
NumberComparison::ERROR_NOT_GREATER_INCLUSIVE => '-10 is incorrect',
],
'price' => [
'notBetween' => '10 is incorrect',
NumberComparison::ERROR_NOT_GREATER_INCLUSIVE => '10 is incorrect',
],
],
],
Expand All @@ -718,10 +718,10 @@ public function testDuplicatedErrorMessages(): void
'test_field' => [
[
'test_field1' => [
'notBetween' => '-5 is incorrect',
NumberComparison::ERROR_NOT_GREATER_INCLUSIVE => '-5 is incorrect',
],
'price' => [
'notBetween' => '5 is incorrect',
NumberComparison::ERROR_NOT_GREATER_INCLUSIVE => '5 is incorrect',
],
],
],
Expand Down
Loading

0 comments on commit f58f705

Please sign in to comment.