Skip to content

Commit f48902e

Browse files
authored
Merge pull request #4611 from soyuka/chore/move-last-bits
Move last bits of non-legacy code to the new namespace
2 parents 119b05b + da6783b commit f48902e

File tree

405 files changed

+10546
-3692
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

405 files changed

+10546
-3692
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,6 @@ jobs:
139139
composer remove --dev --no-interaction --no-progress --no-update --ansi \
140140
doctrine/mongodb-odm \
141141
doctrine/mongodb-odm-bundle
142-
- name: Remove ElasticSearch
143-
if: startsWith(matrix.php, '7.1') || startsWith(matrix.php, '7.2')
144-
run: |
145-
composer remove --dev --no-interaction --no-progress --no-update --ansi \
146-
elasticsearch/elasticsearch
147142
- name: Update project dependencies
148143
run: composer update --no-interaction --no-progress --ansi
149144
- name: Require Symfony components
@@ -232,11 +227,6 @@ jobs:
232227
composer remove --dev --no-interaction --no-progress --no-update --ansi \
233228
doctrine/mongodb-odm \
234229
doctrine/mongodb-odm-bundle
235-
- name: Remove ElasticSearch
236-
if: startsWith(matrix.php, '7.1') || startsWith(matrix.php, '7.2')
237-
run: |
238-
composer remove --dev --no-interaction --no-progress --no-update --ansi \
239-
elasticsearch/elasticsearch
240230
- name: Update project dependencies
241231
run: composer update --no-interaction --no-progress --ansi
242232
- name: Require Symfony components
@@ -645,8 +635,6 @@ jobs:
645635
run: composer update --no-interaction --no-progress --ansi
646636
- name: Require Symfony components
647637
run: composer require symfony/uid --dev --no-interaction --no-progress --ansi
648-
- name: Install Elasticsearch-php # there is a version matrix for this package: https://packagist.org/packages/elasticsearch/elasticsearch
649-
run: composer require "elasticsearch/elasticsearch:v7.14.0" --no-interaction --no-progress --ansi
650638
- name: Install PHPUnit
651639
run: vendor/bin/simple-phpunit --version
652640
- name: Clear test app cache

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
"doctrine/mongodb-odm": "^2.2",
3939
"doctrine/mongodb-odm-bundle": "^4.0",
4040
"doctrine/orm": "^2.6.4",
41-
"elasticsearch/elasticsearch": "^7.14",
4241
"friends-of-behat/mink-browserkit-driver": "^1.3.1",
42+
"elasticsearch/elasticsearch": "^7.11.0",
4343
"friends-of-behat/mink-extension": "^2.2",
4444
"friends-of-behat/symfony-extension": "^2.1",
4545
"guzzlehttp/guzzle": "^6.0 || ^7.0",
@@ -73,8 +73,8 @@
7373
"symfony/form": "^3.4 || ^4.4 || ^5.1 || ^6.0",
7474
"symfony/framework-bundle": "^4.4 || ^5.1 || ^6.0",
7575
"symfony/http-client": "^4.4 || ^5.1 || ^6.0",
76-
"symfony/maker-bundle": "^1.24",
7776
"symfony/intl": "^4.4 || ^5.3 || ^6.0",
77+
"symfony/maker-bundle": "^1.24",
7878
"symfony/mercure-bundle": "*",
7979
"symfony/messenger": "^4.4 || ^5.1 || ^6.0",
8080
"symfony/phpunit-bridge": "^5.4 || ^6.0",

features/graphql/authorization.feature

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ Feature: Authorization checking
152152
And the JSON node "data.securedDummy.relatedDummy" should exist
153153
And the JSON node "data.securedDummy.relatedDummy" should not be null
154154

155+
@v3
155156
@createSchema
156157
Scenario: A user can't access a secured collection relation
157158
Given there are 1 SecuredDummy objects owned by dunglas with related dummies
@@ -175,6 +176,7 @@ Feature: Authorization checking
175176
And the header "Content-Type" should be equal to "application/json"
176177
And the JSON node "data.securedDummy.relatedDummies" should be null
177178

179+
@v3
178180
Scenario: A user can't access a secured relation
179181
When I add "Authorization" header equal to "Basic ZHVuZ2xhczprZXZpbg=="
180182
And I send the following GraphQL request:
@@ -232,6 +234,7 @@ Feature: Authorization checking
232234
And the JSON node "errors[0].message" should be equal to "Access Denied."
233235
And the JSON node "data.relatedSecuredDummies" should be null
234236

237+
@v3
235238
Scenario: A user can access a secured collection relation
236239
When I add "Authorization" header equal to "Basic ZHVuZ2xhczprZXZpbg=="
237240
And I send the following GraphQL request:
@@ -253,6 +256,7 @@ Feature: Authorization checking
253256
And the header "Content-Type" should be equal to "application/json"
254257
And the JSON node "data.securedDummy.relatedSecuredDummies" should have 1 element
255258

259+
@v3
256260
Scenario: A user can access a secured relation
257261
When I add "Authorization" header equal to "Basic ZHVuZ2xhczprZXZpbg=="
258262
And I send the following GraphQL request:
@@ -271,6 +275,7 @@ Feature: Authorization checking
271275
And the JSON node "data.securedDummy.relatedSecuredDummy" should exist
272276
And the JSON node "data.securedDummy.relatedSecuredDummy" should not be null
273277

278+
@v3
274279
Scenario: A user can access a non-secured collection relation
275280
When I add "Authorization" header equal to "Basic ZHVuZ2xhczprZXZpbg=="
276281
And I send the following GraphQL request:
@@ -292,6 +297,7 @@ Feature: Authorization checking
292297
And the header "Content-Type" should be equal to "application/json"
293298
And the JSON node "data.securedDummy.publicRelatedSecuredDummies" should have 1 element
294299

300+
@v3
295301
Scenario: A user can access a non-secured relation
296302
When I add "Authorization" header equal to "Basic ZHVuZ2xhczprZXZpbg=="
297303
When I send the following GraphQL request:
@@ -382,6 +388,7 @@ Feature: Authorization checking
382388
And the response should be in JSON
383389
And the JSON node "data.securedDummies.edges[2].node.ownerOnlyProperty" should be equal to "it works"
384390

391+
@v3
385392
Scenario: An admin can't create a secured resource with an owner-only property if they won't be the owner
386393
When I add "Authorization" header equal to "Basic YWRtaW46a2l0dGVu"
387394
And I send the following GraphQL request:
@@ -465,6 +472,7 @@ Feature: Authorization checking
465472
And the JSON node "data.securedDummy.adminOnlyProperty" should exist
466473
And the JSON node "data.securedDummy.adminOnlyProperty" should not be null
467474

475+
@v3
468476
Scenario: A user can't see a secured admin-only property on an object they own
469477
When I add "Authorization" header equal to "Basic ZHVuZ2xhczprZXZpbg=="
470478
And I send the following GraphQL request:
@@ -527,6 +535,7 @@ Feature: Authorization checking
527535
And the response should be in JSON
528536
And the JSON node "data.securedDummy.ownerOnlyProperty" should be equal to the string "updated"
529537

538+
@v3
530539
Scenario: An admin can't see a secured owner-only property on an object they don't own
531540
When I add "Authorization" header equal to "Basic YWRtaW46a2l0dGVu"
532541
And I send the following GraphQL request:

features/graphql/mutation.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,7 @@ Feature: GraphQL mutation support
663663
And the JSON node "data.createDummyGroup.clientMutationId" should be equal to "myId"
664664

665665
@createSchema
666+
@v3
666667
Scenario: Use serialization groups with relations
667668
Given there is 1 dummy object with relatedDummy and its thirdLevel
668669
And there is a RelatedDummy with 2 friends

features/json/input_output.feature

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Feature: JSON DTO input and output
77
Given I add "Accept" header equal to "application/json"
88
And I add "Content-Type" header equal to "application/json"
99

10+
@createSchema
1011
Scenario: Request a password reset
1112
And I send a "POST" request to "/users/password_reset_request" with body:
1213
"""
@@ -24,6 +25,7 @@ Feature: JSON DTO input and output
2425
}
2526
"""
2627

28+
@createSchema
2729
Scenario: Request a password reset for a non-existent user
2830
And I send a "POST" request to "/users/password_reset_request" with body:
2931
"""
@@ -35,3 +37,4 @@ Feature: JSON DTO input and output
3537
And the response should be in JSON
3638
And the header "Content-Type" should be equal to "application/problem+json; charset=utf-8"
3739
And the JSON node "detail" should be equal to "User does not exist."
40+

features/jsonld/input_output.feature

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,3 +354,27 @@ Feature: JSON-LD DTO input and output
354354
Then the response status code should be 400
355355
And the response should be in JSON
356356
And the JSON node "hydra:description" should be equal to "The input data is misformatted."
357+
358+
@!mongodb
359+
Scenario: Reset password through an input DTO without DataTransformer
360+
When I send a "POST" request to "/user-reset-password" with body:
361+
"""
362+
{
363+
"email": "[email protected]"
364+
}
365+
"""
366+
Then the response status code should be 201
367+
And the response should be in JSON
368+
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
369+
And the JSON node "email" should be equal to "[email protected]"
370+
371+
@!mongodb
372+
Scenario: Reset password with an invalid payload through an input DTO without DataTransformer
373+
And I send a "POST" request to "/user-reset-password" with body:
374+
"""
375+
{
376+
"email": "this is not an email"
377+
}
378+
"""
379+
Then the response status code should be 422
380+
And the response should be in JSON

features/main/attribute_resource.feature

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Feature: Resource attributes
44
I should be able to fetch data from a state provider
55

66
@php8
7+
@v3
78
@!mysql
89
@!mongodb
910
Scenario: Retrieve a Resource collection
@@ -36,6 +37,7 @@ Feature: Resource attributes
3637
"""
3738

3839
@php8
40+
@v3
3941
@!mysql
4042
@!mongodb
4143
Scenario: Retrieve the first resource
@@ -56,6 +58,7 @@ Feature: Resource attributes
5658
"""
5759

5860
@php8
61+
@v3
5962
@!mysql
6063
@!mongodb
6164
Scenario: Retrieve the aliased resource
@@ -78,6 +81,7 @@ Feature: Resource attributes
7881
"""
7982

8083
@php8
84+
@v3
8185
@!mysql
8286
@!mongodb
8387
Scenario: Patch the aliased resource

features/main/crud.feature

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,7 @@ Feature: Create-Retrieve-Update-Delete
560560
And the response should be empty
561561

562562
@php8
563+
@v3
563564
@createSchema
564565
Scenario: Create a resource ProcessorEntity
565566
When I add "Content-Type" header equal to "application/ld+json"
@@ -586,6 +587,7 @@ Feature: Create-Retrieve-Update-Delete
586587
"""
587588

588589
@php8
590+
@v3
589591
Scenario: Create a resource ProviderEntity
590592
When I add "Content-Type" header equal to "application/ld+json"
591593
And I send a "POST" request to "/provider_entities" with body:
@@ -611,6 +613,7 @@ Feature: Create-Retrieve-Update-Delete
611613
"""
612614

613615
@php8
616+
@v3
614617
Scenario: Get a collection of Provider Entities
615618
When I send a "GET" request to "/provider_entities"
616619
Then the response status code should be 200
@@ -635,6 +638,7 @@ Feature: Create-Retrieve-Update-Delete
635638
"""
636639

637640
@php8
641+
@v3
638642
Scenario: Get a resource ProviderEntity
639643
When I send a "GET" request to "/provider_entities/1"
640644
Then the response status code should be 200

features/main/crud_uri_variables.feature

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Feature: Uri Variables
22

33
@createSchema
44
@php8
5+
@v3
56
Scenario: Create a resource Company
67
When I add "Content-Type" header equal to "application/ld+json"
78
And I send a "POST" request to "/companies" with body:
@@ -28,6 +29,7 @@ Feature: Uri Variables
2829
"""
2930

3031
@php8
32+
@v3
3133
Scenario: Create a second resource Company
3234
When I add "Content-Type" header equal to "application/ld+json"
3335
And I send a "POST" request to "/companies" with body:
@@ -39,6 +41,7 @@ Feature: Uri Variables
3941
Then the response status code should be 201
4042

4143
@php8
44+
@v3
4245
Scenario: Create first Employee
4346
When I add "Content-Type" header equal to "application/ld+json"
4447
And I send a "POST" request to "/employees" with body:
@@ -66,6 +69,7 @@ Feature: Uri Variables
6669
"""
6770

6871
@php8
72+
@v3
6973
Scenario: Create second Employee
7074
When I add "Content-Type" header equal to "application/ld+json"
7175
And I send a "POST" request to "/employees" with body:
@@ -78,6 +82,7 @@ Feature: Uri Variables
7882
Then the response status code should be 201
7983

8084
@php8
85+
@v3
8186
Scenario: Create third Employee
8287
When I add "Content-Type" header equal to "application/ld+json"
8388
And I send a "POST" request to "/employees" with body:
@@ -90,6 +95,7 @@ Feature: Uri Variables
9095
Then the response status code should be 201
9196

9297
@php8
98+
@v3
9399
Scenario: Retrieve the collection of employees
94100
When I add "Content-Type" header equal to "application/ld+json"
95101
And I send a "GET" request to "/companies/2/employees"
@@ -152,6 +158,7 @@ Feature: Uri Variables
152158
And the JSON node "data.companies.edges[1].node.employees.edges[1].node.name" should be equal to "foo3"
153159

154160
@php8
161+
@v3
155162
Scenario: Retrieve the company of an employee
156163
When I add "Content-Type" header equal to "application/ld+json"
157164
And I send a "GET" request to "/employees/1/company"
@@ -171,6 +178,7 @@ Feature: Uri Variables
171178
"""
172179

173180
@php8
181+
@v3
174182
Scenario: Retrieve an employee
175183
When I add "Content-Type" header equal to "application/ld+json"
176184
And I send a "GET" request to "/companies/1/employees/1"
@@ -190,6 +198,7 @@ Feature: Uri Variables
190198
"""
191199

192200
@php8
201+
@v3
193202
Scenario: Trying to get an employee of wrong company
194203
When I add "Content-Type" header equal to "application/ld+json"
195204
And I send a "GET" request to "/companies/1/employees/2"

features/main/operation_resource.feature

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Feature: Resource operations
44
I should be able to persist data from a processor
55

66
@php8
7+
@v3
78
@createSchema
89
@!mongodb
910
Scenario: Create an operation resource
@@ -19,6 +20,7 @@ Feature: Resource operations
1920
Then the response status code should be 201
2021

2122
@php8
23+
@v3
2224
@!mongodb
2325
Scenario: Patch an operation resource
2426
When I add "Content-Type" header equal to "application/merge-patch+json"
@@ -41,6 +43,7 @@ Feature: Resource operations
4143
"""
4244

4345
@php8
46+
@v3
4447
@!mongodb
4548
Scenario: Update an operation resource
4649
When I add "Content-Type" header equal to "application/ld+json"

0 commit comments

Comments
 (0)