[MsgPhpUserBundle] Fix maker conflict

This commit is contained in:
Roland Franssen
2018-09-22 16:08:07 +02:00
parent 183554cef8
commit 416ade6e02
4 changed files with 1 additions and 1 deletions
@@ -0,0 +1,12 @@
<?php
use MsgPhp\User\Entity\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,
],
]);
};
+9
View File
@@ -0,0 +1,9 @@
{
"bundles": {
"MsgPhp\\UserBundle\\MsgPhpUserBundle": ["all"]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/",
"src/": "%SRC_DIR%/"
}
}
+8
View File
@@ -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\Entity\User as BaseUser;
use MsgPhp\User\UserIdInterface;
/**
* @ORM\Entity()
*/
class User extends BaseUser
{
/** @ORM\Id() @ORM\GeneratedValue() @ORM\Column(type="msgphp_user_id") */
private $id;
public function __construct(UserIdInterface $id)
{
$this->id = $id;
}
public function getId(): UserIdInterface
{
return $this->id;
}
}