ac/kalinka-bundle
Symfony2 bundle integrating the Kalinka authorization library. Configure role/action policies via YAML, set default/anonymous/authenticated roles, inject the kalinka.authorizer service to check permissions, and register custom guards with the kalinka.guard tag.
['owner', 'unlocked']). This aligns well with Laravel’s built-in Gate/Policy system but lacks Laravel’s middleware and route-model binding integrations.config/ files or environment variables. However, Symfony’s Service Container bindings (e.g., authorizers.default) would need translation to Laravel’s Service Providers or Facades.ACKalinkaBundle) is stripped or refactored.auth()->user()->can('edit-post')).AppKernel → AppServiceProvider).Is Symfony2 a Hard Dependency?
symfony/http-foundation) be required for compatibility?How Does This Compare to Laravel’s Native Solutions?
Performance Impact
Long-Term Viability
call_user_func_array usage).config/kalinka.php.EventDispatcher.// app/Providers/KalinkaServiceProvider.php
public function register()
{
$this->app->singleton('kalinka', function ($app) {
return new \Kalinka\Authorizer($app['config']['kalinka']);
});
}
authorize() method:
if (kalinka()->authorize('teacher', 'document', 'update', $user)) {
// Allow action
}
| Component | Laravel Equivalent | Risk Level |
|---|---|---|
AppKernel |
AppServiceProvider |
High |
EventDispatcher |
Laravel Events | Medium |
ContainerBuilder |
Laravel Service Container | High |
| Twig Integration | Laravel Blade | Low |
config/kalinka.php).allow/deny checks).public function handle($request, Closure $next)
{
if (!kalinka()->authorize($request->user(), 'document', 'read')) {
abort(403);
}
return $next($request);
}
['owner', 'unlocked']).authorize() calls.yourcompany/kalinka-laravel).ContainerException vs. Laravel’s BindingResolutionException).cache()->remember().owner guard), consider denormalizing data or using **Eloquent accessHow can I help you explore Laravel packages today?