Skip to content

Commit 3a82243

Browse files
committed
Merge branch '2.4'
2 parents 2bb6f95 + 1043914 commit 3a82243

File tree

60 files changed

+809
-364
lines changed

Some content is hidden

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

60 files changed

+809
-364
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ jobs:
195195
name: Run Behat tests
196196
command: |-
197197
mkdir -p build/logs/tmp build/cov
198-
for f in $(find features -name '*.feature' -not -path 'features/main/exposed_state.feature' -not -path 'features/elasticsearch/*' | circleci tests split --split-by=timings); do
198+
for f in $(find features -name '*.feature' -not -path 'features/main/exposed_state.feature' -not -path 'features/elasticsearch/*' -not -path 'features/mongodb/*' | circleci tests split --split-by=timings); do
199199
_f=${f//\//_}
200200
FEATURE="${_f}" phpdbg -qrr vendor/bin/behat --profile=coverage --suite=default --format=progress --out=std --format=junit --out=build/logs/tmp/"${_f}" "$f"
201201
done

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
env: NO_UNIT_TESTS=true
1212
before_install:
1313
- composer remove --dev ext-mongodb doctrine/mongodb-odm doctrine/mongodb-odm-bundle
14-
- sed -i '26,32d' tests/Fixtures/app/config/config_common.yml
14+
- sed -i '33,39d' tests/Fixtures/app/config/config_common.yml
1515
- php: '7.2'
1616
- php: '7.3'
1717
- php: '7.3'

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
## 2.3.6
3737

38-
* /!\ Security: a vulnerability impacting the GraphQL subsystem was allowing users authorized to run mutations for a specific resource type, to execute it on any resource, of any type
38+
* /!\ Security: a vulnerability impacting the GraphQL subsystem was allowing users authorized to run mutations for a specific resource type, to execute it on any resource, of any type (CVE-2019-1000011)
3939
* Fix normalization of raw collections (not API resources)
4040
* Fix content negotiation format matching
4141

@@ -120,7 +120,7 @@
120120

121121
## 2.2.10
122122

123-
* /!\ Security: a vulnerability impacting the GraphQL subsystem was allowing users authorized to run mutations for a specific resource type, to execute it on any resource, of any type
123+
* /!\ Security: a vulnerability impacting the GraphQL subsystem was allowing users authorized to run mutations for a specific resource type, to execute it on any resource, of any type (CVE-2019-1000011)
124124

125125
## 2.2.9
126126

appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ services:
3434
test_script:
3535
- cd %APPVEYOR_BUILD_FOLDER%
3636
- php vendor\behat\behat\bin\behat --format=progress --suite=default
37+
- rmdir tests\Fixtures\app\var\cache /s /q
3738
- php vendor\phpunit\phpunit\phpunit

behat.yml.dist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ default:
1818
- 'Behat\MinkExtension\Context\MinkContext'
1919
- 'Behatch\Context\RestContext'
2020
filters:
21-
tags: '~@postgres&&~@elasticsearch'
21+
tags: '~@postgres&&~@mongodb&&~@elasticsearch'
2222
postgres:
2323
contexts:
2424
- 'DoctrineContext':
@@ -37,7 +37,7 @@ default:
3737
- 'Behat\MinkExtension\Context\MinkContext'
3838
- 'Behatch\Context\RestContext'
3939
filters:
40-
tags: '~@sqlite&&~@elasticsearch'
40+
tags: '~@sqlite&&~@mongodb&&~@elasticsearch'
4141
mongodb:
4242
contexts:
4343
- 'DoctrineContext':
@@ -106,4 +106,4 @@ coverage:
106106
- 'Behat\MinkExtension\Context\MinkContext'
107107
- 'Behatch\Context\RestContext'
108108
filters:
109-
tags: '~@postgres&&~@elasticsearch'
109+
tags: '~@postgres&&~@mongodb&&~@elasticsearch'

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,16 @@
5151
"psr/log": "^1.0",
5252
"ramsey/uuid": "^3.7",
5353
"ramsey/uuid-doctrine": "^1.4",
54+
"sebastian/object-enumerator": "^3.0.3",
5455
"symfony/asset": "^3.4 || ^4.0",
5556
"symfony/cache": "^3.4 || ^4.0",
5657
"symfony/config": "^3.4 || ^4.0",
5758
"symfony/console": "^3.4 || ^4.0",
59+
"symfony/css-selector": "^3.4 || ^4.0",
5860
"symfony/debug": "^3.4 || ^4.0",
5961
"symfony/dependency-injection": "^3.4 || ^4.0",
6062
"symfony/doctrine-bridge": "^3.4 || ^4.0",
63+
"symfony/dom-crawler": "^3.4 || ^4.0",
6164
"symfony/event-dispatcher": "^3.4 || ^4.0",
6265
"symfony/expression-language": "^3.4 || ^4.0",
6366
"symfony/finder": "^3.4 || ^4.0",
@@ -71,7 +74,7 @@
7174
"symfony/security-bundle": "^3.4 || ^4.0",
7275
"symfony/twig-bundle": "^3.4 || ^4.0",
7376
"symfony/validator": "^3.4 || ^4.0",
74-
"symfony/web-profiler-bundle": "^3.4 || ^4.0",
77+
"symfony/web-profiler-bundle": "^4.2",
7578
"symfony/yaml": "^3.4 || ^4.0",
7679
"webonyx/graphql-php": ">=0.13 <1.0"
7780
},

features/doctrine/date_filter.feature

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ Feature: Date filter on collections
404404
},
405405
"hydra:search": {
406406
"@type": "hydra:IriTemplate",
407-
"hydra:template": "/dummies{?dummyBoolean,relatedDummy.embeddedDummy.dummyBoolean,dummyDate[before],dummyDate[strictly_before],dummyDate[after],dummyDate[strictly_after],relatedDummy.dummyDate[before],relatedDummy.dummyDate[strictly_before],relatedDummy.dummyDate[after],relatedDummy.dummyDate[strictly_after],description[exists],relatedDummy.name[exists],dummyBoolean[exists],relatedDummy[exists],dummyFloat,dummyFloat[],dummyPrice,dummyPrice[],order[id],order[name],order[description],order[relatedDummy.name],order[relatedDummy.symfony],order[dummyDate],dummyFloat[between],dummyFloat[gt],dummyFloat[gte],dummyFloat[lt],dummyFloat[lte],dummyPrice[between],dummyPrice[gt],dummyPrice[gte],dummyPrice[lt],dummyPrice[lte],id,id[],name,alias,description,relatedDummy.name,relatedDummy.name[],relatedDummies,relatedDummies[],dummy,relatedDummies.name,relatedDummy.thirdLevel.level,relatedDummy.thirdLevel.level[],relatedDummy.thirdLevel.fourthLevel.level,relatedDummy.thirdLevel.fourthLevel.level[],properties[]}",
407+
"hydra:template": "/dummies{?dummyBoolean,relatedDummy.embeddedDummy.dummyBoolean,dummyDate[before],dummyDate[strictly_before],dummyDate[after],dummyDate[strictly_after],relatedDummy.dummyDate[before],relatedDummy.dummyDate[strictly_before],relatedDummy.dummyDate[after],relatedDummy.dummyDate[strictly_after],description[exists],relatedDummy.name[exists],dummyBoolean[exists],relatedDummy[exists],dummyFloat,dummyFloat[],dummyPrice,dummyPrice[],order[id],order[name],order[description],order[relatedDummy.name],order[relatedDummy.symfony],order[dummyDate],dummyFloat[between],dummyFloat[gt],dummyFloat[gte],dummyFloat[lt],dummyFloat[lte],dummyPrice[between],dummyPrice[gt],dummyPrice[gte],dummyPrice[lt],dummyPrice[lte],id,id[],name,alias,description,relatedDummy.name,relatedDummy.name[],relatedDummies,relatedDummies[],dummy,relatedDummies.name,relatedDummy.thirdLevel.level,relatedDummy.thirdLevel.level[],relatedDummy.thirdLevel.fourthLevel.level,relatedDummy.thirdLevel.fourthLevel.level[],relatedDummy.thirdLevel.badFourthLevel.level,relatedDummy.thirdLevel.badFourthLevel.level[],relatedDummy.thirdLevel.fourthLevel.badThirdLevel.level,relatedDummy.thirdLevel.fourthLevel.badThirdLevel.level[],properties[]}",
408408
"hydra:variableRepresentation": "BasicRepresentation",
409409
"hydra:mapping": [
410410
{
@@ -701,6 +701,30 @@ Feature: Date filter on collections
701701
"property": "relatedDummy.thirdLevel.fourthLevel.level",
702702
"required": false
703703
},
704+
{
705+
"@type": "IriTemplateMapping",
706+
"variable": "relatedDummy.thirdLevel.badFourthLevel.level",
707+
"property": "relatedDummy.thirdLevel.badFourthLevel.level",
708+
"required": false
709+
},
710+
{
711+
"@type": "IriTemplateMapping",
712+
"variable": "relatedDummy.thirdLevel.badFourthLevel.level[]",
713+
"property": "relatedDummy.thirdLevel.badFourthLevel.level",
714+
"required": false
715+
},
716+
{
717+
"@type": "IriTemplateMapping",
718+
"variable": "relatedDummy.thirdLevel.fourthLevel.badThirdLevel.level",
719+
"property": "relatedDummy.thirdLevel.fourthLevel.badThirdLevel.level",
720+
"required": false
721+
},
722+
{
723+
"@type": "IriTemplateMapping",
724+
"variable": "relatedDummy.thirdLevel.fourthLevel.badThirdLevel.level[]",
725+
"property": "relatedDummy.thirdLevel.fourthLevel.badThirdLevel.level",
726+
"required": false
727+
},
704728
{
705729
"@type": "IriTemplateMapping",
706730
"variable": "properties[]",

features/main/crud.feature

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ Feature: Create-Retrieve-Update-Delete
44
I need to be able to retrieve, create, update and delete JSON-LD encoded resources.
55

66
@createSchema
7-
@mongodb
87
Scenario: Create a resource
98
When I add "Content-Type" header equal to "application/ld+json"
109
And I send a "POST" request to "/dummies" with body:
@@ -56,7 +55,6 @@ Feature: Create-Retrieve-Update-Delete
5655
}
5756
"""
5857

59-
@mongodb
6058
Scenario: Get a resource
6159
When I send a "GET" request to "/dummies/1"
6260
Then the response status code should be 200
@@ -93,7 +91,6 @@ Feature: Create-Retrieve-Update-Delete
9391
}
9492
"""
9593

96-
@mongodb
9794
Scenario: Get a not found exception
9895
When I send a "GET" request to "/dummies/42"
9996
Then the response status code should be 404
@@ -140,7 +137,7 @@ Feature: Create-Retrieve-Update-Delete
140137
"hydra:totalItems": 1,
141138
"hydra:search": {
142139
"@type": "hydra:IriTemplate",
143-
"hydra:template": "/dummies{?dummyBoolean,relatedDummy.embeddedDummy.dummyBoolean,dummyDate[before],dummyDate[strictly_before],dummyDate[after],dummyDate[strictly_after],relatedDummy.dummyDate[before],relatedDummy.dummyDate[strictly_before],relatedDummy.dummyDate[after],relatedDummy.dummyDate[strictly_after],description[exists],relatedDummy.name[exists],dummyBoolean[exists],relatedDummy[exists],dummyFloat,dummyFloat[],dummyPrice,dummyPrice[],order[id],order[name],order[description],order[relatedDummy.name],order[relatedDummy.symfony],order[dummyDate],dummyFloat[between],dummyFloat[gt],dummyFloat[gte],dummyFloat[lt],dummyFloat[lte],dummyPrice[between],dummyPrice[gt],dummyPrice[gte],dummyPrice[lt],dummyPrice[lte],id,id[],name,alias,description,relatedDummy.name,relatedDummy.name[],relatedDummies,relatedDummies[],dummy,relatedDummies.name,relatedDummy.thirdLevel.level,relatedDummy.thirdLevel.level[],relatedDummy.thirdLevel.fourthLevel.level,relatedDummy.thirdLevel.fourthLevel.level[],properties[]}",
140+
"hydra:template": "/dummies{?dummyBoolean,relatedDummy.embeddedDummy.dummyBoolean,dummyDate[before],dummyDate[strictly_before],dummyDate[after],dummyDate[strictly_after],relatedDummy.dummyDate[before],relatedDummy.dummyDate[strictly_before],relatedDummy.dummyDate[after],relatedDummy.dummyDate[strictly_after],description[exists],relatedDummy.name[exists],dummyBoolean[exists],relatedDummy[exists],dummyFloat,dummyFloat[],dummyPrice,dummyPrice[],order[id],order[name],order[description],order[relatedDummy.name],order[relatedDummy.symfony],order[dummyDate],dummyFloat[between],dummyFloat[gt],dummyFloat[gte],dummyFloat[lt],dummyFloat[lte],dummyPrice[between],dummyPrice[gt],dummyPrice[gte],dummyPrice[lt],dummyPrice[lte],id,id[],name,alias,description,relatedDummy.name,relatedDummy.name[],relatedDummies,relatedDummies[],dummy,relatedDummies.name,relatedDummy.thirdLevel.level,relatedDummy.thirdLevel.level[],relatedDummy.thirdLevel.fourthLevel.level,relatedDummy.thirdLevel.fourthLevel.level[],relatedDummy.thirdLevel.badFourthLevel.level,relatedDummy.thirdLevel.badFourthLevel.level[],relatedDummy.thirdLevel.fourthLevel.badThirdLevel.level,relatedDummy.thirdLevel.fourthLevel.badThirdLevel.level[],properties[]}",
144141
"hydra:variableRepresentation": "BasicRepresentation",
145142
"hydra:mapping": [
146143
{
@@ -437,6 +434,30 @@ Feature: Create-Retrieve-Update-Delete
437434
"property": "relatedDummy.thirdLevel.fourthLevel.level",
438435
"required": false
439436
},
437+
{
438+
"@type": "IriTemplateMapping",
439+
"variable": "relatedDummy.thirdLevel.badFourthLevel.level",
440+
"property": "relatedDummy.thirdLevel.badFourthLevel.level",
441+
"required": false
442+
},
443+
{
444+
"@type": "IriTemplateMapping",
445+
"variable": "relatedDummy.thirdLevel.badFourthLevel.level[]",
446+
"property": "relatedDummy.thirdLevel.badFourthLevel.level",
447+
"required": false
448+
},
449+
{
450+
"@type": "IriTemplateMapping",
451+
"variable": "relatedDummy.thirdLevel.fourthLevel.badThirdLevel.level",
452+
"property": "relatedDummy.thirdLevel.fourthLevel.badThirdLevel.level",
453+
"required": false
454+
},
455+
{
456+
"@type": "IriTemplateMapping",
457+
"variable": "relatedDummy.thirdLevel.fourthLevel.badThirdLevel.level[]",
458+
"property": "relatedDummy.thirdLevel.fourthLevel.badThirdLevel.level",
459+
"required": false
460+
},
440461
{
441462
"@type": "IriTemplateMapping",
442463
"variable": "properties[]",
@@ -448,14 +469,14 @@ Feature: Create-Retrieve-Update-Delete
448469
}
449470
"""
450471

451-
@mongodb
452472
Scenario: Update a resource
453473
When I add "Content-Type" header equal to "application/ld+json"
454474
And I send a "PUT" request to "/dummies/1" with body:
455475
"""
456476
{
457477
"@id": "/dummies/1",
458478
"name": "A nice dummy",
479+
"dummyDate": "2018-12-01 13:12",
459480
"jsonData": [{
460481
"key": "value1"
461482
},
@@ -478,7 +499,7 @@ Feature: Create-Retrieve-Update-Delete
478499
"description": null,
479500
"dummy": null,
480501
"dummyBoolean": null,
481-
"dummyDate": "2015-03-01T10:00:00+00:00",
502+
"dummyDate": "2018-12-01T13:12:00+00:00",
482503
"dummyFloat": null,
483504
"dummyPrice": null,
484505
"relatedDummy": null,
@@ -502,7 +523,6 @@ Feature: Create-Retrieve-Update-Delete
502523
}
503524
"""
504525

505-
@mongodb
506526
Scenario: Update a resource with empty body
507527
When I add "Content-Type" header equal to "application/ld+json"
508528
And I send a "PUT" request to "/dummies/1"
@@ -519,7 +539,7 @@ Feature: Create-Retrieve-Update-Delete
519539
"description": null,
520540
"dummy": null,
521541
"dummyBoolean": null,
522-
"dummyDate": "2015-03-01T10:00:00+00:00",
542+
"dummyDate": "2018-12-01T13:12:00+00:00",
523543
"dummyFloat": null,
524544
"dummyPrice": null,
525545
"relatedDummy": null,
@@ -543,7 +563,6 @@ Feature: Create-Retrieve-Update-Delete
543563
}
544564
"""
545565

546-
@mongodb
547566
Scenario: Delete a resource
548567
When I send a "DELETE" request to "/dummies/1"
549568
Then the response status code should be 204

features/main/relation.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Feature: Relations support
2020
"@id": "/third_levels/1",
2121
"@type": "ThirdLevel",
2222
"fourthLevel": null,
23+
"badFourthLevel": null,
2324
"id": 1,
2425
"level": 3,
2526
"test": true

features/main/subresource.feature

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ Feature: Subresource support
245245
"@id": "/third_levels/1",
246246
"@type": "ThirdLevel",
247247
"fourthLevel": "/fourth_levels/1",
248+
"badFourthLevel": null,
248249
"id": 1,
249250
"level": 3,
250251
"test": true
@@ -262,6 +263,7 @@ Feature: Subresource support
262263
"@context": "/contexts/FourthLevel",
263264
"@id": "/fourth_levels/1",
264265
"@type": "FourthLevel",
266+
"badThirdLevel": [],
265267
"id": 1,
266268
"level": 4
267269
}

0 commit comments

Comments
 (0)