Skip to content

Commit

Permalink
Bumps minimum version of doctrine annotations to 1.13.3 to solve te…
Browse files Browse the repository at this point in the history
…st failures

Doctrine Annotations now converts deprecations to exceptions

ref: doctrine/annotations#438
Signed-off-by: George Steel <george@net-glue.co.uk>
  • Loading branch information
gsteel committed Jul 25, 2022
1 parent c1a8474 commit 8c7543c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 23 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"require-dev": {
"ext-intl": "*",
"doctrine/annotations": "^1.13.2",
"doctrine/annotations": "^1.13.3",
"laminas/laminas-captcha": "^2.11.0",
"laminas/laminas-coding-standard": "^2.3.0",
"laminas/laminas-db": "^2.13.4",
Expand Down
21 changes: 11 additions & 10 deletions composer.lock

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

25 changes: 13 additions & 12 deletions test/Annotation/AbstractBuilderTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace LaminasTest\Form\Annotation;

use Doctrine\Common\Annotations\AnnotationException;
use Generator;
use Laminas\Form\Annotation;
use Laminas\Form\Element;
Expand Down Expand Up @@ -406,37 +407,37 @@ public function testInputFilterAnnotationAllowsComposition(): void

public function testLegacyComposedObjectAnnotation(): void
{
$this->expectDeprecation();
$this->expectDeprecationMessageMatches('/Passing a single array .* is deprecated/');
$this->expectException(AnnotationException::class);
$this->expectExceptionMessageMatches('/Passing a single array .* is deprecated/');
$entity = new TestAsset\Annotation\LegacyComposedObjectAnnotation();
$builder = $this->createBuilder();
$form = $builder->createForm($entity);
$builder->createForm($entity);
}

public function testLegacyStyleFilterAnnotations(): void
{
$this->expectDeprecation();
$this->expectDeprecationMessageMatches('/Passing a single array .* is deprecated/');
$this->expectException(AnnotationException::class);
$this->expectExceptionMessageMatches('/Passing a single array .* is deprecated/');
$entity = new TestAsset\Annotation\LegacyFilterAnnotation();
$builder = $this->createBuilder();
$form = $builder->createForm($entity);
$builder->createForm($entity);
}

public function testLegacyStyleHydratorAnnotations(): void
{
$this->expectDeprecation();
$this->expectDeprecationMessageMatches('/Passing a single array .* is deprecated/');
$this->expectException(AnnotationException::class);
$this->expectExceptionMessageMatches('/Passing a single array .* is deprecated/');
$entity = new TestAsset\Annotation\LegacyHydratorAnnotation();
$builder = $this->createBuilder();
$form = $builder->createForm($entity);
$builder->createForm($entity);
}

public function testLegacyStyleValidatorAnnotations(): void
{
$this->expectDeprecation();
$this->expectDeprecationMessageMatches('/Passing a single array .* is deprecated/');
$this->expectException(AnnotationException::class);
$this->expectExceptionMessageMatches('/Passing a single array .* is deprecated/');
$entity = new TestAsset\Annotation\LegacyValidatorAnnotation();
$builder = $this->createBuilder();
$form = $builder->createForm($entity);
$builder->createForm($entity);
}
}

0 comments on commit 8c7543c

Please sign in to comment.