Loosens the type declaration from bool -> ?bool in checkForExclude callback.
Reproduction:
Attach an event that returns void that listens for the checkForExclude (or *) event.
Using laminas-developer-tools with the default setup (listening for all events) will have a listener that returns void (\Laminas\DeveloperTools\Listener\EventLoggingListenerAggregate::onCollectEvent). The void is passed as a parameter to the callback (as null) and causes a TypeError.
Expected:
To execute with listeners that return void.
Actual:
TypeError: Laminas\Form\Annotation\AbstractBuilder::Laminas\Form\Annotation\{closure}(): Argument #1 ($r) must be of type bool, null given, called in `vendor/laminas/laminas-eventmanager/src/EventManager.php` on line 330 `src/Annotation/AbstractBuilder.php:313`
Description
Loosens the type declaration from
bool
->?bool
incheckForExclude
callback.Reproduction: Attach an event that returns
void
that listens for thecheckForExclude
(or*
) event.Using
laminas-developer-tools
with the default setup (listening for all events) will have a listener that returnsvoid
(\Laminas\DeveloperTools\Listener\EventLoggingListenerAggregate::onCollectEvent
). Thevoid
is passed as a parameter to the callback (asnull
) and causes aTypeError
.Expected: To execute with listeners that return
void
.Actual: