Skip to content

Commit

Permalink
Merge pull request #277 from laminas/3.20.x-merge-up-into-3.21.x_r2Ci…
Browse files Browse the repository at this point in the history
…lk9f

Merge release 3.20.1 into 3.21.x
  • Loading branch information
Xerkus authored Sep 15, 2024
2 parents a50af07 + 91ac71b commit 610aef2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Annotation/AbstractBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ protected function checkForExclude(AnnotationCollection $annotations): bool

// @codingStandardsIgnoreStart
$results = $this->getEventManager()->triggerEventUntil(
static fn(bool $r): bool => true === $r,
static fn(?bool $r): bool => true === $r,
$event
);
// @codingStandardsIgnoreEnd
Expand Down
14 changes: 14 additions & 0 deletions test/Annotation/AbstractBuilderTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
use LaminasTest\Form\TestAsset\Annotation\Form;
use LaminasTest\Form\TestAsset\Annotation\InputFilter;
use LaminasTest\Form\TestAsset\Annotation\InputFilterInput;
use PHPUnit\Framework\Attributes\DoesNotPerformAssertions;
use PHPUnit\Framework\Attributes\WithoutErrorHandler;
use PHPUnit\Framework\TestCase;
use Throwable;
Expand Down Expand Up @@ -573,4 +574,17 @@ public function testLegacyStyleValidatorAnnotations(): void
ErrorHandler::restoreErrorHandler();
}
}

#[DoesNotPerformAssertions]
public function testAllowsEventListenerReturnVoid(): void
{
$entity = new TestAsset\Annotation\Entity();
$builder = $this->createBuilder();

$builder->getEventManager()->attach('*', function () {
// return void;
});

$builder->createForm($entity);
}
}

0 comments on commit 610aef2

Please sign in to comment.