class Kernel extends SymfonyKernel implements EventSubscriberInterface
{
use MicroKernelTrait;
public function bowtiesAction(): Response
{
return new RedirectResponse('I wear a fez now. Fezzes are cool!');
}
public function dangerousAction(): Response
{
throw new Danger('🔥🔥 😈🐷 🔱🔺 🔥🔥');
}
public function onKernelException(ExceptionEvent $event): void
{
if ($event->getThrowable() instanceof Danger) {
$event->setResponse(new Response("👴🏻: It's dangerous to go alone. Take this: 🗡️"));
}
}
protected function configureRoutes(RoutingConfigurator $routes): void
{
$routes->add('bowties', '/bowties')->controller('kernel::bowtiesAction');
$routes->add('danger', '/danger')->controller('kernel::dangerousAction');
}
public static function getSubscribedEvents(): array
{
return [KernelEvents::EXCEPTION => 'onKernelException'];
}
}
- Lyon | France
- http://shiningame.ogizanagi.fr
- @ogizanagi
Block or Report
Block or report ogizanagi
Report abuse
Contact GitHub support about this user’s behavior. Learn more about reporting abuse.
Report abusePinned
-
-
Elao/PhpEnums Public
🔩 Extended PHP 8.1+ enums features & specific integrations with frameworks and libraries -
-
2,375 contributions in the last year
Activity overview
Contribution activity
June 2022
Created 50 commits in 10 repositories
Created 3 repositories
- ogizanagi/ux PHP
- ogizanagi/jamstack.org Nunjucks
- ogizanagi/sf-deprec-issue-reproducer PHP
Created a pull request in symfony/symfony that received 2 comments
[Serializer][WebProfilerBundle] Show serializer collector info in toolbar
The numbers themselves are, most of the time, not much important, but knowing the serializer was called and which methods at a glance is helpful …
+66
−0
•
2
comments
Opened 9 other pull requests in 6 repositories
symfony/symfony
4
merged
symfony/ux
1
merged
jamstack/jamstack.org
1
open
StenopePHP/Stenope
1
merged
rix-fr/rix
1
merged
Elao/elao_
1
merged
Reviewed 16 pull requests in 2 repositories
symfony/symfony
14 pull requests
- [Serializer] Provide context information from attribute for promoted properties
- [Cache][WebProfilerBundle] Add adapter class to Cache DataCollector
-
[Yaml] Add support for
!php/enum *->value
syntax - [Serializer] Respect default context in DateTimeNormalizer::denormalize
- [DependencyInjection] Update ContainerBag to throw ParameterNotFoundException instead of InvalidArgumentException
- [PhpUnitBridge] fix tests
-
[Messenger] Add new
messenger:count
command that return a list of transports with their "to be processed" message count. - [Serializer] Deprecate autowiring aliases pointing to concrete normalizers
- [Serializer] Throw NotNormalizableException instead of InvalidArgumentException in ArrayDenormalizer
- [Routing] Fix $requirements PHPDoc for SCA
- Remove Debug component leftovers
- Add missing UPGRADE notes for the Security Helper
- [Serializer][WebProfilerBundle] Fix broken toolbar
- [WebProfilerBundle] normalizer and encoder can be undefined in template
symfony/symfony-docs
2 pull requests
Created an issue in symfony/symfony-docs that received 1 comment
Opened 2 other issues in 2 repositories
Elao/PhpEnums
1
open
symfony/symfony
1
open
96
contributions
in private repositories
Jun 1 – Jun 29