Skip to content

Commit 754e499

Browse files
committed
chore: remove deprecations
1 parent 2e92aea commit 754e499

File tree

525 files changed

+1969
-22727
lines changed

Some content is hidden

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

525 files changed

+1969
-22727
lines changed

.github/workflows/ci.yml

+17-278
Large diffs are not rendered by default.

.php-cs-fixer.dist.php

-8
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,6 @@
2222
'src/Doctrine/Odm/Tests/var'
2323
])
2424
->notPath('src/Symfony/Bundle/DependencyInjection/Configuration.php')
25-
->notPath('src/Annotation/ApiFilter.php') // temporary
26-
->notPath('src/Annotation/ApiProperty.php') // temporary
27-
->notPath('src/Annotation/ApiResource.php') // temporary
28-
->notPath('src/Annotation/ApiSubresource.php') // temporary
29-
->notPath('tests/Fixtures/TestBundle/Entity/DummyPhp8.php') // temporary
30-
->notPath('tests/Fixtures/TestBundle/Enum/EnumWithDescriptions.php') // PHPDoc on enum cases
31-
->notPath('tests/Fixtures/TestBundle/Enum/GamePlayMode.php') // PHPDoc on enum cases
32-
->notPath('tests/Fixtures/TestBundle/Enum/GenderTypeEnum.php') // PHPDoc on enum cases
3325
->append([
3426
'tests/Fixtures/app/console',
3527
]);

CONTRIBUTING.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -117,18 +117,19 @@ Only the first commit on a Pull Request need to use a conventional commit, other
117117

118118
### Tests
119119

120-
On `api-platform/core` there are two kinds of tests: unit (`phpunit` through `simple-phpunit`) and integration tests (`behat`).
120+
On `api-platform/core` there are two kinds of tests: unit (`phpunit`) and integration tests (`behat`).
121121

122122
Note that we stopped using `prophesize` for new tests since 3.2, use `phpunit` stub system.
123123

124-
Both `simple-phpunit` and `behat` are development dependencies and should be available in the `vendor` directory.
124+
Both `phpunit` and `behat` are development dependencies and should be available in the `vendor` directory.
125125

126126
Recommendations:
127127

128128
* don't change existing tests if possible
129129
* always add a new `ApiResource` or a new `Entity/Document` to add a new test instead of changing an existing class
130130
* as of API Platform 3 each component has it's own test directory, avoid the `tests/` directory except for functional tests
131131
* dependencies between components must be kept at its minimal (`api-platform/metadata`, `api-platform/state`) except for bridges (Doctrine, Symfony, Laravel etc.)
132+
* for functional testing with phpunit (see `tests/Functional`, add your ApiResource to `ApiPlatform\Tests\Fixtures\PhpUnitResourceNameCollectionFactory`)
132133

133134
Note that in most of the testing, you don't need Doctrine take a look at how we write fixtures at:
134135

composer.json

+19-24
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"symfony/serializer": "^6.4 || ^7.1",
3636
"symfony/translation-contracts": "^3.3",
3737
"symfony/web-link": "^6.4 || ^7.1",
38-
"willdurand/negotiation": "^3.0"
38+
"willdurand/negotiation": "^3.1"
3939
},
4040
"require-dev": {
4141
"behat/behat": "^3.11",
@@ -47,35 +47,34 @@
4747
"doctrine/mongodb-odm": "^2.2",
4848
"doctrine/mongodb-odm-bundle": "^4.0 || ^5.0",
4949
"doctrine/orm": "^2.14 || ^3.0",
50-
"elasticsearch/elasticsearch": "^7.11 || ^8.4",
50+
"elasticsearch/elasticsearch": "^8.4",
5151
"friends-of-behat/mink-browserkit-driver": "^1.3.1",
5252
"friends-of-behat/mink-extension": "^2.2",
5353
"friends-of-behat/symfony-extension": "^2.1",
54-
"guzzlehttp/guzzle": "^6.0 || ^7.1",
55-
"illuminate/config": "^10.0||^11.0",
56-
"illuminate/contracts": "^10.0||^11.0",
57-
"illuminate/database": "^10.0||^11.0",
58-
"illuminate/http": "^10.0||^11.0",
59-
"illuminate/pagination": "^10.0||^11.0",
60-
"illuminate/routing": "^10.0||^11.0",
61-
"illuminate/support": "^10.0||^11.0",
54+
"guzzlehttp/guzzle": "^6.0 || ^7.0",
55+
"illuminate/config": "^11.0",
56+
"illuminate/contracts": "^11.0",
57+
"illuminate/database": "^11.0",
58+
"illuminate/http": "^11.0",
59+
"illuminate/pagination": "^11.0",
60+
"illuminate/routing": "^11.0",
61+
"illuminate/support": "^11.0",
6262
"jangregor/phpstan-prophecy": "^1.0",
63-
"justinrainbow/json-schema": "^5.2.1",
64-
"laravel/framework": "^10.0||^11.0",
65-
"orchestra/testbench": "^8.18",
63+
"justinrainbow/json-schema": "^5.2.11",
64+
"laravel/framework": "^11.0",
65+
"orchestra/testbench": "^9.0",
6666
"phpspec/prophecy-phpunit": "^2.0",
6767
"phpstan/extension-installer": "^1.1",
6868
"phpstan/phpdoc-parser": "^1.13",
6969
"phpstan/phpstan": "^1.10",
7070
"phpstan/phpstan-doctrine": "^1.0",
7171
"phpstan/phpstan-phpunit": "^1.0",
7272
"phpstan/phpstan-symfony": "^1.0",
73-
"phpunit/phpunit": "^9.6",
73+
"phpunit/phpunit": "^11.2",
7474
"psr/log": "^1.0 || ^2.0 || ^3.0",
7575
"ramsey/uuid": "^3.9.7 || ^4.0",
7676
"ramsey/uuid-doctrine": "^1.4 || ^2.0 || ^3.0",
77-
"sebastian/comparator": "<5.0",
78-
"soyuka/contexts": "v3.3.9",
77+
"soyuka/contexts": "^3.3.10",
7978
"soyuka/pmu": "^0.0.4",
8079
"soyuka/stubs-mongodb": "^1.0",
8180
"symfony/asset": "^6.4 || ^7.1",
@@ -84,8 +83,8 @@
8483
"symfony/config": "^6.4 || ^7.1",
8584
"symfony/console": "^6.4 || ^7.1",
8685
"symfony/css-selector": "^6.4 || ^7.1",
87-
"symfony/dependency-injection": "^6.4 || ^7.1.12",
88-
"symfony/doctrine-bridge": "^6.4 || ^7.1",
86+
"symfony/dependency-injection": "^6.4 || ^7.1",
87+
"symfony/doctrine-bridge": "^6.4.2 || ^7.1.2",
8988
"symfony/dom-crawler": "^6.4 || ^7.1",
9089
"symfony/error-handler": "^6.4 || ^7.1",
9190
"symfony/event-dispatcher": "^6.4 || ^7.1",
@@ -98,7 +97,6 @@
9897
"symfony/maker-bundle": "^1.24",
9998
"symfony/mercure-bundle": "*",
10099
"symfony/messenger": "^6.4 || ^7.1",
101-
"symfony/phpunit-bridge": "^6.4.1 || ^7.1",
102100
"symfony/routing": "^6.4 || ^7.1",
103101
"symfony/security-bundle": "^6.4 || ^7.1",
104102
"symfony/security-core": "^6.4 || ^7.1",
@@ -110,7 +108,7 @@
110108
"symfony/web-profiler-bundle": "^6.4 || ^7.1",
111109
"symfony/yaml": "^6.4 || ^7.1",
112110
"twig/twig": "^1.42.3 || ^2.12 || ^3.0",
113-
"webonyx/graphql-php": "^14.0 || ^15.0"
111+
"webonyx/graphql-php": "^15.0"
114112
},
115113
"conflict": {
116114
"doctrine/common": "<3.2.2",
@@ -121,8 +119,7 @@
121119
"symfony/framework-bundle": "6.4.6 || 7.1.6",
122120
"symfony/var-exporter": "<6.1.1",
123121
"phpunit/phpunit": "<9.5",
124-
"phpspec/prophecy": "<1.15",
125-
"elasticsearch/elasticsearch": ">=8.0,<8.4"
122+
"phpspec/prophecy": "<1.15"
126123
},
127124
"suggest": {
128125
"doctrine/mongodb-odm-bundle": "To support MongoDB. Only versions 4.0 and later are supported.",
@@ -189,7 +186,6 @@
189186
"api-platform/graphql",
190187
"api-platform/http-cache",
191188
"api-platform/documentation",
192-
"api-platform/parameter-validator",
193189
"api-platform/ramsey-uuid",
194190
"api-platform/serializer",
195191
"api-platform/state",
@@ -212,7 +208,6 @@
212208
{"type": "path", "url": "./src/GraphQl"},
213209
{"type": "path", "url": "./src/HttpCache"},
214210
{"type": "path", "url": "./src/Documentation"},
215-
{"type": "path", "url": "./src/ParameterValidator"},
216211
{"type": "path", "url": "./src/RamseyUuid"},
217212
{"type": "path", "url": "./src/Serializer"},
218213
{"type": "path", "url": "./src/State"},

docs/config/packages/framework.yaml

+3-5
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ api_platform:
77
json: ['application/json']
88
docs_formats:
99
jsonopenapi: ['application/vnd.openapi+json']
10-
keep_legacy_inflector: false
1110
http_cache:
12-
invalidation:
13-
enabled: true
14-
public: true
11+
invalidation:
12+
enabled: true
13+
public: true
1514
use_symfony_listeners: false
1615
defaults:
1716
extra_properties:
18-
rfc_7807_compliant_errors: true
1917
standard_put: true

docs/guides/error-provider.php

-8
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,6 @@
77
// tags: design, state
88
// ---
99

10-
// Note that we use the following configuration:
11-
// ```
12-
// api_platform:
13-
// defaults:
14-
// rfc_7807_compliant_errors: true
15-
// ```
16-
// To customize the API Platform response, replace the api_platform.state.error_provider with your own provider:
17-
1810
namespace App\ApiResource {
1911
use ApiPlatform\Metadata\ApiResource;
2012
use ApiPlatform\Metadata\Get;

docs/guides/error-resource.php

-7
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@
77
// tags: design, state
88
// ---
99

10-
// Note that we use the following configuration:
11-
// ```
12-
// api_platform:
13-
// defaults:
14-
// rfc_7807_compliant_errors: true
15-
// ```
16-
1710
namespace App\ApiResource {
1811
use ApiPlatform\Metadata\ErrorResource;
1912
use ApiPlatform\Metadata\Exception\ProblemExceptionInterface;

features/filter/filter_validation_legacy.feature

-171
This file was deleted.

0 commit comments

Comments
 (0)