Skip to content

ISSUE-345 #147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 62 commits into from
May 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
2cb6463
ISSUE-345: add validator
tatevikg1 Apr 1, 2025
ad6651e
ISSUE-345: update configs
tatevikg1 Apr 1, 2025
a055d9d
ISSUE-345: refactor
tatevikg1 Apr 3, 2025
d716a9d
ISSUE-345: update core
tatevikg1 Apr 5, 2025
253d39d
ISSUE-345: return 422
tatevikg1 Apr 5, 2025
103ce26
ISSUE-345: return 409
tatevikg1 Apr 5, 2025
b74bb83
ISSUE-345: test fix
tatevikg1 Apr 5, 2025
1f46a30
ISSUE-345: snake to camel config
tatevikg1 Apr 5, 2025
4c98923
ISSUE-345: add tests
tatevikg1 Apr 5, 2025
b5f1db2
ISSUE-345: use swagger schemas
tatevikg1 Apr 5, 2025
5e58320
ISSUE-345: update subscriber
tatevikg1 Apr 5, 2025
90fe1d1
ISSUE-345: refactor session controller
tatevikg1 Apr 6, 2025
a553700
ISSUE-345: test fix
tatevikg1 Apr 6, 2025
8a5f4cd
ISSUE-345: refactor swagger
tatevikg1 Apr 8, 2025
dc3ff0b
ISSUE-345: delete subscriber endpoint
tatevikg1 Apr 8, 2025
624c11a
ISSUE-345: 422 in schema
tatevikg1 Apr 8, 2025
0b619ec
ISSUE-345: create subscriber list endpoint
tatevikg1 Apr 10, 2025
eb91c4a
ISSUE-345: new version
tatevikg1 Apr 10, 2025
73368d1
ISSUE-345: test fix
tatevikg1 Apr 10, 2025
7910d2e
ISSUE-345: pipeline fix
tatevikg1 Apr 10, 2025
799e514
ISSUE-345: doc fix
tatevikg1 Apr 10, 2025
c2a0abf
ISSUE-345: subscriberListManager methods
tatevikg1 Apr 12, 2025
c501c0e
ISSUE-345: Request folder
tatevikg1 Apr 12, 2025
a61147e
ISSUE-345: create subscription endpoint
tatevikg1 Apr 12, 2025
6068d25
ISSUE-345: add subscription date to response
tatevikg1 Apr 13, 2025
9780fc8
ISSUE-345: delete subscription endpoint
tatevikg1 Apr 13, 2025
8d636dc
ISSUE-345: test fix
tatevikg1 Apr 13, 2025
a1c72ff
ISSUE-345: refactor subscription
tatevikg1 Apr 13, 2025
46beb03
ISSUE-345: remove from list
tatevikg1 Apr 13, 2025
3cec7c9
ISSUE-345: get campaigns endpoint
tatevikg1 Apr 17, 2025
3c3df09
ISSUE-345: update runner
tatevikg1 Apr 17, 2025
b90c43b
ISSUE-345: create message endpoint
tatevikg1 Apr 19, 2025
70b7c55
ISSUE-345: get message by id endpoint
tatevikg1 Apr 19, 2025
ab7b6d5
ISSUE-345: template id validation
tatevikg1 Apr 19, 2025
a90900b
ISSUE-345: fixtures in folders
tatevikg1 Apr 19, 2025
a81717b
ISSUE-345: campaign controller test
tatevikg1 Apr 19, 2025
1173da8
ISSUE-345: subscription controller test
tatevikg1 Apr 19, 2025
e2fb0d4
ISSUE-345: add unit tests
tatevikg1 Apr 20, 2025
49a8926
ISSUE-345: phpstan + phpcs fix
tatevikg1 Apr 20, 2025
09a1ff7
ISSUE-345: update message endpoint
tatevikg1 Apr 21, 2025
3e08262
ISSUE-345: template controller
tatevikg1 Apr 22, 2025
0d367ef
ISSUE-345: template by id
tatevikg1 Apr 22, 2025
cb62975
ISSUE-345: template property naming
tatevikg1 Apr 24, 2025
9badc8f
ISSUE-345: create template endpoint
tatevikg1 Apr 24, 2025
9658f64
ISSUE-345: fix required/optional fields
tatevikg1 Apr 24, 2025
4f67858
ISSUE-345: delete message endpoint
tatevikg1 Apr 26, 2025
8f5bdd3
ISSUE-345: validate that template has placeholder
tatevikg1 Apr 26, 2025
57df92e
ISSUE-345: add tests
tatevikg1 Apr 26, 2025
6212beb
ISSUE-345: use Constraint directory
tatevikg1 Apr 26, 2025
68465fc
ISSUE-345: add tests
tatevikg1 Apr 26, 2025
ef86452
ISSUE-345: delete template endpoint
tatevikg1 Apr 26, 2025
9601c11
ISSUE-345: fix 404 + template controller test
tatevikg1 Apr 26, 2025
0a65716
ISSUE-345: admin controller
tatevikg1 Apr 29, 2025
bf0219c
ISSUE-345: fix createdAt/updatedAt
tatevikg1 Apr 29, 2025
33d3eee
ISSUE-345: fix swagger
tatevikg1 Apr 29, 2025
3d12deb
ISSUE-345: list cursor pagination
tatevikg1 May 3, 2025
a2e98fd
ISSUE-345: refactor validation logic
tatevikg1 May 3, 2025
9bd58bc
ISSUE-345: pagination data provider
tatevikg1 May 3, 2025
027a465
ISSUE-345: subscriptions
tatevikg1 May 4, 2025
7ee40e8
ISSUE-345: paginated templates
tatevikg1 May 4, 2025
fcc12db
ISSUE-345: split controller
tatevikg1 May 4, 2025
5f68e76
ISSUE-345: add tests
tatevikg1 May 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [push, pull_request]
jobs:
main:
name: phpList Base Dist on PHP ${{ matrix.php-versions }}, with dist ${{ matrix.dependencies }} [Build, Test]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
DB_DATABASE: phplist
DB_USERNAME: root
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/restapi-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
make-restapi-docs:
name: Checkout phpList rest-api and generate docs specification (OpenAPI latest-restapi.json)
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:

deploy-docs:
name: Deploy REST API Specification
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: make-restapi-docs
steps:
- name: Setup Node.js
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@
},
"require": {
"php": "^8.1",
"phplist/core": "v5.0.0-alpha3",
"phplist/core": "v5.0.0-alpha6",
"friendsofsymfony/rest-bundle": "*",
"symfony/test-pack": "^1.0",
"symfony/process": "^6.4",
"zircote/swagger-php": "^4.11"
"zircote/swagger-php": "^4.11",
"ext-dom": "*"
},
"require-dev": {
"phpunit/phpunit": "^10.0",
Expand Down
22 changes: 4 additions & 18 deletions config/services.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
imports:
- { resource: 'services/*.yml' }
services:
Psr\Container\ContainerInterface:
alias: 'service_container'
Expand All @@ -8,10 +10,6 @@ services:
autowire: true
tags: ['controller.service_arguments']

# Symfony\Component\Serializer\SerializerInterface:
# autowire: true
# autoconfigure: true

my.secure_handler:
class: PhpList\RestBundle\ViewHandler\SecuredViewHandler

Expand All @@ -24,17 +22,5 @@ services:
autowire: true
autoconfigure: true

PhpList\Core\Domain\Repository\Messaging\SubscriberListRepository:
autowire: true
autoconfigure: true

PhpList\RestBundle\EventListener\ExceptionListener:
tags:
- { name: kernel.event_listener, event: kernel.exception }

PhpList\RestBundle\EventListener\ResponseListener:
tags:
- { name: kernel.event_listener, event: kernel.response }
PhpList\RestBundle\Serializer\SubscriberNormalizer:
tags: [ 'serializer.normalizer' ]
autowire: true
GuzzleHttp\ClientInterface:
class: GuzzleHttp\Client
25 changes: 25 additions & 0 deletions config/services/builders.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
services:
_defaults:
autowire: true
autoconfigure: true
public: false

PhpList\RestBundle\Service\Builder\MessageBuilder:
autowire: true
autoconfigure: true

PhpList\RestBundle\Service\Builder\MessageFormatBuilder:
autowire: true
autoconfigure: true

PhpList\RestBundle\Service\Builder\MessageScheduleBuilder:
autowire: true
autoconfigure: true

PhpList\RestBundle\Service\Builder\MessageContentBuilder:
autowire: true
autoconfigure: true

PhpList\RestBundle\Service\Builder\MessageOptionsBuilder:
autowire: true
autoconfigure: true
9 changes: 9 additions & 0 deletions config/services/factories.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
services:
_defaults:
autowire: true
autoconfigure: true
public: false

PhpList\RestBundle\Service\Factory\PaginationCursorRequestFactory:
autowire: true
autoconfigure: true
13 changes: 13 additions & 0 deletions config/services/listeners.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
services:
_defaults:
autowire: true
autoconfigure: true
public: false

PhpList\RestBundle\EventListener\ExceptionListener:
tags:
- { name: kernel.event_listener, event: kernel.exception }

PhpList\RestBundle\EventListener\ResponseListener:
tags:
- { name: kernel.event_listener, event: kernel.response }
37 changes: 37 additions & 0 deletions config/services/managers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
services:
_defaults:
autowire: true
autoconfigure: true
public: false

PhpList\RestBundle\Service\Manager\SubscriberManager:
autowire: true
autoconfigure: true

PhpList\RestBundle\Service\Manager\SessionManager:
autowire: true
autoconfigure: true

PhpList\RestBundle\Service\Manager\SubscriberListManager:
autowire: true
autoconfigure: true

PhpList\RestBundle\Service\Manager\SubscriptionManager:
autowire: true
autoconfigure: true

PhpList\RestBundle\Service\Manager\MessageManager:
autowire: true
autoconfigure: true

PhpList\RestBundle\Service\Manager\TemplateManager:
autowire: true
autoconfigure: true

PhpList\RestBundle\Service\Manager\TemplateImageManager:
autowire: true
autoconfigure: true

PhpList\RestBundle\Service\Manager\AdministratorManager:
autowire: true
autoconfigure: true
47 changes: 47 additions & 0 deletions config/services/normalizers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
services:
_defaults:
autowire: true
autoconfigure: true
public: false

Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter: ~

Symfony\Component\Serializer\Normalizer\ObjectNormalizer:
arguments:
$classMetadataFactory: '@?serializer.mapping.class_metadata_factory'
$nameConverter: '@Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter'

PhpList\RestBundle\Serializer\SubscriberNormalizer:
tags: [ 'serializer.normalizer' ]
autowire: true

PhpList\RestBundle\Serializer\AdministratorTokenNormalizer:
tags: [ 'serializer.normalizer' ]
autowire: true

PhpList\RestBundle\Serializer\SubscriberListNormalizer:
tags: [ 'serializer.normalizer' ]
autowire: true

PhpList\RestBundle\Serializer\SubscriptionNormalizer:
tags: [ 'serializer.normalizer' ]
autowire: true

PhpList\RestBundle\Serializer\MessageNormalizer:
tags: [ 'serializer.normalizer' ]
autowire: true

PhpList\RestBundle\Serializer\TemplateImageNormalizer:
tags: [ 'serializer.normalizer' ]
autowire: true

PhpList\RestBundle\Serializer\TemplateNormalizer:
tags: [ 'serializer.normalizer' ]
autowire: true

PhpList\RestBundle\Serializer\AdministratorNormalizer:
tags: [ 'serializer.normalizer' ]
autowire: true

PhpList\RestBundle\Serializer\CursorPaginationNormalizer:
autowire: true
9 changes: 9 additions & 0 deletions config/services/providers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
services:
_defaults:
autowire: true
autoconfigure: true
public: false

PhpList\RestBundle\Service\Provider\PaginatedDataProvider:
autowire: true
autoconfigure: true
36 changes: 36 additions & 0 deletions config/services/validators.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
services:
PhpList\RestBundle\Validator\RequestValidator:
autowire: true
autoconfigure: true
public: false

PhpList\RestBundle\Validator\Constraint\UniqueEmailValidator:
autowire: true
autoconfigure: true
tags: [ 'validator.constraint_validator' ]

PhpList\RestBundle\Validator\Constraint\EmailExistsValidator:
autowire: true
autoconfigure: true
tags: [ 'validator.constraint_validator' ]

PhpList\RestBundle\Validator\Constraint\TemplateExistsValidator:
autowire: true
autoconfigure: true
tags: [ 'validator.constraint_validator' ]

PhpList\RestBundle\Validator\TemplateLinkValidator:
autowire: true
autoconfigure: true

PhpList\RestBundle\Validator\TemplateImageValidator:
autowire: true
autoconfigure: true

PhpList\RestBundle\Validator\Constraint\ContainsPlaceholderValidator:
tags: ['validator.constraint_validator']

PhpList\RestBundle\Validator\Constraint\UniqueLoginNameValidator:
autowire: true
autoconfigure: true
tags: [ 'validator.constraint_validator' ]
Loading
Loading