update msgphp bundles to 0.10

This commit is contained in:
Roland Franssen
2019-03-27 14:34:22 +01:00
parent bce79fc5f0
commit 3be0907f47
8 changed files with 19 additions and 18 deletions
@@ -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,
],
]);
};
+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\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;
}
}