Installation Add the package via Composer:
composer require ekyna/core-bundle
Enable the bundle in config/bundles.php (Symfony 4+):
Ekyna\CoreBundle\EkynaCoreBundle::class => ['all' => true],
First Use Case: Doctrine Entity Listener Resolver Register a listener dynamically in a service:
# config/services.yaml
services:
App\EventListener\MyListener:
tags:
- { name: 'ekyna.core.listener', entity: 'App\Entity\MyEntity' }
First Use Case: Twig Extensions Use the provided Twig extensions in templates:
{{ text|intl_translate }}
{{ text|html_safe }}
ekyna.core.listener to auto-register listeners for specific entities.priority option in the tag to control listener execution order.prePersist, preUpdate, preRemove, etc. via the event option.$this->container->get('ekyna_core.router.chain')->addRoute(
'my_route',
new Route('/path', new \Symfony\Component\HttpKernel\TerminableMiddlewareStack())
);
intl_translate for locale-aware text processing.html_safe to escape HTML in templates.intl_plural or intl_select for localization.TimestampableInterface (if implemented).CmfChainRouter setup (e.g., how to integrate with Symfony’s router).debug:event-dispatcher:
php bin/console debug:event-dispatcher
php bin/console cache:clear
ekyna_core_text) match the bundle’s actual implementation.Ekyna\CoreBundle\Listener\ListenerResolverInterface.ekyna_core.twig.extension service tag.Ekyna\CoreBundle\Router\ChainRouter to customize route handling.How can I help you explore Laravel packages today?