mirror of
https://github.com/symfony/recipes-contrib.git
synced 2026-09-15 00:56:29 +03:00
update msgphp bundles to 0.10
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
use MsgPhp\User\User;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return function (ContainerConfigurator $container) {
|
||||
$container->extension('msgphp_user', [
|
||||
'class_mapping' => [
|
||||
User::class => \App\Entity\User\User::class,
|
||||
],
|
||||
]);
|
||||
};
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"bundles": {
|
||||
"MsgPhp\\UserBundle\\MsgPhpUserBundle": ["all"]
|
||||
},
|
||||
"copy-from-recipe": {
|
||||
"config/": "%CONFIG_DIR%/",
|
||||
"src/": "%SRC_DIR%/"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<bg=blue;fg=white> </>
|
||||
<bg=blue;fg=white> User management setup </>
|
||||
<bg=blue;fg=white> </>
|
||||
|
||||
* Install the Symfony Maker Bundle using <info>composer require maker --dev</>. It's required for the next step.
|
||||
|
||||
* Run <info>bin/console make:user:msgphp</>. It will guide you through the basic setup by asking a series of
|
||||
questions and generates the minimal application source files needed.
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\User;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use MsgPhp\User\User as BaseUser;
|
||||
use MsgPhp\User\UserId;
|
||||
|
||||
/**
|
||||
* @ORM\Entity()
|
||||
*/
|
||||
class User extends BaseUser
|
||||
{
|
||||
/** @ORM\Id() @ORM\GeneratedValue() @ORM\Column(type="msgphp_user_id", length=191) */
|
||||
private $id;
|
||||
|
||||
public function __construct(UserId $id)
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
public function getId(): UserId
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user