Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Users Profile Group

Users Profile Group Laravel Package

baks-dev/users-profile-group

Symfony/PHP 8.4+ модуль групп профилей пользователя: установка через Composer, команды для первичной настройки и добавления администратора, установка ассетов, рекомендации для composer auto-scripts, миграции Doctrine и тесты PHPUnit.

View on GitHub
Deep Wiki
Context7

composer require baks-dev/users-profile-group

Frequently asked questions about Users Profile Group
Does this package work with Laravel’s Eloquent ORM, or is Doctrine ORM mandatory?
This package **requires Doctrine ORM** and won’t work natively with Eloquent. If your project uses Eloquent exclusively, you’ll need to either migrate to Doctrine or build custom bridges to integrate the package’s group logic. The package’s migrations and entity system are tightly coupled to Doctrine, so conflicts with Laravel’s default ORM are likely.
How do I set up an admin user after installing this package?
Run these Symfony-based CLI commands in sequence: `php bin/console baks:users-profile-type:user`, `php bin/console baks:auth-email:admin`, `php bin/console baks:users-profile-user:admin`, and finally `php bin/console baks:users-profile-group:admin`. These commands initialize the admin role and group structure. Ensure your `bin/console` symlink is properly configured for Laravel.
Will this package conflict with Laravel’s built-in authentication (e.g., `Auth::user()`)?
Yes, potential conflicts exist. The package introduces its own auth logic via `baks:auth-email` commands, which may override or duplicate Laravel’s default auth system. You’ll need to manually map the package’s group permissions to Laravel’s gates, policies, or roles (e.g., using `Gate::define()` or middleware) to maintain consistency.
Can I customize or extend the CLI commands (e.g., add new group types)?
The package’s CLI commands are **closed-source and not designed for extension**. Workarounds include creating custom Artisan commands that interact with the package’s Doctrine entities or overriding its logic via middleware/policies. However, the lack of event hooks or publishable templates makes deep customization difficult without modifying the package’s core files.
What Laravel versions are supported, and are there any PHP version requirements?
This package requires **PHP 8.4+** and is compatible with Laravel 10/11. While Laravel 9.x might work, the package’s Symfony 6.x dependencies could introduce compatibility risks. Always test in a staging environment before production deployment, especially if using older Laravel versions.
How do I run the package’s migrations without breaking existing Laravel migrations?
Use `php bin/console doctrine:migrations:diff` to generate the package’s migrations, then run `doctrine:migrations:migrate` **after** your Laravel migrations. Order matters: run Laravel’s migrations first to avoid foreign key or constraint errors. If conflicts arise, inspect the generated Doctrine migrations manually to adjust sequencing or schema changes.
Are there any alternatives to this package for Laravel user grouping?
Yes. For Eloquent-based projects, consider `spatie/laravel-permission` (roles/permissions) or `nWidart/laravel-modules` (modular grouping). If you need Doctrine integration, `coderello/doctrine-extensions` or custom Doctrine entities with Laravel’s `HasFactory` might be lighter alternatives. However, these lack the package’s pre-built CLI tools for admin setup.
How do I test the package’s functionality in PHPUnit?
Run tests with the group tag: `php bin/phpunit --group=users-profile-group`. The package includes limited test coverage, so focus on edge cases like concurrent group assignments or permission conflicts. Mock Doctrine’s entity manager or use Laravel’s `DatabaseMigrations` trait to isolate tests from the package’s schema changes.
What happens if I skip the `baks:assets:install` command? Will the package still work?
The package will function, but critical assets (e.g., views, configs, or static files) may be missing. The `baks:assets:install` command copies resources to `public/` or `resources/`. Skipping it risks broken UI elements or configuration files. Add it to `composer.json` under `auto-scripts` to ensure it runs post-installation, as shown in the README.
Can I use this package in a production environment without issues?
Proceed with caution. The package’s reliance on Symfony Console and Doctrine introduces risks like schema conflicts or CLI command collisions. Test thoroughly for: Doctrine migration sequencing, permission overlaps with Laravel’s auth, and asset loading in production. Monitor for undocumented schema changes in future updates, as the package lacks active maintenance.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky