setup user bundle
This commit is contained in:
parent
da5d52676a
commit
a82aef117b
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "67a565f8e92ab38b2b832b9520f2f951",
|
||||
"content-hash": "323cd6f79b79f99a5919e9e4c395a45d",
|
||||
"packages": [
|
||||
{
|
||||
"name": "composer/ca-bundle",
|
||||
|
@ -1361,6 +1361,128 @@
|
|||
],
|
||||
"time": "2017-06-19T01:22:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "msgphp/domain",
|
||||
"version": "v0.2.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/msgphp/domain.git",
|
||||
"reference": "3c431766cfb8769dc8bc8bed9fa561387a2963be"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/msgphp/domain/zipball/3c431766cfb8769dc8bc8bed9fa561387a2963be",
|
||||
"reference": "3c431766cfb8769dc8bc8bed9fa561387a2963be",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/doctrine-bundle": "^1.8",
|
||||
"doctrine/orm": "^2.6",
|
||||
"psr/container": "^1.0",
|
||||
"ramsey/uuid": "^3.7",
|
||||
"ramsey/uuid-doctrine": "^1.4",
|
||||
"simple-bus/message-bus": "^3.0",
|
||||
"symfony/config": "^3.4|^4.0",
|
||||
"symfony/dependency-injection": "^3.4|^4.0",
|
||||
"symfony/http-kernel": "^3.4|^4.0",
|
||||
"symfony/phpunit-bridge": "^3.4|^4.0",
|
||||
"symfony/property-access": "^3.4|^4.0",
|
||||
"symfony/var-dumper": "^3.4|^4.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"MsgPhp\\Domain\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Roland Franssen",
|
||||
"email": "franssen.roland@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Base domain layer",
|
||||
"keywords": [
|
||||
"entity"
|
||||
],
|
||||
"time": "2018-03-14T20:58:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "msgphp/user",
|
||||
"version": "v0.2.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/msgphp/user.git",
|
||||
"reference": "57715720a6c2d20c51e5428b6bcdabc9583f4d8e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/msgphp/user/zipball/57715720a6c2d20c51e5428b6bcdabc9583f4d8e",
|
||||
"reference": "57715720a6c2d20c51e5428b6bcdabc9583f4d8e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"msgphp/domain": "^0.2|^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/orm": "^2.6",
|
||||
"lexik/jwt-authentication-bundle": "dev-master",
|
||||
"msgphp/eav": "^0.2",
|
||||
"sensio/framework-extra-bundle": "^5.1",
|
||||
"symfony/console": "^3.4|^4.0",
|
||||
"symfony/form": "^3.4|^4.0",
|
||||
"symfony/http-kernel": "^3.4|^4.0",
|
||||
"symfony/phpunit-bridge": "^3.4|^4.0",
|
||||
"symfony/security-core": "^3.4|^4.0",
|
||||
"symfony/validator": "^3.4|^4.0",
|
||||
"symfony/var-dumper": "^3.4|^4.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"MsgPhp\\User\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Roland Franssen",
|
||||
"email": "franssen.roland@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "User domain layer",
|
||||
"keywords": [
|
||||
"security",
|
||||
"user"
|
||||
],
|
||||
"time": "2018-03-17T14:16:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "ocramius/package-versions",
|
||||
"version": "1.2.0",
|
||||
|
@ -5756,6 +5878,72 @@
|
|||
],
|
||||
"time": "2017-12-04T20:26:38+00:00"
|
||||
},
|
||||
{
|
||||
"name": "msgphp/user-bundle",
|
||||
"version": "v0.2.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/msgphp/user-bundle.git",
|
||||
"reference": "0600cd6e40fd2e48263b2f63a6542dd2adf0fb5b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/msgphp/user-bundle/zipball/0600cd6e40fd2e48263b2f63a6542dd2adf0fb5b",
|
||||
"reference": "0600cd6e40fd2e48263b2f63a6542dd2adf0fb5b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"msgphp/user": "^0.2|^1.0",
|
||||
"symfony/config": "^3.4|^4.0",
|
||||
"symfony/dependency-injection": "^3.4|^4.0",
|
||||
"symfony/http-kernel": "^3.4|^4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/doctrine-bundle": "^1.8",
|
||||
"doctrine/orm": "^2.6",
|
||||
"simple-bus/symfony-bridge": "^5.1",
|
||||
"symfony/console": "^3.4|^4.0",
|
||||
"symfony/form": "^3.4|^4.0",
|
||||
"symfony/phpunit-bridge": "^3.4|^4.0",
|
||||
"symfony/security-bundle": "^3.4|^4.0",
|
||||
"symfony/twig-bundle": "^3.4|^4.0",
|
||||
"symfony/validator": "^3.4|^4.0",
|
||||
"symfony/var-dumper": "^3.4|^4.0"
|
||||
},
|
||||
"suggest": {
|
||||
"msgphp/eav-bundle": "To enable user attribute values"
|
||||
},
|
||||
"type": "symfony-bundle",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"MsgPhp\\UserBundle\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Roland Franssen",
|
||||
"email": "franssen.roland@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "User domain layer",
|
||||
"keywords": [
|
||||
"security",
|
||||
"user"
|
||||
],
|
||||
"time": "2018-03-17T14:03:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/browser-kit",
|
||||
"version": "v3.4.6",
|
||||
|
|
|
@ -16,4 +16,5 @@ return [
|
|||
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
|
||||
FOS\RestBundle\FOSRestBundle::class => ['all' => true],
|
||||
Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle::class => ['all' => true],
|
||||
MsgPhp\UserBundle\MsgPhpUserBundle::class => ['all' => true],
|
||||
];
|
||||
|
|
|
@ -18,6 +18,8 @@ doctrine:
|
|||
auto_generate_proxy_classes: '%kernel.debug%'
|
||||
naming_strategy: doctrine.orm.naming_strategy.underscore
|
||||
auto_mapping: true
|
||||
resolve_target_entities:
|
||||
MsgPhp\User\Entity\Username: "truc"
|
||||
mappings:
|
||||
App:
|
||||
is_bundle: false
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<?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,
|
||||
],
|
||||
] );
|
||||
};
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
namespace App\Entity\User;
|
||||
|
||||
use MsgPhp\User\Entity\User as BaseUser;
|
||||
use MsgPhp\User\UserIdInterface;
|
||||
|
||||
/**
|
||||
* @final
|
||||
*/
|
||||
class User extends BaseUser
|
||||
{
|
||||
private $id;
|
||||
|
||||
public function __construct(UserIdInterface $id)
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
public function getId(): UserIdInterface
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
}
|
|
@ -101,6 +101,21 @@
|
|||
"monolog/monolog": {
|
||||
"version": "1.23.0"
|
||||
},
|
||||
"msgphp/domain": {
|
||||
"version": "v0.2.3"
|
||||
},
|
||||
"msgphp/user": {
|
||||
"version": "v0.2.3"
|
||||
},
|
||||
"msgphp/user-bundle": {
|
||||
"version": "0.2",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes-contrib",
|
||||
"branch": "master",
|
||||
"version": "0.2",
|
||||
"ref": "467ccfceb0143c35ed852ccd8f1d03effb73afc4"
|
||||
}
|
||||
},
|
||||
"ocramius/proxy-manager": {
|
||||
"version": "2.0.4"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue