lekoala / kaly
A small modular PSR HTTP framework with convention-based routing and first-class dependency injection
Requires
- php: ^8.3
- ext-fileinfo: *
- ext-mbstring: *
- lekoala/kaly-di: ^0.2
- psr/clock: ^1.0
- psr/container: ^1.1.2|^2.0.2
- psr/http-factory: ^1.1
- psr/http-message: ^2.0
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
- psr/log: ^1.0 || ^2.0 || ^3.0
- psr/simple-cache: ^3.0
- symfony/polyfill-php84: ^1.30
Requires (Dev)
- carthage-software/mago: ^1
- composer/ca-bundle: ^1.5
- latte/latte: ^3.0
- lekoala/kaly-tpl: ^0.1
- nyholm/psr7: ^1.8
- nyholm/psr7-server: ^1.1
- phpstan/phpstan: ^2.2
- phpunit/phpunit: ^12
- symfony/translation: ^7.1
- symfony/var-dumper: ^7.1
- twig/twig: ^3.0
Suggests
- ext-intl: Better slug transliteration in Kaly\Util\Str::slug
- latte/latte: Recommended template language, through Kaly\View\Adapter\LatteRenderer
- lekoala/kaly-tpl: Lightweight native PHP templates, through Kaly\View\Adapter\KalyTplRenderer
- nyholm/psr7: Recommended PSR-7 implementation for your application
- nyholm/psr7-server: Build a ServerRequest from PHP globals in your entry point
- symfony/translation: Full featured translations (ICU, loaders), through Kaly\Text\Adapter\SymfonyTranslator
- twig/twig: Supported template engine, through Kaly\View\Adapter\TwigRenderer
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-14 07:14:57 UTC
README
A small modular PSR HTTP framework with convention-based routing and first-class dependency injection
Kaly is an opinionated but lightweight application framework built on PHP standards:
- PSR based: PSR-7 messages, PSR-11 container, PSR-15 middleware.
- Dependency injection: powered by kaly-di, autowiring and explicit definitions.
- Convention-based routing: no route file to maintain, controllers map to URIs.
- Modular architecture: each module has its own config, controllers, templates and assets.
- Middleware support: plain PSR-15 middleware, plus an optional generator style for before/after hooks.
- Multilingual support: built-in locale detection.
- Renderer agnostic: Latte (recommended), kaly-tpl (lightweight native PHP) or Twig, through tiny adapters.
- No database, no ORM, no forms: Kaly stays a small HTTP framework.
- No auth/CSRF/rate-limit bundled: provide your own PSR-15 middleware.
Stability
Internal lekoala/kaly-di and lekoala/kaly-tpl are 0.x and may evolve.
Public contracts (RouterInterface, RendererInterface, ExceptionHandlerInterface,
PSR-15 pipeline) are stable within 0.x — no intentional breaking change.
Views
Kaly ships no template engine: return a Kaly\View\View from a controller and register a
Kaly\View\RendererInterface (see docs/views.md). Optional adapters are
provided for Latte, kaly-tpl and Twig.
Requirements
- PHP 8.3+
- A PSR-7 implementation for your application (Nyholm is recommended); the core only depends on the PSR interfaces.
Installation
composer require lekoala/kaly
Documentation
See Documentation. Run composer docs or composer docsify.
Testing
composer test