spipu/user-bundle
Spipu UserBundle is a Symfony bundle for complete user management: user accounts, groups, roles and permissions, authentication integration, and admin screens. It includes Doctrine entities and CRUD tooling to add secure user administration to Symfony apps.
This is a small, low-traffic bundle (3 stars, 0 dependents), so treat the source as the primary documentation and budget time to read it before wiring anything up.
Install: composer require spipu/user-bundle. If there is no Flex recipe, register it manually in config/bundles.php:
Spipu\UserBundle\SpipuUserBundle::class => ['all' => true],
Confirm the actual namespace from the package's composer.json autoload.psr-4 before you copy this.
Look here first, in order:
README.md for the intended integration path.src/DependencyInjection/Configuration.php — this is the authoritative list of config keys, defaults, and required nodes. Anything the README omits will be here.src/Resources/config/services.yaml for service IDs and aliases you can autowire.Create/adapt your App\Entity\User. Most bundles of this shape either ship a User entity you configure directly or a MappedSuperclass you extend. Extend it, add your own Doctrine mapping (#[ORM\Entity], #[ORM\Table]), and let the bundle own auth-related fields and behavior.
Configure minimally in config/packages/spipu_user.yaml (exact keys from Configuration.php): the user class, table name, and any field/column overrides.
Wire Symfony Security to the bundle's entity:
security:
providers:
users:
entity: { class: App\Entity\User, property: email }
First use case — register and authenticate a user: inject the bundle's user manager (or repository), create a user, set the plaintext password through the manager so it hashes it, persist, then log in through a standard form_login firewall. That end-to-end path is the fastest way to validate the bundle's assumptions about your entity and provider.
createUser()/updatePassword(). Setting $user->setPassword($plain) directly bypasses hashing; setting a pre-hashed value in a manager method will double-hash. Check the manager's implementation once and standardize on it.NotBlank/Length/PasswordStrength constraints → manager createUser() → persist/flush → optional domain event (UserRegisteredEvent). Keep password hashing out of the controller.json_login (session/token) or a JWT/lexik layer. The bundle typically only owns user data and hashing, not token issuance — don't expect it to ship token endpoints.bin/console doctrine:migrations:diff and commit the migration. Do not rely on schema:update in any shared environment.Configuration.php, service decoration/overriding via services.yaml, and subclassing the provided entity. Avoid editing vendor code — there will be no upgrade merge path.config/bundles.php and run bin/console cache:clear.#[ORM\Entity] class extending it; forgetting this yields "not a managed entity" errors at runtime, not at cache-warm time.property matches the field you actually populate (email vs. username).cache:clear; stale config is a common false positive when debugging.Configuration.php and the services definitions before guessing key names; grep the source for the exception messages you hit."spipu/user-bundle": "^X.Y" with a committed composer.lock. A low-adoption package can change config keys between releases without a deprecation path; a wildcard constraint is a liability.composer.json rather than trusting examples online — small bundles get renamed.bin/console debug:container | grep -i user and debug:config spipu_user (if an extension alias exists) to see what actually got registered.How can I help you explore Laravel packages today?