jalismrs / symfony.common.helpers.event
Adds Symfony events helper methods
This package's canonical repository appears to be gone and the package has been frozen as a result.
1.0.2
2021-03-04 10:49 UTC
Requires
- php: ^7.4 || ^8.0
- symfony/http-kernel: ^5.0
Requires (Dev)
- composer/package-versions-deprecated: *
- phpunit/phpunit: 9.4.2
- roave/security-advisories: dev-master
README
Adds Symfony events helper methods
Test
phpunit
OU vendor/bin/phpunit
coverage reports will be available in var/coverage
Use
getController
use Jalismrs\Symfony\Common\Helpers\EventHelpers; use Symfony\Component\HttpKernel\Event\ControllerEvent; class SomeClass { public function onControllerEvent( ControllerEvent $controllerEvent ): ControllerEvent { $controller = EventHelpers::getController($controllerEvent); // do something return $controllerEvent; } }