diff --git a/composer.json b/composer.json index faf49db1..5b8e2a73 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ }, "require": { "php": "^8.1", - "phplist/core": "v5.0.0-alpha8", + "phplist/core": "dev-main", "friendsofsymfony/rest-bundle": "*", "symfony/test-pack": "^1.0", "symfony/process": "^6.4", diff --git a/config/services/validators.yml b/config/services/validators.yml index 0080f7ac..02a0b425 100644 --- a/config/services/validators.yml +++ b/config/services/validators.yml @@ -1,8 +1,8 @@ services: PhpList\RestBundle\Common\Validator\RequestValidator: - autowire: true - autoconfigure: true - public: false + arguments: + $serializer: '@Symfony\Component\Serializer\Normalizer\ObjectNormalizer' + $validator: '@validator' PhpList\RestBundle\Identity\Validator\Constraint\UniqueEmailValidator: autowire: true diff --git a/src/Identity/Request/CreateAdministratorRequest.php b/src/Identity/Request/CreateAdministratorRequest.php index f69c70c0..da0f5f65 100644 --- a/src/Identity/Request/CreateAdministratorRequest.php +++ b/src/Identity/Request/CreateAdministratorRequest.php @@ -6,7 +6,6 @@ use PhpList\Core\Domain\Identity\Model\Administrator; use PhpList\Core\Domain\Identity\Model\Dto\CreateAdministratorDto; -use PhpList\Core\Domain\Identity\Model\PrivilegeFlag; use PhpList\RestBundle\Common\Request\RequestInterface; use PhpList\RestBundle\Identity\Validator\Constraint\UniqueEmail; use PhpList\RestBundle\Identity\Validator\Constraint\UniqueLoginName; diff --git a/src/Messaging/OpenApi/SwaggerSchemasResponse.php b/src/Messaging/OpenApi/SwaggerSchemasResponse.php index fe567c81..a14e9b58 100644 --- a/src/Messaging/OpenApi/SwaggerSchemasResponse.php +++ b/src/Messaging/OpenApi/SwaggerSchemasResponse.php @@ -70,11 +70,12 @@ properties: [ new OA\Property(property: 'html_formated', type: 'boolean'), new OA\Property(property: 'send_format', type: 'string', example: 'text', nullable: true), - new OA\Property(property: 'as_text', type: 'boolean', example: true), - new OA\Property(property: 'as_html', type: 'boolean'), - new OA\Property(property: 'as_pdf', type: 'boolean'), - new OA\Property(property: 'as_text_and_html', type: 'boolean'), - new OA\Property(property: 'as_text_and_pdf', type: 'boolean'), + new OA\Property( + property: 'format_options', + type: 'array', + items: new OA\Items(type: 'string'), + example: ['as_html', 'as_text'], + ), ], type: 'object' ), diff --git a/tests/Integration/Identity/Controller/SessionControllerTest.php b/tests/Integration/Identity/Controller/SessionControllerTest.php index 5f8b2b00..41f3298a 100644 --- a/tests/Integration/Identity/Controller/SessionControllerTest.php +++ b/tests/Integration/Identity/Controller/SessionControllerTest.php @@ -102,7 +102,7 @@ public function testPostSessionsWithInvalidCredentialsReturnsNotAuthorized() $loginName = 'john.doe'; $password = 'a sandwich and a cup of coffee'; - $jsonData = ['loginName' => $loginName, 'password' => $password]; + $jsonData = ['login_name' => $loginName, 'password' => $password]; $this->jsonRequest('post', '/api/v2/sessions', [], [], [], json_encode($jsonData));