Skip to content
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

Fix/abstract normalizer constructor 2 #5

Open
wants to merge 248 commits into
base: 2.5
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
248 commits
Select commit Hold shift + click to select a range
6558e19
add ability to control the max header length allowed by the varnish s…
jocel1 Jun 17, 2019
9ab149d
csfixer
jocel1 Aug 22, 2019
b85bf34
add test for max_header_length
jocel1 Aug 23, 2019
9f64734
Merge branch 'master' into varnish-purge-by-chunk
jocel1 Aug 26, 2019
3366849
Update branch alias
dunglas Sep 23, 2019
81d276c
Merge branch '2.5'
dunglas Sep 23, 2019
59fa1e2
Merge branch '2.5'
dunglas Sep 25, 2019
9ff7a23
Merge branch '2.5'
dunglas Sep 26, 2019
9799193
Merge branch '2.5'
dunglas Sep 26, 2019
854bcc9
Add entrypoints sorting
mRoca Sep 27, 2019
8e28a58
Merge pull request #3114 from mRoca/entrypoints-sorting
soyuka Sep 30, 2019
e468d98
Merge branch '2.5'
dunglas Oct 1, 2019
d8e624b
Possibility to add execute options for MongoDB (#3144)
alanpoulain Oct 7, 2019
4d4ee37
Feat: remove template pull request
toofff Oct 2, 2019
a4c8af6
Merge pull request #3137 from toofff/feat-remove-template-pull-request
dunglas Oct 14, 2019
1931f16
Context stamp (#3157)
Oct 14, 2019
dfc1771
Merge branch '2.5'
dunglas Oct 14, 2019
74ee7ef
Global resource defaults implementation (#3151)
bpolaszek Oct 14, 2019
f3312a7
Merge branch '2.5' into merge-2.5
teohhanhui Oct 15, 2019
3c371aa
Merge pull request #3179 from teohhanhui/merge-2.5
teohhanhui Oct 15, 2019
1e7d7ed
Merge remote-tracking branch 'upstream/2.5' into merge-25
soyuka Oct 23, 2019
480c077
Merge pull request #3202 from soyuka/merge-25
soyuka Oct 23, 2019
8e21ef2
Make the base exception extend throwable
BackEndTea Oct 28, 2019
21bbe95
Use https instead of http
BackEndTea Oct 28, 2019
59a1702
Merge pull request #3219 from BackEndTea/patch-3
dunglas Oct 28, 2019
449842a
Merge pull request #3217 from BackEndTea/patch-1
dunglas Oct 28, 2019
b125b66
Merge branch '2.5'
dunglas Oct 29, 2019
d22dda9
Link to local XSD (#3218)
BackEndTea Oct 31, 2019
ddf170b
More Descriptive Input/Output class names
Oct 31, 2019
906aaa2
Merge pull request #3231 from soyuka/patch/readable-names
dunglas Nov 1, 2019
ac80fd2
Merge branch '2.5' into merge-2.5
teohhanhui Nov 12, 2019
a12ac48
Merge pull request #3245 from teohhanhui/merge-2.5
teohhanhui Nov 12, 2019
0b796a7
Merge branch '2.5'
alanpoulain Nov 17, 2019
ce7fffb
Merge 2.5 (#3272)
alanpoulain Nov 17, 2019
9920f15
[GraphQL] Adding custom error format support (#3063)
mahmoodbazdar Nov 17, 2019
7655ba8
Merge remote-tracking branch 'upstream/2.5' into merge-25
soyuka Nov 19, 2019
313f4d0
Merge pull request #3277 from soyuka/merge-25
soyuka Nov 19, 2019
bf8afd3
Add page-based pagination to GraphQL (#3175)
raoulclais Nov 19, 2019
2430ab5
Improve Vulcain support (#3275)
dunglas Nov 19, 2019
be5752f
Remove nonsensical "child inherited" metadata
teohhanhui Nov 9, 2019
b72a90b
Merge pull request #3273 from teohhanhui/fix/remove-child-inherited-m…
teohhanhui Nov 22, 2019
b9e3328
Use default value of PHP properties to Swagger doc
aaa2000 Dec 16, 2018
2ac0d66
Add default and example properties to ApiProperty
aaa2000 Dec 20, 2018
f3ddc2c
Fix phpdoc
aaa2000 Jan 7, 2019
a92bab9
Fix rebase
aaa2000 Oct 5, 2019
41084b4
Fix deprecation notices
aaa2000 Oct 5, 2019
c1c5ea5
Fix phpcs
aaa2000 Oct 5, 2019
39987fc
Fix phpstan error
aaa2000 Oct 5, 2019
a83c118
Use the Doctrine default value as default value in Swagger doc
aaa2000 Oct 20, 2019
b5fae3a
Merge pull request #2386 from aaa2000/swagger-default-property-value
soyuka Nov 29, 2019
c859ad0
OpenAPI: Add PHP default values to the documentation (#2386)
soyuka Nov 29, 2019
f56f21d
Merge pull request #3289 from api-platform/soyuka-patch-1
soyuka Nov 29, 2019
6179699
Merge branch '2.5'
alanpoulain Nov 30, 2019
5fa9b56
Merge pull request #3291 from alanpoulain/merge-2.5
alanpoulain Nov 30, 2019
e16d296
test `allowEmptyValue` in filter validation
jdeniau Feb 19, 2018
44009bb
add bounds filter validator
jdeniau Feb 20, 2018
7f4b1c8
check filter `maxLength` and `minLength`
jdeniau Feb 20, 2018
e513606
add lots of validations
jdeniau Feb 21, 2018
950c172
move validators in separate files
jdeniau Feb 21, 2018
0da5c75
validate maxItems, minItems & uniqueItems filter
jdeniau Feb 22, 2018
3a20868
split query parameter listener into a validator + a listener (need to…
jdeniau Jun 16, 2018
7008374
split tests in two
jdeniau Jun 21, 2018
437d87e
add unit tests for each Validators
jdeniau Jun 21, 2018
dbde28a
use float instead of number in Filters::getDescription
jdeniau Dec 26, 2018
7f4f7e6
fix phpstan / cs-fixer returns
jdeniau Dec 26, 2018
7e4f145
add filter tests for mongodb too
jdeniau Jan 25, 2019
9cc5965
make validator classes final
jdeniau Jan 28, 2019
5d8cf49
Use query parameters array instead of Symfony Request
jdeniau Jan 28, 2019
167f806
use internal RequestParser instead of $request->query->all()
jdeniau Jan 28, 2019
3ec427e
Add support of collection get operations with different names ( thank…
jdeniau Dec 4, 2019
2531974
Merge branch 'master' into varnish-purge-by-chunk
jocel1 Dec 8, 2019
afa0995
link a specific tag
jocel1 Dec 11, 2019
2e491f7
Merge pull request #1723 from jdeniau/jd-feat-moreQueryParameterValid…
soyuka Dec 17, 2019
527cc4c
Merge branch '2.5'
alanpoulain Dec 20, 2019
9a6c846
Merge 2.5 (#3318)
alanpoulain Dec 20, 2019
e773104
[MongoDB] Mercure support (#3290)
alanpoulain Dec 20, 2019
a2815bf
Merge branch '2.5'
alanpoulain Dec 21, 2019
5acdef3
Merge 2.5 (#3324)
alanpoulain Dec 21, 2019
9298c45
[GraphQL] Fix getGraphQlPaginationType when not a resource (#3328)
alanpoulain Dec 23, 2019
67bab89
post review fixes
jocel1 Jan 13, 2020
46daead
Merge branch 'master' into varnish-purge-by-chunk
jocel1 Jan 13, 2020
7c20f50
cs-fixer
jocel1 Jan 13, 2020
303561c
Merge remote-tracking branch 'origin/varnish-purge-by-chunk' into var…
jocel1 Jan 13, 2020
e8effc7
Merge branch '2.5'
dunglas Jan 13, 2020
d6f2603
[GraphQL] Mercure Subscription Support (#3321)
alanpoulain Feb 3, 2020
e778179
fix outdated pull request template link in contribution guide
clementlefrancois Feb 3, 2020
799d88a
Merge pull request #3377 from clementlefrancois/remove-outdeted-infor…
dunglas Feb 3, 2020
38d6955
add property schema restrictions based on validation constraints
penja Dec 28, 2019
dee4c09
Merge pull request #3329 from penja/property_shema_validation_restric…
soyuka Feb 18, 2020
e1c3875
Merge branch '2.5' into merge-2.5
teohhanhui Feb 20, 2020
5b2184f
Merge pull request #3405 from teohhanhui/merge-2.5
teohhanhui Feb 20, 2020
55d9668
Merge branch '2.5' into merge-2.5
teohhanhui Feb 28, 2020
b7d9e90
Merge pull request #3419 from teohhanhui/merge-2.5
teohhanhui Feb 28, 2020
39fc0a4
Allow to autoconfigure validation groups generators
norkunas Jan 16, 2020
b5370a0
Merge pull request #3346 from norkunas/validation-groups-generators-dx
teohhanhui Mar 2, 2020
63d9dee
Add ErrorCodeSerializableInterface to add a possibility to add custom…
gries Jul 9, 2019
2bc6a22
Update src/Problem/Serializer/ErrorNormalizerTrait.php
gries Mar 5, 2020
230d42c
Fix normalize method.
gries Mar 6, 2020
48beeb4
Cs fixes.
gries Mar 9, 2020
75cc745
Fall back to previously used ErrorException.
gries Mar 9, 2020
842ab30
Merge pull request #2922 from gries/error_codes
teohhanhui Mar 9, 2020
c6055be
Update src/HttpCache/VarnishPurger.php
jocel1 Mar 10, 2020
3b8dc7d
Merge pull request #2865 from jocel1/varnish-purge-by-chunk
teohhanhui Mar 10, 2020
b34f1f7
add stale-while-validate and stale-if-error cache-control extensions
Mar 12, 2020
cb22149
Merge pull request #3439 from momozor/cache-control
teohhanhui Mar 12, 2020
a9674f1
Merge remote-tracking branch 'upstream/2.5'
soyuka Mar 29, 2020
efc65ff
Fix tests
soyuka Mar 16, 2020
fa9eb8c
Fix symfony 5.1 exception test
soyuka Mar 29, 2020
dd497cf
Merge pull request #3452 from soyuka/master
soyuka Mar 29, 2020
4406174
Remove http_cache.invalidation deprecation and fix some remaining deprec
dunglas Nov 19, 2019
690c28c
Fix pagination options with defaults
soyuka Mar 29, 2020
48a489e
Add files to test client
CoalaJoe Apr 9, 2020
3492922
Fix order being a string
soyuka Apr 9, 2020
4642444
Respect method signature in favor of interface
CoalaJoe Apr 9, 2020
2301538
Add missing default
CoalaJoe Apr 9, 2020
fbfa615
FOSUserBundle deprecates GroupableInterface used by our BaseModel
soyuka Apr 9, 2020
dc461fc
Merge pull request #3276 from dunglas/fix-deprecations
soyuka Apr 9, 2020
45e58dd
Update passing of files according to feedback
CoalaJoe Apr 10, 2020
3d28753
Add request parameters to client.
CoalaJoe Apr 11, 2020
6cdf4e0
Merge pull request #3486 from CoalaJoe/patch-1
soyuka Apr 15, 2020
433a773
Fix accessing a non existent key
MartkCz Apr 16, 2020
fc15664
Merge pull request #3496 from MartkCz/patch-4
soyuka Apr 16, 2020
47f52f5
Merge branch '2.5'
dunglas Apr 20, 2020
03e5424
Fix CS
dunglas Apr 20, 2020
fe72105
Merge pull request #3504 from dunglas/fix-tests
dunglas Apr 20, 2020
6e3a259
Implement ApiProperty security attribute (#3503)
GregoireHebert Apr 21, 2020
a880d96
[GraphQL] add support for Symfony Serializer's `@SerializedName` meta…
MartkCz Apr 21, 2020
887d707
feat: CookieJar on Client (#3418)
Grafikart Apr 21, 2020
e1e18d4
Merge branch '2.5'
dunglas Apr 21, 2020
8fde8f1
[GraphQL] Mutations have description field (#3477)
MartkCz Apr 22, 2020
7e69666
[GraphQL] Custom description for queries (#3514)
alanpoulain Apr 22, 2020
8d7290e
[GraphQL] Support serialized name (#3516)
alanpoulain Apr 22, 2020
f52a17e
[GraphQL] Fix serializer context attributes for page-based pagination…
alanpoulain Apr 23, 2020
cfc05d1
use interface HttpExceptionInterface instead of HttpException (#3533)
MartkCz Apr 27, 2020
d83d502
change operation to OperationName in the parser (#3568)
May 18, 2020
e7abe5a
Merge branch '2.5'
alanpoulain May 28, 2020
beb03a6
Merge pull request #3571 from alanpoulain/merge-2.5
alanpoulain May 29, 2020
9ccf578
Support subresource resourceClass resolving (#3556)
esserj May 30, 2020
35f85c6
Better handling of relations without Doctrine. (#3591)
alanpoulain Jun 2, 2020
7e7c3eb
Fix subresource DTO
alanpoulain Jun 3, 2020
3c84964
Fix MongoDB unit tests
alanpoulain Jun 3, 2020
6e388f8
Fix MongoDB Behat tests
alanpoulain Jun 3, 2020
f56cd4a
Handle deprecations from Symfony 5.1 (#3589)
derrabus Jun 4, 2020
1674d88
Fix phpstan issues
soyuka Jun 15, 2020
ff60de7
fix graphql convert type
soyuka Jun 15, 2020
dabbcb6
Merge pull request #3603 from soyuka/merge-25
soyuka Jun 16, 2020
76cafc2
Remove URL encoding of identifier
silverbackdan May 8, 2020
0eb6ef2
Clarify use cases of ids with special url encoded characters
silverbackdan May 8, 2020
8a15ed7
Style fixes
soyuka Jun 18, 2020
f1e3440
Fix test double-encoded
soyuka Jun 18, 2020
acfcd13
fix mongodb tests
soyuka Jun 18, 2020
ccdbb5f
Merge pull request #3611 from soyuka/fix/identifier-encode
soyuka Jun 18, 2020
e7dad31
Use snake case for pagination type (#3614)
alanpoulain Jun 19, 2020
51573a3
Add possibility to specify a url generation strategy (#3198)
antograssiot Jun 24, 2020
90b0151
Lazy console commands
vyacheslav-startsev Jul 8, 2020
e937b30
Revert SwaggerCommand
vyacheslav-startsev Jul 8, 2020
ad17f0a
Fix code style
vyacheslav-startsev Jul 10, 2020
0be9798
Handling GraphQL errors (#3632)
ollietb Jul 18, 2020
5109bf1
[GraphQL] Make the error handler final (#3643)
alanpoulain Jul 19, 2020
76de14f
Merge remote-tracking branch 'upstream/2.5' into merge-25
soyuka Jul 23, 2020
2ffee41
[GraphQL] No BC for types (#3654)
alanpoulain Jul 23, 2020
2a22166
Fix merge
soyuka Jul 23, 2020
80c50c8
Merge pull request #3655 from soyuka/merge-25
soyuka Jul 23, 2020
538416f
Merge pull request #3635 from vyacheslav-startsev/lazy-commands
soyuka Jul 23, 2020
2dc666c
OpenApi v3 refactor (#3407)
soyuka Jul 23, 2020
f6fd3b3
fix: use new OpenApi with SwaggerUI (#3657)
soyuka Jul 27, 2020
22ce639
Update InheritedPropertyNameCollectionFactory.php (#3642)
lucasgranberg Jul 27, 2020
38d69e6
Merge branch '2.5' into master
dunglas Aug 22, 2020
af3e305
Merge branch '2.5' into master
dunglas Aug 30, 2020
2c87089
Fix tests (#3698)
soyuka Sep 1, 2020
3dd0f7e
Fix definition names to be compliant with OpenAPI 3.0 and JSON Point …
stchr Sep 7, 2020
f1a26db
[GraphQL] deprecationReason should be null when not set (#3712)
alanpoulain Sep 8, 2020
1e62c99
Merge 2.5 onto master (#3713)
soyuka Sep 10, 2020
17966ce
Add Symfony Uid support (#3715)
norkunas Sep 10, 2020
52206c3
Add Api-Platform's version in debug bar (#3235)
Sep 10, 2020
5c5f380
Merge remote-tracking branch 'upstream/2.5' into merge-25
soyuka Sep 13, 2020
278a1cb
fix windows test
soyuka Sep 13, 2020
32249e9
Merge pull request #3718 from soyuka/merge-25
soyuka Sep 13, 2020
6e2538b
Pre hydrate input before denormalize (#3701)
soyuka Sep 13, 2020
cb3f641
Add Tidelift to FUNDING.yml
dunglas Sep 14, 2020
3c80345
Handle Symfony stateless control
mtarld Feb 27, 2020
9f38f83
Merge pull request #3436 from mtarld/feature/stateless
dunglas Sep 25, 2020
ce06420
Add messenger=persist (#3617)
vincentchalamon Sep 25, 2020
176cdf9
Merge branch '2.5' into master
dunglas Oct 2, 2020
f20e322
Merge branch '2.5'
antograssiot Oct 13, 2020
87c75d4
Try to fix master pipeline (#3756)
antograssiot Oct 14, 2020
89e085f
Add previous_data to persisters context when available
antograssiot Oct 12, 2020
823cdaf
Merge pull request #3752 from antograssiot/attribute_extractor
dunglas Oct 14, 2020
42c717b
Fix openApi when no data provided (#3757)
Te4g Oct 14, 2020
68163f3
fix OpenApi operation servers/security (#3758)
soyuka Oct 14, 2020
b322aff
[GraphQL] Fix filter arguments order (#3468)
ArnoudThibaut Oct 15, 2020
1c7c26d
feat: improves iri_only implementation (#3454)
Oct 15, 2020
8c69482
Add configurable asset_package
smatyas Oct 15, 2020
b5c72b7
[Mercure] Add a `normalization_context` option in `mercure` attribute…
alanpoulain Oct 20, 2020
ff931eb
Lazy load remaining commands
deguif Oct 28, 2020
51310fd
Merge pull request #3798 from deguif/lazy-load-command
dunglas Oct 28, 2020
9b2ce68
Do not inject api_platform.security.resource_access_checker on ItemNo…
vincentchalamon Oct 29, 2020
eae59df
Merge pull request #3801 from vincentchalamon/issues/item-normalizer
dunglas Oct 29, 2020
095a378
Merge remote-tracking branch 'upstream/2.5' into merge-25
soyuka Nov 6, 2020
70289ca
Fix tests
soyuka Nov 6, 2020
6ad1fbc
Fix phpstan
soyuka Nov 7, 2020
003608e
Fix mercure context
soyuka Nov 7, 2020
9f3f840
Groups should be an array
soyuka Nov 7, 2020
d26805c
Fix sf5 deprecation notices (#3)
soyuka Nov 7, 2020
33cfa2c
fix tests
soyuka Nov 7, 2020
b896509
Merge pull request #3812 from soyuka/merge-25
soyuka Nov 7, 2020
ea698f8
OpenApi refactor on path docs.json?spec_version=3
soyuka Oct 15, 2020
49ce534
Fix openapi schema definitions for subresources
soyuka Oct 14, 2020
1ae4dfc
Merge pull request #3759 from soyuka/fix/openapi-docs-endpoint
soyuka Nov 8, 2020
4eda8d5
Merge pull request #3764 from smatyas/asset-package
soyuka Nov 8, 2020
3605e6d
[DEFAULT ORDER] #1246: Support default order for a specific custom op…
ahmed-bhs Nov 8, 2020
3cf90f7
Fix tests (#3818)
soyuka Nov 8, 2020
5b2cfdc
[ValidationException] Allow customization of validation error status …
ahmed-bhs Nov 8, 2020
d1856d3
Merge 2.5 into master
soyuka Nov 9, 2020
5ec957d
Merge 2.5 onto master
soyuka Nov 9, 2020
04142a6
Allow to search on multiple values on every strategies (#3786)
benja-M-1 Nov 11, 2020
347a095
Serializer: Support ignore annotation (#3820)
TheCrealm Nov 18, 2020
fcb3376
Subresource definition ADR proposal
soyuka Nov 19, 2020
a18abb3
fix links
soyuka Nov 19, 2020
3af682c
Review
soyuka Nov 19, 2020
1ddd7c6
Review
soyuka Nov 19, 2020
6350ea0
Review
soyuka Nov 19, 2020
9d6fad4
explicit
soyuka Nov 19, 2020
0ca717c
review
soyuka Nov 19, 2020
a5bd1b7
Merge branch '2.5' into master
soyuka Nov 20, 2020
ab474b6
Merge 2.5 onto master
soyuka Nov 20, 2020
621ef66
* make all openapi info model fields configurable
Nov 19, 2020
bcf2a46
Merge pull request #3837 from WhiteRabbitDE/feature/make-all-swagger-…
soyuka Nov 24, 2020
a009340
Apply suggestions from code review
soyuka Nov 25, 2020
c31c9d9
Fix #3844 open api shows with jsonld normalizer
soyuka Nov 26, 2020
9663fda
Merge pull request #3846 from soyuka/fix/documentation
dunglas Nov 26, 2020
c984ab6
Merge pull request #3838 from soyuka/adr
soyuka Nov 26, 2020
01ed8dd
Resource identifiers
soyuka Nov 19, 2020
001f714
Apply suggestions from code review
soyuka Nov 26, 2020
a2f719c
Merge pull request #3840 from soyuka/adr-resources-identifiers
soyuka Nov 26, 2020
3f4bd56
feat: add ApiResource PHP 8 attribute
dunglas Nov 26, 2020
11dafa5
feat: add ApiProperty PHP 8 attribute
dunglas Nov 27, 2020
8a5494d
tests: fix tests
dunglas Nov 27, 2020
f99cc0a
Merge pull request #3851 from dunglas/feat/php8-attributes
dunglas Nov 27, 2020
d6a7f60
Merge branch 2.5 into master
soyuka Nov 28, 2020
c41db56
Update AbstractConstraintViolationListNormalizer.php
theofidry Nov 28, 2020
f71b9e5
Merge 2.5 into master (#3856)
soyuka Nov 28, 2020
30218e4
Fix tests
theofidry Nov 29, 2020
dd105c0
Merge pull request #3857 from api-platform/feature/violation-code
soyuka Nov 29, 2020
5573b2a
fix phpstan (#3859)
soyuka Nov 29, 2020
2b18296
Merge 2.5 to fix phpstan (#3862)
soyuka Nov 30, 2020
8769b25
Deep object update consistency
soyuka Nov 29, 2020
cb7cf2b
review
soyuka Nov 30, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tidelift: "packagist/api-platform/core"
13 changes: 0 additions & 13 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ jobs:
- '7.4'
fail-fast: false
env:
SYMFONY_DEPRECATIONS_HELPER: max[total]=7
SYMFONY_DEPRECATIONS_HELPER: max[total]=8
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -836,3 +836,4 @@ jobs:
run: tests/Fixtures/app/console cache:clear --ansi
- name: Run Behat tests
run: vendor/bin/behat --out=std --format=progress --profile=default --no-interaction

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
/tests/Fixtures/app/var/
/tests/Fixtures/app/public/bundles/
/vendor/
/Dockerfile
1 change: 1 addition & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ return PhpCsFixer\Config::create()
'@PHPUnit60Migration:risky' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'single_line_comment_style' => false, // Temporary fix for compatibility with PHP 8 attributes, see https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/5284
'align_multiline_comment' => [
'comment_type' => 'phpdocs_like',
],
Expand Down
22 changes: 21 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

## 2.6.0

* Display the API Platform's version in the debug-bar
* MongoDB: Possibility to add execute options (aggregate command fields) for a resource, like `allowDiskUse` (#3144)
* MongoDB: Mercure support (#3290)
* GraphQL: Subscription support with Mercure (#3321)
* GraphQL: Allow to format GraphQL errors based on exceptions (#3063)
* GraphQL: Add page-based pagination (#3175, #3517)
* GraphQL: Errors thrown from the GraphQL library can now be handled (#3632)
* GraphQL: Possibility to add a custom description for queries, mutations and subscriptions (#3477, #3514)
* GraphQL: Support for field name conversion (serialized name) (#3455, #3516)
* GraphQL: **BC** `operation` is now `operationName` to follow the standard (#3568)
* GraphQL: **BC** New syntax for the filters' arguments to preserve the order: `order: [{foo: 'asc'}, {bar: 'desc'}]` (#3468)
* OpenAPI: Add PHP default values to the documentation (#2386)
* Deprecate using a validation groups generator service not implementing `ApiPlatform\Core\Bridge\Symfony\Validator\ValidationGroupsGeneratorInterface` (#3346)
* Subresources: subresource resourceClass can now be defined as a container parameter in XML and Yaml definitions
* IriConverter: Fix IRI url double encoding - may cause breaking change as some characters no longer encoded in output (#3552)
* OpenAPI: **BC** Replace all characters other than `[a-zA-Z0-9\.\-_]` to `.` in definition names to be compliant with OpenAPI 3.0 (#3669)
* Add stateless ApiResource attribute

## 2.5.8

For compatibility reasons with Symfony 5.2 and PHP 8, we do not test these legacy packages nor their integration anymore:
Expand Down Expand Up @@ -130,7 +150,7 @@ For compatibility reasons with Symfony 5.2 and PHP 8, we do not test these legac

* Allow to not declare GET item operation
* Add support for the Accept-Patch header
* Make the `maximum_items_per_page` attribute consistent with other attributes controlling pagination
* Make the `maximum_items_per_page` attribute consistent with other attributes controlling pagination
* Allow to use a string instead of an array for serializer groups
* Test: Add a helper method to find the IRI of a resource
* Test: Add assertions for testing response against JSON Schema from API resource
Expand Down
9 changes: 1 addition & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ Then, if it appears that it's a real bug, you may report it using GitHub by foll

> _NOTE:_ Don't hesitate giving as much information as you can (OS, PHP version extensions...)

### Security Issues

If you find a security issue, send a mail to Kévin Dunglas <dunglas@gmail.com>. **Please do not report security problems
publicly**. We will disclose details of the issue and credit you after having released a new version including a fix.

## Pull Requests

### Writing a Pull Request
Expand Down Expand Up @@ -50,7 +45,7 @@ Alternatively, you can also work with the test application we provide:
### Matching Coding Standards

The API Platform project follows [Symfony coding standards](https://symfony.com/doc/current/contributing/code/standards.html).
But don't worry, you can fix CS issues automatically using the [PHP CS Fixer](http://cs.sensiolabs.org/) tool:
But don't worry, you can fix CS issues automatically using the [PHP CS Fixer](https://cs.sensiolabs.org/) tool:

php-cs-fixer.phar fix

Expand All @@ -68,8 +63,6 @@ When you send a PR, just make sure that:
that you did not make in your PR, you're doing it wrong.
* Also don't forget to add a comment when you update a PR with a ping to [the maintainers](https://github.com/orgs/api-platform/people), so he/she will get a notification.

All Pull Requests must include [this header](.github/PULL_REQUEST_TEMPLATE.md).

### Tests

On `api-platform/core` there are two kinds of tests: unit (`phpunit` through `simple-phpunit`) and integration tests (`behat`).
Expand Down
1 change: 1 addition & 0 deletions behat.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,4 @@ elasticsearch-coverage:
- 'ApiPlatform\Core\Tests\Behat\CoverageContext'
- 'Behat\MinkExtension\Context\MinkContext'
- 'behatch:context:rest'

4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"doctrine/mongodb-odm-bundle": "To support MongoDB. Only versions 4.0 and later are supported.",
"elasticsearch/elasticsearch": "To support Elasticsearch.",
"guzzlehttp/guzzle": "To use the HTTP cache invalidation system.",
"ocramius/package-versions": "To display the API Platform's version in the debug bar.",
"phpdocumentor/reflection-docblock": "To support extracting metadata from PHPDoc.",
"psr/cache-implementation": "To use metadata caching.",
"ramsey/uuid": "To support Ramsey's UUID identifiers.",
Expand All @@ -101,6 +102,7 @@
"symfony/expression-language": "To use authorization features.",
"symfony/security": "To use authorization features.",
"symfony/twig-bundle": "To use the Swagger UI integration.",
"symfony/uid": "To support Symfony UUID/ULID identifiers.",
"symfony/web-profiler-bundle": "To use the data collector.",
"webonyx/graphql-php": "To support GraphQL."
},
Expand All @@ -122,7 +124,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.5.x-dev"
"dev-master": "2.6.x-dev"
},
"symfony": {
"require": "^3.4 || ^4.4 || ^5.1"
Expand Down
157 changes: 157 additions & 0 deletions docs/adr/0000-subresources-definition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
# Subresource Definition

* Status: proposed
* Deciders: @dunglas, @vincentchalamon, @soyuka, @GregoireHebert, @Deuchnord

## Context and Problem Statement

Subresources introduced in 2017 ([#904][pull/904]) the `ApiSubresource` annotation. This definition came along with its own set of issues ([#2706][issue/2706]) and needs a refreshment. On top of that, write support on subresources is a wanted feature and it is hard to implement currently ([#2598][pull/2598]) (See [ADR-0001-subresource-write-support](./0001-subresource-write-support.md)). How can we revamp the Subresource definition to improve the developer experience and reduce the complexity?

## Considered Options

* Fix the current `ApiSubresource` annotation
* Use multiple `ApiResource` to declare subresources and deprecate `ApiSubresource`
* Deprecate subresources

## Decision Outcome

We choose to use multiple `ApiResource` annotations to declare subresources on a given Model class:

* Subresource declaration is an important feature and removing it would harm the software.
* The `ApiSubresource` annotation is declared on a Model's properties, which was identified as the root of several issues. For example, finding what class it is defined on ([#3458][issue/3458]). Having multiple `ApiResource` would improve a lot the declaration of our internal metadata and would cause less confusion for developers.
* The `path` of these multiple `ApiResource` needs to be explicitly described.
* An `ApiResource` is always defined on the Resource it represents: `/companies/1/users` outputs Users and should be defined on the `User` model.
* PropertyInfo and Doctrine metadata can be used to define how is the Resource identified according to the given path.

### Examples

Get Users belonging to the company on (`/companies/1/users`);

```php
/**
* @ApiResource(path="/users")
* @ApiResource(path="/companies/{companyId}/users")
*/
class User {
/** @ApiProperty(identifier=true) */
public int $id;

/** @var Company[] */
public array $companies = [];
}
```

With explicit identifiers, the tuple is explained in [ADR-0002-identifiers](./0002-identifiers) `{parameterName: {Class, property}}`:

```php
/**
* @ApiResource(path="/users", identifiers={"id": {User::class, "id"}})
* @ApiResource(path="/companies/{companyId}/users", identifiers={"companyId": {Company::class, "id"}, "id": {User::class, "id"}})
*/
class User {
/** @ApiProperty(identifier=true) */
public int $id;

/** @var Company[] */
public array $companies = [];
}
```

Two-level subresource to get the Users belonging to the Company #1 located in France `/countries/fr/companies/1/users`:

```php
/**
* @ApiResource(path="/users")
* @ApiResource(path="/countries/{countryId}/companies/{companyId}/users")
*/
class User {
/** @ApiProperty(identifier=true) */
public int $id;

/** @var Company[] */
public array $companies = [];
}

class Company {
/** @ApiProperty(identifier=true) */
public int $id;

/** @var Country[] **/
public array $countries = [];
}

class Country {
/** @ApiProperty(identifier=true) */
public string $shortName;
}
```

With explicit identifiers:

```php
/**
* @ApiResource(path="/users", identifiers={"id": {User::class, "id"}})
* @ApiResource(path="/countries/{countryId}/companies/{companyId}/users", identifiers={"companyId": {Company::class, "id"}, "countryId": {Country::class, "shortName"}, "id": {User::class, "id"}})
*/
class User {
/** @ApiProperty(identifier=true) */
public int $id;

/** @var Company[] */
public array $companies = [];
}

class Company {
/** @ApiProperty(identifier=true) */
public int $id;

/** @var Country[] **/
public array $countries = [];
}

class Country {
/** @ApiProperty(identifier=true) */
public string $shortName;
}
```

Get the company employees or administrators `/companies/1/administrators`:

```php
/**
* @ApiResource(path="/users")
* @ApiResource(path="/companies/{companyId}/administrators")
* @ApiResource(path="/companies/{companyId}/employees")
*/
class User {
/** @ApiProperty(identifier=true) */
public int $id;

/** @var Company[] */
public array $companies = [];
}

class Company {
/** @ApiProperty(identifier=true) */
public int $id;

/** @var User[] **/
public array $employees;

/** @var User[] **/
public array $administrators;
}
```

This example will require a custom DataProvider as the discriminator needs to be explicit.

## Links

* [Subresource refactor][pull/3689]


[pull/904]: https://github.com/api-platform/core/pull/904 "Subresource feature"
[issue/2706]: https://github.com/api-platform/core/issues/2706 "Subresource RFC"
[pull/2598]: https://github.com/api-platform/core/pull/2598 "Subresource write support"
[issue/3458]: https://github.com/api-platform/core/pull/3458 "Subresource poor DX"
[pull/3689]: https://github.com/api-platform/core/pull/3689 "Revamp subresource"
Loading