Skip to content

Commit e05b62a

Browse files
committed
Merge remote-tracking branch 'upstream/2.6' into merge-26
2 parents f937475 + 1eaacf2 commit e05b62a

File tree

272 files changed

+1356
-1145
lines changed

Some content is hidden

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

272 files changed

+1356
-1145
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@ jobs:
1717
strategy:
1818
matrix:
1919
php:
20-
- '8'
20+
- '8.0'
2121
fail-fast: false
22-
env:
23-
PHP_CS_FIXER_FUTURE_MODE: '1'
2422
steps:
2523
- name: Checkout
2624
uses: actions/checkout@v2
@@ -42,7 +40,7 @@ jobs:
4240
strategy:
4341
matrix:
4442
php:
45-
- '8'
43+
- '8.0'
4644
fail-fast: false
4745
env:
4846
APP_DEBUG: '1' # https://github.com/phpstan/phpstan-symfony/issues/37

.php-cs-fixer.dist.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@
3636
'@PHPUnit60Migration:risky' => true,
3737
'@Symfony' => true,
3838
'@Symfony:risky' => true,
39-
'single_line_comment_style' => false, // Temporary fix for compatibility with PHP 8 attributes, see https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/5284
40-
'comment_to_phpdoc' => true, // Temporary fix for compatibility with PHP 8 attributes, see https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/5284
4139
'align_multiline_comment' => [
4240
'comment_type' => 'phpdocs_like',
4341
],
@@ -76,9 +74,10 @@
7674
],
7775
],
7876
'no_superfluous_elseif' => true,
79-
'no_superfluous_phpdoc_tags' => [
80-
'allow_mixed' => false,
81-
],
77+
// To re-enable in API Platform 3: https://github.com/symfony/symfony/issues/43021
78+
//'no_superfluous_phpdoc_tags' => [
79+
// 'allow_mixed' => false,
80+
//],
8281
'no_unset_cast' => true,
8382
'no_unset_on_property' => true,
8483
'no_useless_else' => true,

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,20 @@
4646
* Add support for `security_post_validation` attribute
4747
* Mark the GraphQL subsystem as stable (#4500)
4848

49+
## 2.6.6
50+
51+
* fix(json-schema): consider `SplFileInfo` class as a binary type (#4332)
52+
* fix(json-schema): use `collectionKeyType` for building JSON Schema (#4385)
53+
* fix(openapi): failing recursion on api resources with "paths" key (#4325)
54+
* fix(graphql): make sure form content type is recognized as a multipart request (#4461)
55+
* fix(doctrine): handle inverse side of OneToOne association in Doctrine search filter (#4366)
56+
* fix(doctrine): usage of deprecated DBAL type constants (#4399)
57+
* fix(test): fix `REMOTE_ADDR` support in `ApiTestCase` (#4446)
58+
* fix(docs): use `asset_package` for all assets (#4470)
59+
* fix(docs): upgrade Swagger UI to version 3.52.3 (#4477)
60+
* fix(docs): upgrade ReDoc to version 2.0.0-rc.56 (#4477)
61+
* fix(docs): upgrade Swagger UI to version 2.0.0-rc.56 (#4477)
62+
4963
## 2.6.5
5064

5165
* Fix various usage of various deprecated methods

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"symfony/framework-bundle": "^4.4 || ^5.1",
7474
"symfony/http-client": "^4.4 || ^5.1",
7575
"symfony/maker-bundle": "^1.24",
76+
"symfony/intl": "^4.4 || ^5.3",
7677
"symfony/mercure-bundle": "*",
7778
"symfony/messenger": "^4.4 || ^5.1",
7879
"symfony/phpunit-bridge": "^5.1.7",

features/jsonld/non_resource.feature

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,34 @@ Feature: JSON-LD non-resource handling
3838
}
3939
"""
4040

41+
Scenario: Get a resource containing a raw object with selected properties
42+
Given there are 1 dummy objects with relatedDummy and its thirdLevel
43+
When I send a "GET" request to "/contain_non_resources/1?properties[]=id&properties[nested][notAResource][]=foo&properties[notAResource][]=bar"
44+
Then the response status code should be 200
45+
And the response should be in JSON
46+
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
47+
And the JSON should be a superset of:
48+
"""
49+
{
50+
"@context": "/contexts/ContainNonResource",
51+
"@id": "/contain_non_resources/1",
52+
"@type": "ContainNonResource",
53+
"id": 1,
54+
"nested": {
55+
"@id": "/contain_non_resources/1-nested",
56+
"@type": "ContainNonResource",
57+
"notAResource": {
58+
"@type": "NotAResource",
59+
"foo": "f2"
60+
}
61+
},
62+
"notAResource": {
63+
"@type": "NotAResource",
64+
"bar": "b1"
65+
}
66+
}
67+
"""
68+
4169
@!mongodb
4270
@createSchema
4371
Scenario: Create a resource that has a non-resource relation.

src/Api/IdentifiersExtractor.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ public function getIdentifiersFromItem($item, string $operationName = null, arra
7575

7676
/**
7777
* Gets the value of the given class property.
78+
*
79+
* @param mixed $item
7880
*/
7981
private function getIdentifierValue($item, string $class, string $property, string $parameterName)
8082
{

src/Core/Api/ResourceClassResolverInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ interface ResourceClassResolverInterface
2727
*
2828
* @param string $resourceClass The expected resource class
2929
* @param bool $strict If true, value must match the expected resource class
30+
* @param mixed $value
3031
*
3132
* @throws InvalidArgumentException
3233
*/

src/Core/Bridge/Doctrine/Common/DataPersister.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ public function remove($data, array $context = [])
8080

8181
/**
8282
* Gets the Doctrine object manager associated with given data.
83+
*
84+
* @param mixed $data
8385
*/
8486
private function getManager($data): ?DoctrineObjectManager
8587
{
@@ -88,6 +90,8 @@ private function getManager($data): ?DoctrineObjectManager
8890

8991
/**
9092
* Checks if doctrine does not manage data automatically.
93+
*
94+
* @param mixed $data
9195
*/
9296
private function isDeferredExplicit(DoctrineObjectManager $manager, $data): bool
9397
{

src/Core/Bridge/Doctrine/EventListener/WriteListener.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ public function onKernelView(ViewEvent $event): void
7171

7272
/**
7373
* Gets the manager if applicable.
74+
*
75+
* @param mixed $data
7476
*/
7577
private function getManager(string $resourceClass, $data): ?ObjectManager
7678
{

src/Core/Bridge/Doctrine/MongoDbOdm/CollectionDataProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ final class CollectionDataProvider implements CollectionDataProviderInterface, R
3838

3939
/**
4040
* @param AggregationCollectionExtensionInterface[] $collectionExtensions
41+
* @param mixed $resourceMetadataFactory
4142
*/
4243
public function __construct(ManagerRegistry $managerRegistry, $resourceMetadataFactory, iterable $collectionExtensions = [])
4344
{
@@ -56,7 +57,7 @@ public function supports(string $resourceClass, string $operationName = null, ar
5657
*
5758
* @throws RuntimeException
5859
*/
59-
public function getCollection(string $resourceClass, string $operationName = null, array $context = [])
60+
public function getCollection(string $resourceClass, string $operationName = null, array $context = []): iterable
6061
{
6162
/** @var DocumentManager $manager */
6263
$manager = $this->managerRegistry->getManagerForClass($resourceClass);

0 commit comments

Comments
 (0)