baks-dev/users-profile-group
Symfony/PHP 8.4+ модуль групп профилей пользователя: установка через Composer, команды для первичной настройки и добавления администратора, установка ассетов, рекомендации для composer auto-scripts, миграции Doctrine и тесты PHPUnit.
symfony/console, Doctrine) introduces potential friction in a Laravel-native stack. The lack of updates in v7.4.5 suggests stability but also raises concerns about long-term compatibility with Laravel’s evolving architecture (e.g., Laravel 11’s Symfony 7+ integration).app/Console/Kernel.php, but custom commands may require Laravel-specific wrappers for consistency.EventDispatcher, HttpKernel). Example: symfony/console may clash with Laravel’s Artisan.doctrine/dbal). If unused, this is wasted overhead.baks:users-profile-group:admin are not extensible via Laravel’s command bus or middleware. Workarounds include:
users-profile-group) are undocumented and unmaintained. Assume zero test coverage for edge cases.Why Symfony/Doctrine?
Command Integration Strategy
baks:* commands integrate with Laravel’s CLI?
app/Console/Kernel.php (simple but mixes namespaces).php artisan baks:group:create).Permission System
baks groups map to Laravel’s auth system?
User model to include group_id.baks group membership.baks + Laravel gates).Asset Pipeline
baks:assets:install integrate with Laravel Mix/Vite?
/public/baks-assets).Future Maintenance
Backward Compatibility
doctrine/dbal is the only Doctrine component used (avoid laravel-doctrine/orm).composer require symfony/console symfony/process doctrine/dbal
doctrine/orm unless absolutely necessary.Phase 1: Dependency Setup
composer require baks-dev/users-profile-group symfony/console symfony/process doctrine/dbal
composer.json to avoid conflicts:
"require": {
"php": "^8.4",
"laravel/framework": "^11.0",
"symfony/console": "^6.4",
"symfony/process": "^6.4",
"doctrine/dbal": "^3.7"
}
Phase 2: Database Schema
php artisan migrate
php artisan doctrine:migrations:migrate
Phase 3: CLI Integration
baks commands in app/Console/Kernel.php:
protected $commands = [
\Baks\UsersProfileGroup\Command\UsersProfileGroupCommand::class,
// Other baks commands...
];
app/Console/Commands/BaksGroupCreate.php) to avoid namespace collisions.Phase 4: Frontend/Assets
config/baks.php (if configurable) or override baks:assets:install to output to /public/baks-assets./public during build.@vite(['resources/baks-assets/main.css']) in Blade templates.Phase 5: Authentication
baks groups to Laravel’s auth system:
group_id to users table and use middleware:
public function handle(Request $request, Closure $next) {
if (auth()->user()->group_id !== 'admin') {
abort(403);
}
return $next($request);
}
Gate::define('manage-group', function (User $user) {
return $user->group_id === 'admin';
});
EventDispatcher conflicts if Laravel’s events are used alongside Symfony’s.ServiceLocator in favor of Laravel’s DI container.baks:auth-email system is not Laravel-native. Plan to:
users table.HasApiTokens or MustVerifyEmail traits for email verification.How can I help you explore Laravel packages today?