Skip to content

Commit 7448cd6

Browse files
committed
Merge 3.4
2 parents af66075 + 985a9a0 commit 7448cd6

File tree

5 files changed

+20
-10
lines changed

5 files changed

+20
-10
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,16 @@ Notes:
211211

212212
* [0d5f35683](https://github.com/api-platform/core/commit/0d5f356839eb6aa9f536044abe4affa736553e76) feat(laravel): laravel component (#5882)
213213

214+
## v3.4.8
215+
216+
### Bug fixes
217+
218+
* [4d7deeaf7](https://github.com/api-platform/core/commit/4d7deeaf794178b5496ae989520095831a86df8a) fix(jsonld): check if supportedTypes exists (#6825)
219+
* [5111935d4](https://github.com/api-platform/core/commit/5111935d4f917920c6f3d24b828f9d59fd0e3520) fix(symfony): object typed property schema collection restriction (#6823)
220+
* [6bf894f6f](https://github.com/api-platform/core/commit/6bf894f6f0ead0751936aeddcfc527f017498bb3) fix(serializer): use attribute denormalization context for constructor arguments (#6821)
221+
* [86c97cac3](https://github.com/api-platform/core/commit/86c97cac3b8d45b6190e2999b99a02e88dd4e527) fix(symfony): symfony 7.2 deprecations (#6835)
222+
* [d312eae7e](https://github.com/api-platform/core/commit/d312eae7ef590ec05139c09bfaf2d3c7668a3f22) fix(doctrine): fixed orm datefilter applying inner join when no filtering values have been provided (#6849)
223+
214224
## v3.4.7
215225

216226
### Bug fixes

src/Doctrine/Orm/Filter/DateFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ protected function filterProperty(string $property, $values, QueryBuilder $query
153153
$alias = $queryBuilder->getRootAliases()[0];
154154
$field = $property;
155155

156-
if ($this->isPropertyNested($property, $resourceClass)) {
156+
if ($this->isPropertyNested($property, $resourceClass) && \count($values) > 0) {
157157
[$alias, $field] = $this->addJoinsForNestedProperty($property, $alias, $queryBuilder, $queryNameGenerator, $resourceClass, Join::INNER_JOIN);
158158
}
159159

src/Symfony/Validator/Metadata/Property/Restriction/PropertySchemaCollectionRestriction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function create(Constraint $constraint, ApiProperty $propertyMetadata): a
4040
{
4141
$restriction = [
4242
'type' => 'object',
43-
'properties' => [],
43+
'properties' => new \ArrayObject(),
4444
'additionalProperties' => $constraint->allowExtraFields,
4545
];
4646
$required = [];

tests/Symfony/Validator/Metadata/Property/Restriction/PropertySchemaCollectionRestrictionTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function testCreate(Constraint $constraint, ApiProperty $propertyMetadata
7575

7676
public static function createProvider(): \Generator
7777
{
78-
yield 'empty' => [new Collection([]), new ApiProperty(), ['type' => 'object', 'properties' => [], 'additionalProperties' => false]];
78+
yield 'empty' => [new Collection([]), new ApiProperty(), ['type' => 'object', 'properties' => new \ArrayObject(), 'additionalProperties' => false]];
7979

8080
$fields = [
8181
'name' => new Required([
@@ -100,13 +100,13 @@ public static function createProvider(): \Generator
100100
],
101101
]),
102102
];
103-
$properties = [
103+
$properties = new \ArrayObject([
104104
'name' => new \ArrayObject(),
105105
'email' => ['minLength' => 2, 'maxLength' => 255, 'format' => 'email'],
106106
'phone' => ['pattern' => '^([+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\s\./0-9]*)$'],
107107
'age' => ['exclusiveMinimum' => 0],
108-
'social' => ['type' => 'object', 'properties' => ['githubUsername' => new \ArrayObject()], 'additionalProperties' => false, 'required' => ['githubUsername']],
109-
];
108+
'social' => ['type' => 'object', 'properties' => new \ArrayObject(['githubUsername' => new \ArrayObject()]), 'additionalProperties' => false, 'required' => ['githubUsername']],
109+
]);
110110
$required = ['name', 'email', 'social'];
111111

112112
yield 'with fields' => [

tests/Symfony/Validator/Metadata/Property/ValidatorPropertyMetadataFactoryTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ public function testCreateWithPropertyCollectionRestriction(): void
622622

623623
$this->assertEquals([
624624
'type' => 'object',
625-
'properties' => [
625+
'properties' => new \ArrayObject([
626626
'name' => new \ArrayObject(),
627627
'email' => ['format' => 'email', 'minLength' => 2, 'maxLength' => 255],
628628
'phone' => ['pattern' => '^([+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\s\./0-9]*)$'],
@@ -631,13 +631,13 @@ public function testCreateWithPropertyCollectionRestriction(): void
631631
],
632632
'social' => [
633633
'type' => 'object',
634-
'properties' => [
634+
'properties' => new \ArrayObject([
635635
'githubUsername' => new \ArrayObject(),
636-
],
636+
]),
637637
'additionalProperties' => false,
638638
'required' => ['githubUsername'],
639639
],
640-
],
640+
]),
641641
'additionalProperties' => true,
642642
'required' => ['name', 'email', 'social'],
643643
], $schema);

0 commit comments

Comments
 (0)