From 0aec2acc5ed173d3a2a4dcbec492c3105d9c5fab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fr=C3=A9mont?= Date: Sat, 3 Oct 2020 16:16:46 +0200 Subject: [PATCH 1/3] Register a new app user --- composer.json | 6 +- config/bundles.php | 2 - config/packages/api_platform.yaml | 4 +- config/packages/framework.yaml | 6 +- config/packages/monofony_fixtures.yaml | 2 + config/packages/monofony_fixtures_plugin.yaml | 2 - config/routes.yaml | 2 +- config/services/monofony_fixtures.yaml | 4 +- .../Bundle/ApiBundle/MonofonyApiBundle.php | 20 ----- .../Constraints/UniqueAppUserEmail.php | 25 ++++++ .../UniqueAppUserEmailValidator.php | 51 ++++++++++++ .../Recipe/translations/validators.en.yaml | 4 + .../Recipe/translations/validators.fr.yaml | 4 + .../ApiBundle => Pack/ApiPack}/LICENSE | 0 .../resources/register_app_user.yaml | 12 +++ .../ApiPack}/Recipe/config/routes/api.yaml | 0 .../Recipe/src/Message/RegisterAppUser.php | 77 +++++++++++++++++++ .../MessageHandler/RegisterAppUserHandler.php | 57 ++++++++++++++ .../Controller/AuthorizedHeaderTrait.php | 0 .../Controller/Customer/LoginApiTest.php | 0 .../Customer/RefreshTokenApiTest.php | 0 .../Customer/RegisterAppUserApiTest.php | 76 ++++++++++++++++++ .../tests/Controller/JsonApiTestCase.php | 0 .../DataFixtures/ORM/resources/fixtures.yaml | 0 .../authentication/new_access_token.json | 0 .../register_validation_response.json | 27 +++++++ .../unique_email_validation_response.json | 11 +++ .../Expected/error/not_found_response.json | 0 .../ApiBundle => Pack/ApiPack}/composer.json | 8 +- .../FixturesPack}/LICENSE | 0 .../config/packages/monofony_fixtures.yaml} | 0 .../Recipe/config/sylius/fixtures.yaml | 0 .../Installer/InstallSampleDataCommand.php | 0 .../src}/Fixture/AbstractResourceFixture.php | 7 +- .../Recipe/src/Fixture/AdminUserFixture.php | 1 - .../Recipe/src/Fixture/ApiClientFixture.php | 1 - .../Recipe/src/Fixture/AppUserFixture.php | 1 - .../Factory/AbstractExampleFactory.php | 7 +- .../Factory/AdminUserExampleFactory.php | 2 - .../Factory/ApiClientExampleFactory.php | 1 - .../Fixture/Factory/AppUserExampleFactory.php | 2 - .../Factory/ExampleFactoryInterface.php | 9 +-- .../Fixture/OptionsResolver/LazyOption.php | 0 .../FixturesPack}/composer.json | 1 - .../FixturesPlugin/MonofonyFixturesPlugin.php | 20 ----- symfony.lock | 2 +- 46 files changed, 377 insertions(+), 77 deletions(-) create mode 100644 config/packages/monofony_fixtures.yaml delete mode 100644 config/packages/monofony_fixtures_plugin.yaml delete mode 100644 src/Monofony/Bundle/ApiBundle/MonofonyApiBundle.php create mode 100644 src/Monofony/Bundle/CoreBundle/Recipe/src/Validator/Constraints/UniqueAppUserEmail.php create mode 100644 src/Monofony/Bundle/CoreBundle/Recipe/src/Validator/Constraints/UniqueAppUserEmailValidator.php create mode 100644 src/Monofony/Bundle/CoreBundle/Recipe/translations/validators.en.yaml create mode 100644 src/Monofony/Bundle/CoreBundle/Recipe/translations/validators.fr.yaml rename src/Monofony/{Bundle/ApiBundle => Pack/ApiPack}/LICENSE (100%) create mode 100644 src/Monofony/Pack/ApiPack/Recipe/config/api_platform/resources/register_app_user.yaml rename src/Monofony/{Bundle/ApiBundle => Pack/ApiPack}/Recipe/config/routes/api.yaml (100%) create mode 100644 src/Monofony/Pack/ApiPack/Recipe/src/Message/RegisterAppUser.php create mode 100644 src/Monofony/Pack/ApiPack/Recipe/src/MessageHandler/RegisterAppUserHandler.php rename src/Monofony/{Bundle/ApiBundle => Pack/ApiPack}/Recipe/tests/Controller/AuthorizedHeaderTrait.php (100%) rename src/Monofony/{Bundle/ApiBundle => Pack/ApiPack}/Recipe/tests/Controller/Customer/LoginApiTest.php (100%) rename src/Monofony/{Bundle/ApiBundle => Pack/ApiPack}/Recipe/tests/Controller/Customer/RefreshTokenApiTest.php (100%) create mode 100644 src/Monofony/Pack/ApiPack/Recipe/tests/Controller/Customer/RegisterAppUserApiTest.php rename src/Monofony/{Bundle/ApiBundle => Pack/ApiPack}/Recipe/tests/Controller/JsonApiTestCase.php (100%) rename src/Monofony/{Bundle/ApiBundle => Pack/ApiPack}/Recipe/tests/DataFixtures/ORM/resources/fixtures.yaml (100%) rename src/Monofony/{Bundle/ApiBundle => Pack/ApiPack}/Recipe/tests/Responses/Expected/authentication/new_access_token.json (100%) create mode 100644 src/Monofony/Pack/ApiPack/Recipe/tests/Responses/Expected/customer/register_validation_response.json create mode 100644 src/Monofony/Pack/ApiPack/Recipe/tests/Responses/Expected/customer/unique_email_validation_response.json rename src/Monofony/{Bundle/ApiBundle => Pack/ApiPack}/Recipe/tests/Responses/Expected/error/not_found_response.json (100%) rename src/Monofony/{Bundle/ApiBundle => Pack/ApiPack}/composer.json (59%) rename src/Monofony/{Plugin/FixturesPlugin => Pack/FixturesPack}/LICENSE (100%) rename src/Monofony/{Plugin/FixturesPlugin/Recipe/config/packages/monofony_fixtures_plugin.yaml => Pack/FixturesPack/Recipe/config/packages/monofony_fixtures.yaml} (100%) rename src/Monofony/{Plugin/FixturesPlugin => Pack/FixturesPack}/Recipe/config/sylius/fixtures.yaml (100%) rename src/Monofony/{Plugin/FixturesPlugin => Pack/FixturesPack}/Recipe/src/Command/Installer/InstallSampleDataCommand.php (100%) rename src/Monofony/{Plugin/FixturesPlugin => Pack/FixturesPack/Recipe/src}/Fixture/AbstractResourceFixture.php (95%) rename src/Monofony/{Plugin/FixturesPlugin => Pack/FixturesPack}/Recipe/src/Fixture/AdminUserFixture.php (94%) rename src/Monofony/{Plugin/FixturesPlugin => Pack/FixturesPack}/Recipe/src/Fixture/ApiClientFixture.php (93%) rename src/Monofony/{Plugin/FixturesPlugin => Pack/FixturesPack}/Recipe/src/Fixture/AppUserFixture.php (94%) rename src/Monofony/{Plugin/FixturesPlugin => Pack/FixturesPack/Recipe/src}/Fixture/Factory/AbstractExampleFactory.php (82%) rename src/Monofony/{Plugin/FixturesPlugin => Pack/FixturesPack}/Recipe/src/Fixture/Factory/AdminUserExampleFactory.php (94%) rename src/Monofony/{Plugin/FixturesPlugin => Pack/FixturesPack}/Recipe/src/Fixture/Factory/ApiClientExampleFactory.php (96%) rename src/Monofony/{Plugin/FixturesPlugin => Pack/FixturesPack}/Recipe/src/Fixture/Factory/AppUserExampleFactory.php (95%) rename src/Monofony/{Plugin/FixturesPlugin => Pack/FixturesPack/Recipe/src}/Fixture/Factory/ExampleFactoryInterface.php (75%) rename src/Monofony/{Plugin/FixturesPlugin => Pack/FixturesPack}/Recipe/src/Fixture/OptionsResolver/LazyOption.php (100%) rename src/Monofony/{Plugin/FixturesPlugin => Pack/FixturesPack}/composer.json (88%) delete mode 100644 src/Monofony/Plugin/FixturesPlugin/MonofonyFixturesPlugin.php diff --git a/composer.json b/composer.json index 30fffc81..0565ce20 100644 --- a/composer.json +++ b/composer.json @@ -13,11 +13,13 @@ "App\\Entity\\": "src/Monofony/Bundle/CoreBundle/Recipe/src/Entity/", "App\\EventListener\\": "src/Monofony/Bundle/CoreBundle/Recipe/src/EventListener/", "App\\EventSubscriber\\": "src/Monofony/Bundle/CoreBundle/Recipe/src/EventSubscriber/", - "App\\Fixture\\": "src/Monofony/Plugin/FixturesPlugin/Recipe/src/Fixture/", + "App\\Fixture\\": "src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/", "App\\Form\\": "src/Monofony/Bundle/CoreBundle/Recipe/src/Form/", "App\\Formatter\\": "src/Monofony/Bundle/CoreBundle/Recipe/src/Formatter/", "App\\Installer\\": "src/Monofony/Bundle/CoreBundle/Recipe/src/Installer/", "App\\Installer\\Checker\\": "src/Monofony/Bundle/CoreBundle/Recipe/src/Installer/Checker/", + "App\\Message\\": "src/Monofony/Pack/ApiPack/Recipe/src/Message/", + "App\\MessageHandler\\": "src/Monofony/Pack/ApiPack/Recipe/src/MessageHandler/", "App\\Migrations\\": "src/Monofony/Bundle/CoreBundle/Recipe/src/Migrations/", "App\\Repository\\": "src/Monofony/Bundle/CoreBundle/Recipe/src/Repository/", "App\\Validator\\": "src/Monofony/Bundle/CoreBundle/Recipe/src/Validator/", @@ -48,7 +50,7 @@ "App\\Tests\\Behat\\Exception\\": "src/Monofony/Bundle/CoreBundle/Recipe/tests/Behat/Exception/", "App\\Tests\\Behat\\Page\\Frontend\\": "src/Monofony/Bundle/FrontBundle/Recipe/tests/Behat/Page/Frontend/", "App\\Tests\\Behat\\Service\\": "src/Monofony/Bundle/CoreBundle/Recipe/tests/Behat/Service/", - "App\\Tests\\Controller\\": "src/Monofony/Bundle/ApiBundle/Recipe/tests/Controller/" + "App\\Tests\\Controller\\": "src/Monofony/Pack/ApiPack/Recipe/tests/Controller/" } }, "require": { diff --git a/config/bundles.php b/config/bundles.php index 3fca1b24..f5fb92c8 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -44,6 +44,4 @@ Monofony\Bundle\CoreBundle\MonofonyCoreBundle::class => ['all' => true], Monofony\Bundle\AdminBundle\MonofonyAdminBundle::class => ['all' => true], Monofony\Bundle\FrontBundle\MonofonyFrontBundle::class => ['all' => true], - Monofony\Bundle\ApiBundle\MonofonyApiBundle::class => ['all' => true], - Monofony\Plugin\FixturesPlugin\MonofonyFixturesPlugin::class => ['all' => true], ]; diff --git a/config/packages/api_platform.yaml b/config/packages/api_platform.yaml index 23f6d32e..0ee2b00d 100644 --- a/config/packages/api_platform.yaml +++ b/config/packages/api_platform.yaml @@ -1,7 +1,9 @@ api_platform: version: !php/const App\Kernel::VERSION mapping: - paths: ['%kernel.project_dir%/src/Monofony/Bundle/CoreBundle/Recipe/src/Entity'] + paths: + - '%kernel.project_dir%/src/Monofony/Bundle/CoreBundle/Recipe/src/Entity' + - '%kernel.project_dir%/src/Monofony/Pack/ApiPack/Recipe/config/api_platform/resources' patch_formats: json: ['application/merge-patch+json'] swagger: diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml index ac02ccfd..c1754ac3 100644 --- a/config/packages/framework.yaml +++ b/config/packages/framework.yaml @@ -1,6 +1,9 @@ framework: #esi: ~ - translator: { fallbacks: ["%locale%"] } + translator: + fallbacks: ["%locale%"] + paths: + - '%kernel.project_dir%/src/Monofony/Bundle/CoreBundle/Recipe/translations' secret: '%env(APP_SECRET)%' form: ~ csrf_protection: ~ @@ -17,3 +20,4 @@ framework: http_method_override: true php_errors: log: true + diff --git a/config/packages/monofony_fixtures.yaml b/config/packages/monofony_fixtures.yaml new file mode 100644 index 00000000..ca2fdd99 --- /dev/null +++ b/config/packages/monofony_fixtures.yaml @@ -0,0 +1,2 @@ +imports: + - { resource: "../../src/Monofony/Pack/FixturesPack/Recipe/config/packages/monofony_fixtures.yaml" } diff --git a/config/packages/monofony_fixtures_plugin.yaml b/config/packages/monofony_fixtures_plugin.yaml deleted file mode 100644 index 9061cffc..00000000 --- a/config/packages/monofony_fixtures_plugin.yaml +++ /dev/null @@ -1,2 +0,0 @@ -imports: - - { resource: "../../src/Monofony/Plugin/FixturesPlugin/Recipe/config/packages/monofony_fixtures_plugin.yaml" } diff --git a/config/routes.yaml b/config/routes.yaml index d46f489f..ae2fa896 100644 --- a/config/routes.yaml +++ b/config/routes.yaml @@ -5,4 +5,4 @@ app_frontend: resource: "../src/Monofony/Bundle/FrontBundle/Recipe/config/routes/frontend.yaml" app_api: - resource: "../src/Monofony/Bundle/ApiBundle/Recipe/config/routes/api.yaml" + resource: "../src/Monofony/Pack/ApiPack/Recipe/config/routes/api.yaml" diff --git a/config/services/monofony_fixtures.yaml b/config/services/monofony_fixtures.yaml index 0580d227..99350737 100644 --- a/config/services/monofony_fixtures.yaml +++ b/config/services/monofony_fixtures.yaml @@ -8,5 +8,5 @@ services: app_fixture: namespace: App\ - resource: '../../src/Monofony/Plugin/FixturesPlugin/Recipe/src/*' - exclude: '../../src/Monofony/Plugin/FixturesPlugin/Recipe/src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}' + resource: '../../src/Monofony/Pack/FixturesPack/Recipe/src/*' + exclude: '../../src/Monofony/Pack/FixturesPack/Recipe/src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}' diff --git a/src/Monofony/Bundle/ApiBundle/MonofonyApiBundle.php b/src/Monofony/Bundle/ApiBundle/MonofonyApiBundle.php deleted file mode 100644 index 348ab299..00000000 --- a/src/Monofony/Bundle/ApiBundle/MonofonyApiBundle.php +++ /dev/null @@ -1,20 +0,0 @@ -canonicalizer = $canonicalizer; + $this->appUserRepository = $appUserRepository; + } + + public function validate($value, Constraint $constraint): void + { + if (null === $value) { + return; + } + + /* @var UniqueAppUserEmail $constraint */ + Assert::isInstanceOf($constraint, UniqueAppUserEmail::class); + + $emailCanonical = $this->canonicalizer->canonicalize($value); + $shopUser = $this->appUserRepository->findOneByEmail($emailCanonical); + + if (null === $shopUser) { + return; + } + + $this->context->addViolation($constraint->message); + } +} diff --git a/src/Monofony/Bundle/CoreBundle/Recipe/translations/validators.en.yaml b/src/Monofony/Bundle/CoreBundle/Recipe/translations/validators.en.yaml new file mode 100644 index 00000000..5408c41d --- /dev/null +++ b/src/Monofony/Bundle/CoreBundle/Recipe/translations/validators.en.yaml @@ -0,0 +1,4 @@ +sylius: + user: + email: + unique: This email is already used. diff --git a/src/Monofony/Bundle/CoreBundle/Recipe/translations/validators.fr.yaml b/src/Monofony/Bundle/CoreBundle/Recipe/translations/validators.fr.yaml new file mode 100644 index 00000000..de18479d --- /dev/null +++ b/src/Monofony/Bundle/CoreBundle/Recipe/translations/validators.fr.yaml @@ -0,0 +1,4 @@ +sylius: + user: + email: + unique: Cet e-mail est déjà utilisé. diff --git a/src/Monofony/Bundle/ApiBundle/LICENSE b/src/Monofony/Pack/ApiPack/LICENSE similarity index 100% rename from src/Monofony/Bundle/ApiBundle/LICENSE rename to src/Monofony/Pack/ApiPack/LICENSE diff --git a/src/Monofony/Pack/ApiPack/Recipe/config/api_platform/resources/register_app_user.yaml b/src/Monofony/Pack/ApiPack/Recipe/config/api_platform/resources/register_app_user.yaml new file mode 100644 index 00000000..55113b16 --- /dev/null +++ b/src/Monofony/Pack/ApiPack/Recipe/config/api_platform/resources/register_app_user.yaml @@ -0,0 +1,12 @@ +App\Message\RegisterAppUser: + attributes: + messenger: true + output: false + validation_groups: ["Default", "sylius"] + itemOperations: [] + collectionOperations: + post: + path: /register + openapi_context: + summary: Registers an app user + validation_groups: ["Default", "sylius"] diff --git a/src/Monofony/Bundle/ApiBundle/Recipe/config/routes/api.yaml b/src/Monofony/Pack/ApiPack/Recipe/config/routes/api.yaml similarity index 100% rename from src/Monofony/Bundle/ApiBundle/Recipe/config/routes/api.yaml rename to src/Monofony/Pack/ApiPack/Recipe/config/routes/api.yaml diff --git a/src/Monofony/Pack/ApiPack/Recipe/src/Message/RegisterAppUser.php b/src/Monofony/Pack/ApiPack/Recipe/src/Message/RegisterAppUser.php new file mode 100644 index 00000000..ecf965dd --- /dev/null +++ b/src/Monofony/Pack/ApiPack/Recipe/src/Message/RegisterAppUser.php @@ -0,0 +1,77 @@ +firstName = $firstName; + $this->lastName = $lastName; + $this->email = $email; + $this->password = $password; + $this->phoneNumber = $phoneNumber; + } +} diff --git a/src/Monofony/Pack/ApiPack/Recipe/src/MessageHandler/RegisterAppUserHandler.php b/src/Monofony/Pack/ApiPack/Recipe/src/MessageHandler/RegisterAppUserHandler.php new file mode 100644 index 00000000..b2d52326 --- /dev/null +++ b/src/Monofony/Pack/ApiPack/Recipe/src/MessageHandler/RegisterAppUserHandler.php @@ -0,0 +1,57 @@ +appUserFactory = $appUserFactory; + $this->appUserRepository = $appUserRepository; + $this->customerProvider = $customerProvider; + } + + public function __invoke(RegisterAppUser $command): void + { + /** @var AppUserInterface $user */ + $user = $this->appUserFactory->createNew(); + $user->setPlainPassword($command->password); + + $customer = $this->customerProvider->provide($command->email); + if ($customer->getUser() !== null) { + throw new \DomainException(sprintf('User with email "%s" is already registered.', $command->email)); + } + + $customer->setFirstName($command->firstName); + $customer->setLastName($command->lastName); + $customer->setPhoneNumber($command->phoneNumber); + $customer->setUser($user); + + $this->appUserRepository->add($user); + } +} diff --git a/src/Monofony/Bundle/ApiBundle/Recipe/tests/Controller/AuthorizedHeaderTrait.php b/src/Monofony/Pack/ApiPack/Recipe/tests/Controller/AuthorizedHeaderTrait.php similarity index 100% rename from src/Monofony/Bundle/ApiBundle/Recipe/tests/Controller/AuthorizedHeaderTrait.php rename to src/Monofony/Pack/ApiPack/Recipe/tests/Controller/AuthorizedHeaderTrait.php diff --git a/src/Monofony/Bundle/ApiBundle/Recipe/tests/Controller/Customer/LoginApiTest.php b/src/Monofony/Pack/ApiPack/Recipe/tests/Controller/Customer/LoginApiTest.php similarity index 100% rename from src/Monofony/Bundle/ApiBundle/Recipe/tests/Controller/Customer/LoginApiTest.php rename to src/Monofony/Pack/ApiPack/Recipe/tests/Controller/Customer/LoginApiTest.php diff --git a/src/Monofony/Bundle/ApiBundle/Recipe/tests/Controller/Customer/RefreshTokenApiTest.php b/src/Monofony/Pack/ApiPack/Recipe/tests/Controller/Customer/RefreshTokenApiTest.php similarity index 100% rename from src/Monofony/Bundle/ApiBundle/Recipe/tests/Controller/Customer/RefreshTokenApiTest.php rename to src/Monofony/Pack/ApiPack/Recipe/tests/Controller/Customer/RefreshTokenApiTest.php diff --git a/src/Monofony/Pack/ApiPack/Recipe/tests/Controller/Customer/RegisterAppUserApiTest.php b/src/Monofony/Pack/ApiPack/Recipe/tests/Controller/Customer/RegisterAppUserApiTest.php new file mode 100644 index 00000000..b3f2e932 --- /dev/null +++ b/src/Monofony/Pack/ApiPack/Recipe/tests/Controller/Customer/RegisterAppUserApiTest.php @@ -0,0 +1,76 @@ +client->request('POST', '/api/register', [], [], ['CONTENT_TYPE' => 'application/json'], $data); + + $response = $this->client->getResponse(); + $this->assertResponse($response, 'customer/register_validation_response', Response::HTTP_BAD_REQUEST); + } + + /** + * @test + */ + public function it_does_not_allow_to_register_an_already_registered_user() + { + $this->loadFixturesFromFile('resources/fixtures.yaml'); + + $data = + <<client->request('POST', '/api/register', [], [], ['CONTENT_TYPE' => 'application/json'], $data); + + $response = $this->client->getResponse(); + $this->assertResponse($response, 'customer/unique_email_validation_response', Response::HTTP_BAD_REQUEST); + } + + /** + * @test + */ + public function it_allows_to_register_an_app_user() + { + $data = + <<client->request('POST', '/api/register', [], [], ['CONTENT_TYPE' => 'application/json'], $data); + + $response = $this->client->getResponse(); + $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); + } +} diff --git a/src/Monofony/Bundle/ApiBundle/Recipe/tests/Controller/JsonApiTestCase.php b/src/Monofony/Pack/ApiPack/Recipe/tests/Controller/JsonApiTestCase.php similarity index 100% rename from src/Monofony/Bundle/ApiBundle/Recipe/tests/Controller/JsonApiTestCase.php rename to src/Monofony/Pack/ApiPack/Recipe/tests/Controller/JsonApiTestCase.php diff --git a/src/Monofony/Bundle/ApiBundle/Recipe/tests/DataFixtures/ORM/resources/fixtures.yaml b/src/Monofony/Pack/ApiPack/Recipe/tests/DataFixtures/ORM/resources/fixtures.yaml similarity index 100% rename from src/Monofony/Bundle/ApiBundle/Recipe/tests/DataFixtures/ORM/resources/fixtures.yaml rename to src/Monofony/Pack/ApiPack/Recipe/tests/DataFixtures/ORM/resources/fixtures.yaml diff --git a/src/Monofony/Bundle/ApiBundle/Recipe/tests/Responses/Expected/authentication/new_access_token.json b/src/Monofony/Pack/ApiPack/Recipe/tests/Responses/Expected/authentication/new_access_token.json similarity index 100% rename from src/Monofony/Bundle/ApiBundle/Recipe/tests/Responses/Expected/authentication/new_access_token.json rename to src/Monofony/Pack/ApiPack/Recipe/tests/Responses/Expected/authentication/new_access_token.json diff --git a/src/Monofony/Pack/ApiPack/Recipe/tests/Responses/Expected/customer/register_validation_response.json b/src/Monofony/Pack/ApiPack/Recipe/tests/Responses/Expected/customer/register_validation_response.json new file mode 100644 index 00000000..b0c80748 --- /dev/null +++ b/src/Monofony/Pack/ApiPack/Recipe/tests/Responses/Expected/customer/register_validation_response.json @@ -0,0 +1,27 @@ +{ + "type": "https://tools.ietf.org/html/rfc2616#section-10", + "title": "An error occurred", + "detail": "firstName: Please enter your first name.\nlastName: Please enter your last name.\nemail: Please enter your email.\npassword: Please enter your password.\npassword: Password must be at least 4 characters long.", + "violations": [ + { + "propertyPath": "firstName", + "message": "Please enter your first name." + }, + { + "propertyPath": "lastName", + "message": "Please enter your last name." + }, + { + "propertyPath": "email", + "message": "Please enter your email." + }, + { + "propertyPath": "password", + "message": "Please enter your password." + }, + { + "propertyPath": "password", + "message": "Password must be at least 4 characters long." + } + ] +} diff --git a/src/Monofony/Pack/ApiPack/Recipe/tests/Responses/Expected/customer/unique_email_validation_response.json b/src/Monofony/Pack/ApiPack/Recipe/tests/Responses/Expected/customer/unique_email_validation_response.json new file mode 100644 index 00000000..879f1748 --- /dev/null +++ b/src/Monofony/Pack/ApiPack/Recipe/tests/Responses/Expected/customer/unique_email_validation_response.json @@ -0,0 +1,11 @@ +{ + "type": "https://tools.ietf.org/html/rfc2616#section-10", + "title": "An error occurred", + "detail": "email: This email is already used.", + "violations": [ + { + "propertyPath": "email", + "message": "This email is already used." + } + ] +} diff --git a/src/Monofony/Bundle/ApiBundle/Recipe/tests/Responses/Expected/error/not_found_response.json b/src/Monofony/Pack/ApiPack/Recipe/tests/Responses/Expected/error/not_found_response.json similarity index 100% rename from src/Monofony/Bundle/ApiBundle/Recipe/tests/Responses/Expected/error/not_found_response.json rename to src/Monofony/Pack/ApiPack/Recipe/tests/Responses/Expected/error/not_found_response.json diff --git a/src/Monofony/Bundle/ApiBundle/composer.json b/src/Monofony/Pack/ApiPack/composer.json similarity index 59% rename from src/Monofony/Bundle/ApiBundle/composer.json rename to src/Monofony/Pack/ApiPack/composer.json index 4d1640a7..d9d0fedb 100644 --- a/src/Monofony/Bundle/ApiBundle/composer.json +++ b/src/Monofony/Pack/ApiPack/composer.json @@ -1,19 +1,15 @@ { - "name": "monofony/api-bundle", + "name": "monofony/api-pack", "type": "symfony-bundle", - "description": "Monofony API bundle.", + "description": "A pack for Monofony.", "license": "MIT", "require": { - "php": "^7.2", "api-platform/api-pack": "^1.2", "monofony/core-bundle": "^0.3" }, "autoload": { - "psr-4": { "Monofony\\Bundle\\ApiBundle\\": "" }, "exclude-from-classmap": ["Recipe/"] }, - "minimum-stability": "dev", - "prefer-stable": true, "extra": { "branch-alias": { "dev-master": "0.3-dev" diff --git a/src/Monofony/Plugin/FixturesPlugin/LICENSE b/src/Monofony/Pack/FixturesPack/LICENSE similarity index 100% rename from src/Monofony/Plugin/FixturesPlugin/LICENSE rename to src/Monofony/Pack/FixturesPack/LICENSE diff --git a/src/Monofony/Plugin/FixturesPlugin/Recipe/config/packages/monofony_fixtures_plugin.yaml b/src/Monofony/Pack/FixturesPack/Recipe/config/packages/monofony_fixtures.yaml similarity index 100% rename from src/Monofony/Plugin/FixturesPlugin/Recipe/config/packages/monofony_fixtures_plugin.yaml rename to src/Monofony/Pack/FixturesPack/Recipe/config/packages/monofony_fixtures.yaml diff --git a/src/Monofony/Plugin/FixturesPlugin/Recipe/config/sylius/fixtures.yaml b/src/Monofony/Pack/FixturesPack/Recipe/config/sylius/fixtures.yaml similarity index 100% rename from src/Monofony/Plugin/FixturesPlugin/Recipe/config/sylius/fixtures.yaml rename to src/Monofony/Pack/FixturesPack/Recipe/config/sylius/fixtures.yaml diff --git a/src/Monofony/Plugin/FixturesPlugin/Recipe/src/Command/Installer/InstallSampleDataCommand.php b/src/Monofony/Pack/FixturesPack/Recipe/src/Command/Installer/InstallSampleDataCommand.php similarity index 100% rename from src/Monofony/Plugin/FixturesPlugin/Recipe/src/Command/Installer/InstallSampleDataCommand.php rename to src/Monofony/Pack/FixturesPack/Recipe/src/Command/Installer/InstallSampleDataCommand.php diff --git a/src/Monofony/Plugin/FixturesPlugin/Fixture/AbstractResourceFixture.php b/src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/AbstractResourceFixture.php similarity index 95% rename from src/Monofony/Plugin/FixturesPlugin/Fixture/AbstractResourceFixture.php rename to src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/AbstractResourceFixture.php index 18e44641..799726e4 100644 --- a/src/Monofony/Plugin/FixturesPlugin/Fixture/AbstractResourceFixture.php +++ b/src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/AbstractResourceFixture.php @@ -11,16 +11,19 @@ declare(strict_types=1); -namespace Monofony\Plugin\FixturesPlugin\Fixture; +namespace App\Fixture; +use App\Fixture\Factory\ExampleFactoryInterface; use Doctrine\Common\Persistence\ObjectManager; -use Monofony\Plugin\FixturesPlugin\Fixture\Factory\ExampleFactoryInterface; use Sylius\Bundle\FixturesBundle\Fixture\FixtureInterface; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; +/** + * Remove when Sylius fixtures bundle will include this. + */ abstract class AbstractResourceFixture implements FixtureInterface { /** diff --git a/src/Monofony/Plugin/FixturesPlugin/Recipe/src/Fixture/AdminUserFixture.php b/src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/AdminUserFixture.php similarity index 94% rename from src/Monofony/Plugin/FixturesPlugin/Recipe/src/Fixture/AdminUserFixture.php rename to src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/AdminUserFixture.php index 99d1ac76..bad0f657 100644 --- a/src/Monofony/Plugin/FixturesPlugin/Recipe/src/Fixture/AdminUserFixture.php +++ b/src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/AdminUserFixture.php @@ -6,7 +6,6 @@ use App\Fixture\Factory\AdminUserExampleFactory; use Doctrine\Common\Persistence\ObjectManager; -use Monofony\Plugin\FixturesPlugin\Fixture\AbstractResourceFixture; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; class AdminUserFixture extends AbstractResourceFixture diff --git a/src/Monofony/Plugin/FixturesPlugin/Recipe/src/Fixture/ApiClientFixture.php b/src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/ApiClientFixture.php similarity index 93% rename from src/Monofony/Plugin/FixturesPlugin/Recipe/src/Fixture/ApiClientFixture.php rename to src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/ApiClientFixture.php index 67c0763d..30f313af 100644 --- a/src/Monofony/Plugin/FixturesPlugin/Recipe/src/Fixture/ApiClientFixture.php +++ b/src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/ApiClientFixture.php @@ -6,7 +6,6 @@ use App\Fixture\Factory\ApiClientExampleFactory; use Doctrine\Common\Persistence\ObjectManager; -use Monofony\Plugin\FixturesPlugin\Fixture\AbstractResourceFixture; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; class ApiClientFixture extends AbstractResourceFixture diff --git a/src/Monofony/Plugin/FixturesPlugin/Recipe/src/Fixture/AppUserFixture.php b/src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/AppUserFixture.php similarity index 94% rename from src/Monofony/Plugin/FixturesPlugin/Recipe/src/Fixture/AppUserFixture.php rename to src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/AppUserFixture.php index 5e9b8d42..bd40c360 100644 --- a/src/Monofony/Plugin/FixturesPlugin/Recipe/src/Fixture/AppUserFixture.php +++ b/src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/AppUserFixture.php @@ -6,7 +6,6 @@ use App\Fixture\Factory\AppUserExampleFactory; use Doctrine\Common\Persistence\ObjectManager; -use Monofony\Plugin\FixturesPlugin\Fixture\AbstractResourceFixture; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; class AppUserFixture extends AbstractResourceFixture diff --git a/src/Monofony/Plugin/FixturesPlugin/Fixture/Factory/AbstractExampleFactory.php b/src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/Factory/AbstractExampleFactory.php similarity index 82% rename from src/Monofony/Plugin/FixturesPlugin/Fixture/Factory/AbstractExampleFactory.php rename to src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/Factory/AbstractExampleFactory.php index 90070563..6ac6015b 100644 --- a/src/Monofony/Plugin/FixturesPlugin/Fixture/Factory/AbstractExampleFactory.php +++ b/src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/Factory/AbstractExampleFactory.php @@ -11,13 +11,14 @@ declare(strict_types=1); -namespace Monofony\Plugin\FixturesPlugin\Fixture\Factory; +namespace App\Fixture\Factory; use Symfony\Component\OptionsResolver\OptionsResolver; +/** + * Remove when Sylius fixtures bundle will include this. + */ abstract class AbstractExampleFactory implements ExampleFactoryInterface { - /** - */ abstract protected function configureOptions(OptionsResolver $resolver): void; } diff --git a/src/Monofony/Plugin/FixturesPlugin/Recipe/src/Fixture/Factory/AdminUserExampleFactory.php b/src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/Factory/AdminUserExampleFactory.php similarity index 94% rename from src/Monofony/Plugin/FixturesPlugin/Recipe/src/Fixture/Factory/AdminUserExampleFactory.php rename to src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/Factory/AdminUserExampleFactory.php index e69c1887..b536ecd0 100644 --- a/src/Monofony/Plugin/FixturesPlugin/Recipe/src/Fixture/Factory/AdminUserExampleFactory.php +++ b/src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/Factory/AdminUserExampleFactory.php @@ -5,8 +5,6 @@ namespace App\Fixture\Factory; use Monofony\Component\Core\Model\User\AdminUserInterface; -use Monofony\Plugin\FixturesPlugin\Fixture\Factory\AbstractExampleFactory; -use Monofony\Plugin\FixturesPlugin\Fixture\Factory\ExampleFactoryInterface; use Sylius\Component\Resource\Factory\FactoryInterface; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; diff --git a/src/Monofony/Plugin/FixturesPlugin/Recipe/src/Fixture/Factory/ApiClientExampleFactory.php b/src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/Factory/ApiClientExampleFactory.php similarity index 96% rename from src/Monofony/Plugin/FixturesPlugin/Recipe/src/Fixture/Factory/ApiClientExampleFactory.php rename to src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/Factory/ApiClientExampleFactory.php index b911c491..37478cac 100644 --- a/src/Monofony/Plugin/FixturesPlugin/Recipe/src/Fixture/Factory/ApiClientExampleFactory.php +++ b/src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/Factory/ApiClientExampleFactory.php @@ -6,7 +6,6 @@ use FOS\OAuthServerBundle\Model\ClientInterface; use FOS\OAuthServerBundle\Model\ClientManagerInterface; -use Monofony\Plugin\FixturesPlugin\Fixture\Factory\AbstractExampleFactory; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; diff --git a/src/Monofony/Plugin/FixturesPlugin/Recipe/src/Fixture/Factory/AppUserExampleFactory.php b/src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/Factory/AppUserExampleFactory.php similarity index 95% rename from src/Monofony/Plugin/FixturesPlugin/Recipe/src/Fixture/Factory/AppUserExampleFactory.php rename to src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/Factory/AppUserExampleFactory.php index e3ffd31f..98812393 100644 --- a/src/Monofony/Plugin/FixturesPlugin/Recipe/src/Fixture/Factory/AppUserExampleFactory.php +++ b/src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/Factory/AppUserExampleFactory.php @@ -6,8 +6,6 @@ use Monofony\Component\Core\Model\User\AppUserInterface; use Monofony\Component\Core\Model\Customer\CustomerInterface; -use Monofony\Plugin\FixturesPlugin\Fixture\Factory\AbstractExampleFactory; -use Monofony\Plugin\FixturesPlugin\Fixture\Factory\ExampleFactoryInterface; use Sylius\Component\Resource\Factory\FactoryInterface; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; diff --git a/src/Monofony/Plugin/FixturesPlugin/Fixture/Factory/ExampleFactoryInterface.php b/src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/Factory/ExampleFactoryInterface.php similarity index 75% rename from src/Monofony/Plugin/FixturesPlugin/Fixture/Factory/ExampleFactoryInterface.php rename to src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/Factory/ExampleFactoryInterface.php index 0f206377..ce60241d 100644 --- a/src/Monofony/Plugin/FixturesPlugin/Fixture/Factory/ExampleFactoryInterface.php +++ b/src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/Factory/ExampleFactoryInterface.php @@ -11,13 +11,12 @@ declare(strict_types=1); -namespace Monofony\Plugin\FixturesPlugin\Fixture\Factory; +namespace App\Fixture\Factory; +/** + * Remove when Sylius fixtures bundle will include this. + */ interface ExampleFactoryInterface { - /** - * - * @return object - */ public function create(array $options = []); } diff --git a/src/Monofony/Plugin/FixturesPlugin/Recipe/src/Fixture/OptionsResolver/LazyOption.php b/src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/OptionsResolver/LazyOption.php similarity index 100% rename from src/Monofony/Plugin/FixturesPlugin/Recipe/src/Fixture/OptionsResolver/LazyOption.php rename to src/Monofony/Pack/FixturesPack/Recipe/src/Fixture/OptionsResolver/LazyOption.php diff --git a/src/Monofony/Plugin/FixturesPlugin/composer.json b/src/Monofony/Pack/FixturesPack/composer.json similarity index 88% rename from src/Monofony/Plugin/FixturesPlugin/composer.json rename to src/Monofony/Pack/FixturesPack/composer.json index 0fa70e9a..6a2a68d7 100644 --- a/src/Monofony/Plugin/FixturesPlugin/composer.json +++ b/src/Monofony/Pack/FixturesPack/composer.json @@ -9,7 +9,6 @@ "sylius/fixtures-bundle": "^1.4" }, "autoload": { - "psr-4": { "Monofony\\Plugin\\FixturesPlugin\\": "" }, "exclude-from-classmap": ["Recipe/"] }, "minimum-stability": "dev", diff --git a/src/Monofony/Plugin/FixturesPlugin/MonofonyFixturesPlugin.php b/src/Monofony/Plugin/FixturesPlugin/MonofonyFixturesPlugin.php deleted file mode 100644 index 8d4511b2..00000000 --- a/src/Monofony/Plugin/FixturesPlugin/MonofonyFixturesPlugin.php +++ /dev/null @@ -1,20 +0,0 @@ - Date: Sat, 3 Oct 2020 16:20:54 +0200 Subject: [PATCH 2/3] Set symfony-pack on composer.json --- src/Monofony/Pack/ApiPack/composer.json | 2 +- src/Monofony/Pack/FixturesPack/composer.json | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Monofony/Pack/ApiPack/composer.json b/src/Monofony/Pack/ApiPack/composer.json index d9d0fedb..b6eb1e90 100644 --- a/src/Monofony/Pack/ApiPack/composer.json +++ b/src/Monofony/Pack/ApiPack/composer.json @@ -1,6 +1,6 @@ { "name": "monofony/api-pack", - "type": "symfony-bundle", + "type": "symfony-pack", "description": "A pack for Monofony.", "license": "MIT", "require": { diff --git a/src/Monofony/Pack/FixturesPack/composer.json b/src/Monofony/Pack/FixturesPack/composer.json index 6a2a68d7..2e8930e2 100644 --- a/src/Monofony/Pack/FixturesPack/composer.json +++ b/src/Monofony/Pack/FixturesPack/composer.json @@ -1,7 +1,7 @@ { - "name": "monofony/fixtures-plugin", - "type": "symfony-bundle", - "description": "Monofony fixtures plugin.", + "name": "monofony/fixtures-pack", + "type": "symfony-pack", + "description": "A pack for Monofony.", "license": "MIT", "require": { "php": "^7.2", @@ -11,8 +11,6 @@ "autoload": { "exclude-from-classmap": ["Recipe/"] }, - "minimum-stability": "dev", - "prefer-stable": true, "extra": { "branch-alias": { "dev-master": "0.3-dev" From f3c103533633a18779c9723e30ee12e11ab7abbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fr=C3=A9mont?= Date: Sat, 3 Oct 2020 16:28:37 +0200 Subject: [PATCH 3/3] Fix infection --- .env | 7 +++ composer.json | 1 + composer.lock | 78 ++++++++++++++++++++++++- config/packages/messenger.yaml | 14 +++++ infection.json.dist | 3 +- src/Monofony/Pack/ApiPack/composer.json | 3 +- symfony.lock | 12 ++++ 7 files changed, 115 insertions(+), 3 deletions(-) create mode 100644 config/packages/messenger.yaml diff --git a/.env b/.env index e4e99364..d3e0ae90 100644 --- a/.env +++ b/.env @@ -36,3 +36,10 @@ MAILER_URL=null://localhost ###> nelmio/cors-bundle ### CORS_ALLOW_ORIGIN=^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$ ###< nelmio/cors-bundle ### + +###> symfony/messenger ### +# Choose one of the transports below +# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages +# MESSENGER_TRANSPORT_DSN=doctrine://default +# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages +###< symfony/messenger ### diff --git a/composer.json b/composer.json index 0565ce20..d327960d 100644 --- a/composer.json +++ b/composer.json @@ -78,6 +78,7 @@ "sylius/user-bundle": "^1.6", "symfony/dotenv": "4.4.*", "symfony/flex": "^1.2", + "symfony/messenger": "4.4.*", "symfony/monolog-bundle": "^3.3", "symfony/polyfill-php80": "^1.15", "symfony/proxy-manager-bridge": "4.4.*", diff --git a/composer.lock b/composer.lock index 32b61018..6e224059 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4db85bbfc82869fbba05b9fb2eedff84", + "content-hash": "8edc2ee118e494e8c3af4037c86a5f66", "packages": [ { "name": "api-platform/api-pack", @@ -7035,6 +7035,81 @@ ], "time": "2020-01-30T15:14:06+00:00" }, + { + "name": "symfony/messenger", + "version": "v4.4.14", + "source": { + "type": "git", + "url": "https://github.com/symfony/messenger.git", + "reference": "d2485efcbbf2601eafce2f5d7804903ebd7b2483" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/messenger/zipball/d2485efcbbf2601eafce2f5d7804903ebd7b2483", + "reference": "d2485efcbbf2601eafce2f5d7804903ebd7b2483", + "shasum": "" + }, + "require": { + "php": ">=7.1.3", + "psr/log": "~1.0", + "symfony/polyfill-php80": "^1.15" + }, + "conflict": { + "doctrine/persistence": "<1.3", + "symfony/event-dispatcher": "<4.3", + "symfony/framework-bundle": "<4.4", + "symfony/http-kernel": "<4.4" + }, + "require-dev": { + "doctrine/dbal": "^2.6|^3.0", + "doctrine/persistence": "^1.3|^2", + "psr/cache": "~1.0", + "symfony/console": "^3.4|^4.0|^5.0", + "symfony/dependency-injection": "^3.4.19|^4.1.8|^5.0", + "symfony/event-dispatcher": "^4.3|^5.0", + "symfony/http-kernel": "^4.4", + "symfony/process": "^3.4|^4.0|^5.0", + "symfony/property-access": "^3.4|^4.0|^5.0", + "symfony/serializer": "^3.4|^4.0|^5.0", + "symfony/service-contracts": "^1.1|^2", + "symfony/stopwatch": "^3.4|^4.0|^5.0", + "symfony/validator": "^3.4|^4.0|^5.0" + }, + "suggest": { + "enqueue/messenger-adapter": "For using the php-enqueue library as a transport." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Messenger\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Samuel Roze", + "email": "samuel.roze@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Messenger Component", + "homepage": "https://symfony.com", + "time": "2020-09-24T06:54:33+00:00" + }, { "name": "symfony/mime", "version": "v4.4.4", @@ -9336,6 +9411,7 @@ "i18n", "text" ], + "abandoned": true, "time": "2018-12-05T18:34:18+00:00" }, { diff --git a/config/packages/messenger.yaml b/config/packages/messenger.yaml new file mode 100644 index 00000000..6b7319ce --- /dev/null +++ b/config/packages/messenger.yaml @@ -0,0 +1,14 @@ +framework: + messenger: + # Uncomment this (and the failed transport below) to send failed messages to this transport for later handling. + # failure_transport: failed + + transports: + # https://symfony.com/doc/current/messenger.html#transport-configuration + # async: '%env(MESSENGER_TRANSPORT_DSN)%' + # failed: 'doctrine://default?queue_name=failed' + # sync: 'sync://' + + routing: + # Route your messages to the transports + # 'App\Message\YourMessage': async diff --git a/infection.json.dist b/infection.json.dist index 93ffc1c2..d7ca31ea 100644 --- a/infection.json.dist +++ b/infection.json.dist @@ -5,7 +5,8 @@ "src/Monofony/Bundle/CoreBundle/Recipe/src", "src/Admin/recipe/src", "src/Monofony/Bundle/FrontBundle/Recipe/src", - "src/Monofony/Plugin/FixturesPlugin/Recipe/src" + "src/Monofony/Pack/FixturesPack/Recipe/src", + "src/Monofony/Pack/ApiPack/Recipe/src" ], "excludes": [ "Command", diff --git a/src/Monofony/Pack/ApiPack/composer.json b/src/Monofony/Pack/ApiPack/composer.json index b6eb1e90..9fa637f0 100644 --- a/src/Monofony/Pack/ApiPack/composer.json +++ b/src/Monofony/Pack/ApiPack/composer.json @@ -5,7 +5,8 @@ "license": "MIT", "require": { "api-platform/api-pack": "^1.2", - "monofony/core-bundle": "^0.3" + "monofony/core-bundle": "^0.3", + "symfony/messenger": "4.4.*" }, "autoload": { "exclude-from-classmap": ["Recipe/"] diff --git a/symfony.lock b/symfony.lock index 77762710..145869aa 100644 --- a/symfony.lock +++ b/symfony.lock @@ -737,6 +737,18 @@ "symfony/intl": { "version": "v4.2.0" }, + "symfony/messenger": { + "version": "4.3", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "4.3", + "ref": "8a2675c061737658bed85102e9241c752620e575" + }, + "files": [ + "config/packages/messenger.yaml" + ] + }, "symfony/mime": { "version": "v4.3.0" },