SecurityBundle and FrameworkBundle, making it a strong fit for Laravel applications only if using Laravel’s Symfony bridge (e.g., via symfony/http-foundation, symfony/security, or spatie/laravel-symfony). Native Laravel authentication (e.g., Illuminate\Auth) would require significant abstraction.doctrine/dbal or spatie/laravel-doctrine). Laravel’s Eloquent ORM would need custom adapters or middleware.austral/tools-bundle, austral/entity-bundle, and austral/entity-file-bundle introduces vendor lock-in and requires all dependencies to be adopted, increasing complexity.Auth system (e.g., User model, HasApiTokens) is incompatible without middleware or facade wrappers.firewall, access_control) must be mapped to Laravel’s middleware groups ($router->middleware()).SecurityEvent) would need Laravel event listeners or custom bridges.ext-sodium dependency may require additional server configuration.User, Role, Group) would need manual migration to Laravel’s Eloquent or a hybrid approach (e.g., doctrine/dbal for reads/writes).austral/* bundles may introduce unused features or conflicts with existing Laravel packages (e.g., spatie/laravel-permission).austral/tools-bundle) should be audited for conflicts.spatie/laravel-permission, laravel/breeze) suffice, or does this bundle offer unique features (e.g., group-based RBAC)?SecurityBundle compatibility. Options:
spatie/laravel-symfony (limited features).SecurityFactory).austral/security-bundle for roles/groups, Laravel Auth for users).Illuminate\Auth) without Symfony integration.Phase 1: Dependency Setup
composer require austral/security-bundle austral/tools-bundle austral/entity-bundle austral/entity-file-bundle
spatie/laravel-symfony) or build a custom provider to load SecurityBundle.config/packages/austral_security.yaml) to config/austral.php.Phase 2: Entity Mapping
User, Role) with Laravel Eloquent traits for dual functionality.use Austral\SecurityBundle\Entity\User as AustralUser;
use Illuminate\Database\Eloquent\Model;
class User extends Model implements AustralUserInterface {
use \Doctrine\ORM\Mapping\Embedded;
protected $table = 'users';
// Laravel Eloquent fields...
// Embed AustralUser properties (e.g., roles, groups).
}
Phase 3: Authentication Layer
AuthServiceProvider with a custom provider that delegates to AustralSecurityBundle:
use Austral\SecurityBundle\Security\AustralAuthenticator;
use Symfony\Component\Security\Core\User\UserProviderInterface;
class AustralAuthServiceProvider extends ServiceProvider {
public function boot() {
$this->app->singleton(UserProviderInterface::class, function () {
return new AustralAuthenticator();
});
}
}
UserInterface to Laravel’s Authenticatable.Phase 4: Middleware/Routes
// Symfony: access_control: { path: ^/admin, roles: ROLE_ADMIN }
// Laravel: $router->middleware(['role:admin'])->group([...]);
spatie/laravel-middleware or custom middleware to bridge role checks.Phase 5: Testing
LOGIN_SUCCESS) in Laravel’s event system.auth()->user()) must be shimmed.symfony/* packages in Laravel.make:auth) won’t work with Symfony bundles.| Step | Task | Dependencies | Risk |
|---|---|---|---|
| 1 | Install dependencies | Composer | Low |
| 2 | Configure Symfony bridge | spatie/laravel-symfony or custom provider |
Medium |
| 3 | Map Doctrine entities to Eloquent | Hybrid models | High |
| 4 | Replace AuthServiceProvider |
Laravel auth system | Critical |
| 5 | Migrate middleware/routes | Symfony security config | Medium |
| 6 | Test hybrid flows | All prior steps | High |
austral/* bundles may require coordinated updates with Symfony/Laravel versions.austral/* bundles change.laravel/sanctum, spatie/laravel-permission).SecurityContext) may not align with Laravel’s cache drivers (e.g., array, redis).How can I help you explore Laravel packages today?