vanio/vanio-user-bundle
A Symfony bundle that provides a ready-to-use user system, including a user entity, registration, authentication integration, and common account management features to help bootstrap secure, customizable user handling in Symfony applications.
This is a Symfony2-era bundle, not a Laravel package. If you're coming from Laravel, map the concepts roughly to laravel/socialite (HWIOAuthBundle side) + laravel/breeze/fortify (FOSUserBundle side). Before installing anything, verify the project is actually on Symfony 2.7/2.8 — this bundle will not work on Symfony 3+, let alone 4/5/6. Given it has ~1 star, zero dependents, and no recent activity, treat it as a reference for reading source, not a foundation for new code.
Minimal steps:
~1.3|~2.0) and HWIOAuthBundle (~0.6) already wired up. The bundle assumes both are present.composer require vanio/vanio-user-bundle:dev-master — no stable tags worth relying on). This will pull/expect old versions of Doctrine, Symfony, and the two peer bundles.app/AppKernel.php (after FOSUser and HWI):
new Vanio\UserBundle\VanioUserBundle(),
Resources/config/ (services + defaults), then Model/ (the base User you're meant to extend), then DependencyInjection/ (what config keys it actually honors).User entity extending the bundle's base model and map it with Doctrine. Point fos_user.model.user.class (or the bundle's equivalent config) at it.security.yml firewall chain from the bundle's docs before writing your own — that chain is where most of the "sane defaults" live.Extend the base model, don't fork it.
class User extends Vanio\UserBundle\Model\User
{
// your extra fields, relations, timestamps
}
Keep the bundle's fields (username, email, enabled, social IDs) intact; the FOS/HWI bridges read them via getters/setters.
OAuth login vs. OAuth linking. The typical workflow the bundle targets:
hwi_oauth_connect firewall path → user is already authenticated, callback links a provider account to the current user.hwi_oauth path → callback looks up by provider user id, falls back to email match, else creates a user (often "disabled" pending email confirmation).Use these two distinct firewall/path configurations rather than inventing a custom controller — that's the whole point of the bundle.
Registration flow. If you need custom registration, extend the FOSUser RegistrationFormType and the controller's form handling; the bundle mostly supplies defaults and templates. Override templates under app/Resources/VanioUserBundle/views/ (and FOSUserBundle/HWIOAuthBundle overrides similarly) rather than editing vendor files.
Integration tips.
FOSUserEvents::REGISTRATION_CONFIRM, SECURITY_IMPLICIT_LOGIN) for post-registration logic such as creating profiles or sending transactional mail.config.yml (e.g. google, github) exactly matching the resource owner service ids and the paths in routing.yml — the bundle wires these by string.KnpUOAuth2ClientBundle + symfony/security-bundle's authenticator system + symfonycasts/reset-password-bundle — read this bundle's Model/ and connect controller as a spec.AppKernel and security.yml. Register VanioUserBundle after FOSUser and HWI; put the connect firewall before the main OAuth firewall, otherwise linking silently routes to login.fos_user.resetting.token_ttl, registration.confirmation.enabled, and your entity's table name all line up. A missing @ORM\Table on the concrete entity frequently produces duplicate-table or missing-column errors during doctrine:schema:update.redirect_uri in the provider console exactly matches the route generated by hwi_oauth_redirect, and confirm the resource owner's client_id/client_secret are read from the right config node.DependencyInjection/Configuration.php before assuming a key exists; unknown keys are dropped silently by Symfony's config tree in some versions.app/config/services.yml with the same id), override forms and templates, and listen to FOS/HWI events. Avoid subclassing controllers — the bundle predates final controller classes and that pattern will bite you during upgrades.laravel/socialite + laravel/fortify (or Breeze with social login) instead. Port the flow (register → confirm → link provider) rather than the code.How can I help you explore Laravel packages today?