halloverden/symfony-security-bundle
A Symfony bundle from halloverden that integrates security features into Symfony applications, providing configuration and service wiring for authentication, authorization, and access control within the framework.
Before anything else: this is a Symfony bundle, not a Laravel package. A Laravel developer cannot composer require this into a Laravel app and get working auth — bundle registration, DI extension classes, config trees, and compiler passes all run inside the Symfony kernel, which Laravel doesn't host. So "getting started" has two honest paths:
Path A — you're actually on Symfony (the only realistic path).
composer.json's require block first. A zero-star, zero-dependent bundle is typically pinned to old symfony/framework-bundle / symfony/security-bundle constraints. If it won't resolve against your Symfony version, stop.composer require halloverden/symfony-security-bundle. Flex auto-registers if there's a recipe; otherwise add the bundle class to config/bundles.php.DependencyInjection/Configuration.php — the config tree; tells you the vendor key and every honored option.DependencyInjection/*Extension.php — how config maps to services.Resources/config/services.{xml,yaml,php} — what gets registered and with which tags.Security/, Voter/, Authenticator/ — the actual primitives.bin/console debug:container --tag=security.voter, then write a unit test that calls vote() directly. Once you trust the voter path, consider an authenticator.Path B — you're on Laravel (the prompt's framing). There is no day-to-day leverage here. The correct first step is a spike that confirms this, documented so it doesn't get re-litigated. If the underlying pattern (voters, firewalls) is what's wanted, map it to Laravel equivalents: Gate/Policy for voters, Auth::guard()/Fortify for firewalls, Sanctum for stateless/API, Passport for OAuth2. Don't bridge Symfony Security into Laravel's Auth manager — you'll write and own the glue with no upstream help.
The only patterns worth using day-to-day are the ones a Symfony dev already knows. The package's value, if any, is that it wires them for you. Treat it as a thin config layer over symfony/security-bundle and confirm that assumption at each step.
config/packages/halloverden_security.yaml) feeds the Extension's load() and the Configuration tree. Every key there becomes a service argument. If a key isn't in Configuration.php, it will throw InvalidConfigurationException — use that error as your schema documentation.VoterInterface (or extend AbstractVoter / AbstractVoterInterface if the bundle ships one), expose it as a service, and check it's tagged security.voter. Test in isolation:
$voter = new SomeVoter();
$token = new UsernamePasswordToken('user', null, 'main', ['ROLE_USER']);
$this->assertSame(VoterInterface::ACCESS_GRANTED, $voter->vote($token, $post, ['EDIT']));
Then use $this->denyAccessUnlessGranted('EDIT', $post) in controllers.security.yaml, confirm via debug:config security that the firewall compiles, then test with a real login request. Don't mix this with an existing guard-based setup until you've confirmed the Symfony version's authenticator model matches (guard vs. authenticator manager — see gotchas).@halloverden_security.something) or via interface hints that map to tagged services. Look for a CompilerPass — that's how they collect tagged services.KernelTestCase with a minimal test kernel that registers the bundle. A container-compile test is cheap and catches most broken-bundle conditions:
self::bootKernel();
self::assertTrue(self::$container->has('halloverden_security.some_service'));
debug:container <id>, debug:config security, debug:config halloverden_security, debug:event-dispatcher, debug:router. These tell you what the bundle registered, which is rarely what the description claims.security.yaml without warning. After installing, diff bin/console debug:config security against a clean Symfony baseline. Anything unexpected is the bundle.Configuration tree, always bin/console cache:clear before trusting a ServiceNotFoundException. In dev mode you'll usually be fine; in test mode (KernelTestCase) the cache persists between runs — use APP_ENV=test with an isolated cache_dir.vendor/.debug:container, debug:config, debug:event-dispatcher, debug:router. In a bundle with no documentation, these commands are the only reliable source of truth for what running code actually does.How can I help you explore Laravel packages today?