Skip to content

Commit ad95455

Browse files
committed
Merge 4.2
2 parents 325a04c + 028325b commit ad95455

File tree

285 files changed

+1119
-1504
lines changed

Some content is hidden

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

285 files changed

+1119
-1504
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ composer.lock
1717
/tests/Metadata/Extractor/Adapter/*.yaml
1818
/vendor/
1919
/Dockerfile
20-
20+
tests/Fixtures/app/config/reference.php

.php-cs-fixer.dist.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@
2121
'docs/guides',
2222
'docs/var',
2323
'src/Doctrine/Orm/Tests/var',
24-
'src/Doctrine/Odm/Tests/var'
24+
'src/Doctrine/Odm/Tests/var',
2525
])
26+
->notPath('tests/Fixtures/app/config/reference.php')
2627
->notPath('src/Symfony/Bundle/DependencyInjection/Configuration.php')
2728
->append([
2829
'tests/Fixtures/app/console',
2930
]);
3031

3132
return (new PhpCsFixer\Config())
33+
->setUnsupportedPhpVersionAllowed(true)
3234
->setRiskyAllowed(true)
3335
->setRules([
3436
'@DoctrineAnnotation' => true,

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@
77
* [21aa2572d](https://github.com/api-platform/core/commit/21aa2572d8fef2b3f05f7307c51348a6c9767e45) feat(elasticsearch): add SSL options for Elasticsearch configuration (#4059)
88
* [ba0c76c](https://github.com/api-platform/core/commit/ba0c76c6f5c8afa8622e87a155b8b99f453d6453) feat(doctrine): remove put & path for readonly entity (#7019)
99

10+
## v4.2.7
11+
12+
**Symfony 8.0 compatible.**
13+
14+
### Bug fixes
15+
16+
* [44af80c43](https://github.com/api-platform/core/commit/44af80c434083046b57a0272c4f8789151f2d0f8) fix(symfony): disable Swagger UI and keep openapi.json (#7549)
17+
* [4dfa8da8b](https://github.com/api-platform/core/commit/4dfa8da8b09d2f4226632e7aaaa87110ed28ae3a) fix(metadata): repeatable attribute mutators (#7542)
18+
* [5e2f729ed](https://github.com/api-platform/core/commit/5e2f729ed2a7cc40811a7c67d4b32f7111834528) fix(state): never map a response (#7543)
19+
* [e9af8905c](https://github.com/api-platform/core/commit/e9af8905c35484fe97b719d28112483dfa403642) fix(metadata): disable pagination maximum items per page (#7553)
20+
1021
## v4.2.6
1122

1223
### Bug fixes

composer.json

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"dev-main": "4.3.x-dev"
5454
},
5555
"symfony": {
56-
"require": "^6.4 || ^7.1"
56+
"require": "^6.4 || ^7.1 || ^8.0"
5757
},
5858
"pmu": {
5959
"projects": [
@@ -111,15 +111,15 @@
111111
"psr/cache": "^1.0 || ^2.0 || ^3.0",
112112
"psr/container": "^1.0 || ^2.0",
113113
"symfony/deprecation-contracts": "^3.1",
114-
"symfony/http-foundation": "^6.4.14 || ^7.0",
115-
"symfony/http-kernel": "^6.4 || ^7.0",
116-
"symfony/property-access": "^6.4 || ^7.0",
117-
"symfony/property-info": "^6.4 || ^7.1",
118-
"symfony/serializer": "^6.4 || ^7.0",
114+
"symfony/http-foundation": "^6.4.14 || ^7.0 || ^8.0",
115+
"symfony/http-kernel": "^6.4 || ^7.0 || ^8.0",
116+
"symfony/property-access": "^6.4 || ^7.0 || ^8.0",
117+
"symfony/property-info": "^6.4 || ^7.1 || ^8.0",
118+
"symfony/serializer": "^6.4 || ^7.0 || ^8.0",
119119
"symfony/translation-contracts": "^3.3",
120-
"symfony/type-info": "^7.3 || 7.4.x-dev",
121-
"symfony/validator": "^6.4.11 || ^7.1",
122-
"symfony/web-link": "^6.4 || ^7.1",
120+
"symfony/type-info": "^7.4 || ^8.0",
121+
"symfony/validator": "^6.4.11 || ^7.1 || ^8.0",
122+
"symfony/web-link": "^6.4 || ^7.1 || ^8.0",
123123
"willdurand/negotiation": "^3.1"
124124
},
125125
"require-dev": {
@@ -129,7 +129,7 @@
129129
"doctrine/cache": "^1.11 || ^2.1",
130130
"doctrine/common": "^3.2.2",
131131
"doctrine/dbal": "^4.0",
132-
"doctrine/doctrine-bundle": "^2.11",
132+
"doctrine/doctrine-bundle": "^2.11 || ^3.1",
133133
"doctrine/mongodb-odm": "^2.10",
134134
"doctrine/mongodb-odm-bundle": "^5.0",
135135
"doctrine/orm": "^2.17 || ^3.0",
@@ -163,38 +163,38 @@
163163
"soyuka/contexts": "^3.3.10",
164164
"soyuka/pmu": "^0.2.0",
165165
"soyuka/stubs-mongodb": "^1.0",
166-
"symfony/asset": "^6.4 || ^7.0",
167-
"symfony/browser-kit": "^6.4 || ^7.0",
168-
"symfony/cache": "^6.4 || ^7.0",
169-
"symfony/config": "^6.4 || ^7.0",
170-
"symfony/console": "^6.4 || ^7.0",
171-
"symfony/css-selector": "^6.4 || ^7.0",
172-
"symfony/dependency-injection": "^6.4 || ^7.0",
173-
"symfony/doctrine-bridge": "^6.4.2 || ^7.1",
174-
"symfony/dom-crawler": "^6.4 || ^7.0",
175-
"symfony/error-handler": "^6.4 || ^7.0",
176-
"symfony/event-dispatcher": "^6.4 || ^7.0",
177-
"symfony/expression-language": "^6.4 || ^7.0",
178-
"symfony/finder": "^6.4 || ^7.0",
179-
"symfony/form": "^6.4 || ^7.0",
180-
"symfony/framework-bundle": "^6.4 || ^7.0 || 7.4.x-dev",
181-
"symfony/http-client": "^6.4 || ^7.0",
182-
"symfony/intl": "^6.4 || ^7.0",
183-
"symfony/json-streamer": "7.4.x-dev",
166+
"symfony/asset": "^6.4 || ^7.0 || ^8.0",
167+
"symfony/browser-kit": "^6.4 || ^7.0 || ^8.0",
168+
"symfony/cache": "^6.4 || ^7.0 || ^8.0",
169+
"symfony/config": "^6.4 || ^7.0 || ^8.0",
170+
"symfony/console": "^6.4 || ^7.0 || ^8.0",
171+
"symfony/css-selector": "^6.4 || ^7.0 || ^8.0",
172+
"symfony/dependency-injection": "^6.4 || ^7.0 || ^8.0",
173+
"symfony/doctrine-bridge": "^6.4.2 || ^7.1 || ^8.0",
174+
"symfony/dom-crawler": "^6.4 || ^7.0 || ^8.0",
175+
"symfony/error-handler": "^6.4 || ^7.0 || ^8.0",
176+
"symfony/event-dispatcher": "^6.4 || ^7.0 || ^8.0",
177+
"symfony/expression-language": "^6.4 || ^7.0 || ^8.0",
178+
"symfony/finder": "^6.4 || ^7.0 || ^8.0",
179+
"symfony/form": "^6.4 || ^7.0 || ^8.0",
180+
"symfony/framework-bundle": "^6.4 || ^7.0 || ^8.0",
181+
"symfony/http-client": "^6.4 || ^7.0 || ^8.0",
182+
"symfony/intl": "^6.4 || ^7.0 || ^8.0",
183+
"symfony/json-streamer": "^7.4 || ^8.0",
184184
"symfony/maker-bundle": "^1.24",
185185
"symfony/mercure-bundle": "*",
186-
"symfony/messenger": "^6.4 || ^7.0",
187-
"symfony/object-mapper": "^7.3 || 7.4.x-dev",
188-
"symfony/routing": "^6.4 || ^7.0",
189-
"symfony/security-bundle": "^6.4 || ^7.0",
190-
"symfony/security-core": "^6.4 || ^7.0",
191-
"symfony/stopwatch": "^6.4 || ^7.0",
192-
"symfony/string": "^6.4 || ^7.0",
193-
"symfony/twig-bundle": "^6.4 || ^7.0",
194-
"symfony/uid": "^6.4 || ^7.0",
195-
"symfony/var-exporter": "^7.3 || ^7.4.x-dev",
196-
"symfony/web-profiler-bundle": "^6.4 || ^7.0",
197-
"symfony/yaml": "^6.4 || ^7.0",
186+
"symfony/messenger": "^6.4 || ^7.0 || ^8.0",
187+
"symfony/object-mapper": "^7.4 || ^8.0",
188+
"symfony/routing": "^6.4 || ^7.0 || ^8.0",
189+
"symfony/security-bundle": "^6.4 || ^7.0 || ^8.0",
190+
"symfony/security-core": "^6.4 || ^7.0 || ^8.0",
191+
"symfony/stopwatch": "^6.4 || ^7.0 || ^8.0",
192+
"symfony/string": "^6.4 || ^7.0 || ^8.0",
193+
"symfony/twig-bundle": "^6.4 || ^7.0 || ^8.0",
194+
"symfony/uid": "^6.4 || ^7.0 || ^8.0",
195+
"symfony/var-exporter": "^7.4 || ^8.0",
196+
"symfony/web-profiler-bundle": "^6.4 || ^7.0 || ^8.0",
197+
"symfony/yaml": "^6.4 || ^7.0 || ^8.0",
198198
"twig/twig": "^1.42.3 || ^2.12 || ^3.0",
199199
"webonyx/graphql-php": "^15.0"
200200
},

docs/config/packages/doctrine.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ doctrine:
22
dbal:
33
url: 'sqlite:///%kernel.project_dir%/var/%guide%.db'
44
orm:
5-
auto_generate_proxy_classes: true
65
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
76
auto_mapping: false

phpstan.neon.dist

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,17 @@ parameters:
3535
- src/*/vendor/*
3636
# Symfony 6 support
3737
- src/Symfony/Bundle/ArgumentResolver/CompatibleValueResolverInterface.php
38+
- tests/Fixtures/app/config/reference.php
3839
earlyTerminatingMethodCalls:
3940
PHPUnit\Framework\Constraint\Constraint:
4041
- fail
4142
ApiPlatform\Metadata\Resource\ResourceMetadataCollection:
4243
- handleNotFound
4344
ignoreErrors:
45+
# ignore type todo remove in 5.0
46+
-
47+
message: '#Symfony\\Component\\PropertyInfo\\Type#'
48+
identifier: class.notFound
4449
# False positives
4550
- message: '#Call to an undefined method Negotiation\\AcceptHeader::getType\(\).#'
4651
-
@@ -77,32 +82,17 @@ parameters:
7782
message: '#Service "test" is not registered in the container\.#'
7883
path: src/GraphQl/Tests/Type/TypesContainerTest.php
7984

80-
# Expected, due to optional interfaces
81-
- '#Method Symfony\\Component\\Serializer\\NameConverter\\NameConverterInterface::denormalize\(\) invoked with (2|3|4) parameters, 1 required\.#'
82-
- '#Method Symfony\\Component\\Serializer\\NameConverter\\NameConverterInterface::normalize\(\) invoked with (2|3|4) parameters, 1 required\.#'
83-
8485
# Expected, due to backward compatibility
8586
- '#Method GraphQL\\Type\\Definition\\WrappingType::getWrappedType\(\) invoked with 1 parameter, 0 required\.#'
8687
- '#Access to an undefined property GraphQL\\Type\\Definition\\NamedType&GraphQL\\Type\\Definition\\Type::\$name\.#'
8788
- "#Call to function method_exists\\(\\) with GraphQL\\\\Type\\\\Definition\\\\Type&GraphQL\\\\Type\\\\Definition\\\\WrappingType and 'getInnermostType' will always evaluate to true\\.#"
88-
- "#Call to function method_exists\\(\\) with Symfony\\\\Component\\\\Console\\\\Application and 'addCommand' will always evaluate to false\\.#"
8989
- "#Call to function method_exists\\(\\) with 'Symfony\\\\\\\\Component\\\\\\\\PropertyInfo\\\\\\\\PropertyInfoExtractor' and 'getType' will always evaluate to true\\.#"
9090
- "#Call to function method_exists\\(\\) with 'Symfony\\\\\\\\Component\\\\\\\\HttpFoundation\\\\\\\\Request' and 'getContentTypeFormat' will always evaluate to true\\.#"
9191
- '#Call to an undefined method Symfony\\Component\\HttpFoundation\\Request::getContentType\(\)\.#'
9292
- "#Call to function method_exists\\(\\) with 'Symfony\\\\\\\\Component\\\\\\\\Serializer\\\\\\\\Serializer' and 'getSupportedTypes' will always evaluate to true\\.#"
9393
- "#Call to function method_exists\\(\\) with Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface and 'getSupportedTypes' will always evaluate to true\\.#"
9494
- "#Call to function method_exists\\(\\) with Doctrine\\\\ODM\\\\MongoDB\\\\Configuration and 'setMetadataCache' will always evaluate to true\\.#"
9595
- "#Call to function method_exists\\(\\) with Doctrine\\\\ODM\\\\MongoDB\\\\Mapping\\\\ClassMetadata\\|Doctrine\\\\ORM\\\\Mapping\\\\ClassMetadata and 'isChangeTrackingDef…' will always evaluate to true\\.#"
96-
-
97-
message: '#Instanceof between Symfony\\Component\\Serializer\\NameConverter\\NameConverterInterface and Symfony\\Component\\Serializer\\NameConverter\\MetadataAwareNameConverter will always evaluate to false\.#'
98-
paths:
99-
- src/GraphQl/Serializer/SerializerContextBuilder.php
100-
- src/GraphQl/Type/FieldsBuilder.php
101-
-
102-
message: '#Instanceof between Symfony\\Component\\Serializer\\NameConverter\\NameConverterInterface\|null and Symfony\\Component\\Serializer\\NameConverter\\MetadataAwareNameConverter will always evaluate to false\.#'
103-
paths:
104-
- src/Serializer/AbstractConstraintViolationListNormalizer.php
105-
- src/Symfony/Validator/Serializer/ValidationExceptionNormalizer.php
10696

10797
# See https://github.com/phpstan/phpstan-symfony/issues/27
10898
-
@@ -183,6 +173,3 @@ parameters:
183173
identifier: method.notFound
184174
paths:
185175
- tests/Functional/JsonStreamerTest.php
186-
-
187-
paths:
188-
- tests/Fixtures/app/config/reference.php

src/Doctrine/Common/Tests/Fixtures/TestBundle/Entity/DummyFriend.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use ApiPlatform\Metadata\ApiProperty;
1717
use ApiPlatform\Metadata\ApiResource;
1818
use Doctrine\ORM\Mapping as ORM;
19-
use Symfony\Component\Serializer\Annotation\Groups;
19+
use Symfony\Component\Serializer\Attribute\Groups;
2020
use Symfony\Component\Validator\Constraints as Assert;
2121

2222
/**

src/Doctrine/Common/Tests/Fixtures/TestBundle/Entity/EmbeddableDummy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
namespace ApiPlatform\Doctrine\Common\Tests\Fixtures\TestBundle\Entity;
1515

1616
use Doctrine\ORM\Mapping as ORM;
17-
use Symfony\Component\Serializer\Annotation\Groups;
17+
use Symfony\Component\Serializer\Attribute\Groups;
1818
use Symfony\Component\Validator\Constraints as Assert;
1919

2020
/**

src/Doctrine/Common/Tests/Fixtures/TestBundle/Entity/FourthLevel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
use ApiPlatform\Metadata\Link;
1919
use Doctrine\Common\Collections\Collection;
2020
use Doctrine\ORM\Mapping as ORM;
21-
use Symfony\Component\Serializer\Annotation\Groups;
21+
use Symfony\Component\Serializer\Attribute\Groups;
2222

2323
/**
2424
* Fourth Level.

src/Doctrine/Common/Tests/Fixtures/TestBundle/Entity/ParentDummy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
namespace ApiPlatform\Doctrine\Common\Tests\Fixtures\TestBundle\Entity;
1515

1616
use Doctrine\ORM\Mapping as ORM;
17-
use Symfony\Component\Serializer\Annotation\Groups;
17+
use Symfony\Component\Serializer\Attribute\Groups;
1818

1919
/**
2020
* Parent Dummy.

0 commit comments

Comments
 (0)