Skip to content

Commit 361ae1c

Browse files
authored
Merge pull request #6586 from soyuka/merge-342
Merge 3.4
2 parents 1b6e7c6 + afac20f commit 361ae1c

Some content is hidden

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

46 files changed

+804
-131
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,8 +587,8 @@ jobs:
587587
run: |
588588
composer global require soyuka/pmu
589589
composer global config allow-plugins.soyuka/pmu true --no-interaction
590+
composer global link . --permanent
590591
composer require --dev doctrine/mongodb-odm-bundle
591-
composer global link .
592592
- name: Clear test app cache
593593
run: tests/Fixtures/app/console cache:clear --ansi
594594
- name: Run PHPUnit tests

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,35 @@
1010

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

13+
## v3.4.0-alpha.4
14+
15+
### Deprecations:
16+
17+
Namespaces like `ApiPlatform/Api` or `ApiPlatform/Util` are deprecated and will be removed in 4.0.
18+
You should now install `api-platform/symfony` instead of `api-platform/core`.
19+
20+
### Bug fixes
21+
22+
* [17c6b586c](https://github.com/api-platform/core/commit/17c6b586c5ab49437ac11dd092efdd5f0baf569b) fix(state): log on missing provider (#6519)
23+
* [601ccfb42](https://github.com/api-platform/core/commit/601ccfb4243803f40a7fa7179e0661da59c88b86) fix(doctrine): move event listeners to doctrine/common (#6573)
24+
* [6499e0aa5](https://github.com/api-platform/core/commit/6499e0aa5dd61fdff7706e7940cdf8c1fc3e18ef) fix: deprecate url generator interface namespace (#6575)
25+
* [3c5aea80f](https://github.com/api-platform/core/commit/3c5aea80fdbed20216764f6d721fe4f37cf2889d) fix(symfony): load isApiResource metadata (#6562)
26+
* [61af0cc90](https://github.com/api-platform/core/commit/61af0cc90c1e095edb12e32ef433a742ef46637e) fix(doctrine): allow doctrine/dbal:^4
27+
* [e063b80af](https://github.com/api-platform/core/commit/e063b80afe012ca4a6c8999de55b59193e8ae0ae) fix: parameter context for filters (#6535)
28+
* [e22392193](https://github.com/api-platform/core/commit/e22392193bb1fc71ece5abf393fa54b0745fc287) fix(state): security parameter with listeners (#6457)
29+
30+
### Features
31+
32+
* [05e75be83](https://github.com/api-platform/core/commit/05e75be834c629e0487caaaedfe9fdf0bd5a7226) feat(doctrine): add new filter for filtering an entity using PHP backed enum, resolves #6506 (#6547) (#6560)
33+
* [0b985ae76](https://github.com/api-platform/core/commit/0b985ae760bc4689d3f5bbacebb21b35b334d0be) feat(state): add security to parameters (#6435)
34+
* [26d5cbb9b](https://github.com/api-platform/core/commit/26d5cbb9ba996f793e50eff3eab578ea0753d243) feat: deprecate query parameter validator (#6454)
35+
* [63ccfd58c](https://github.com/api-platform/core/commit/63ccfd58c95b5aa4aa0353eb122d96ef35187222) feat: BackedEnum resources (#6309)
36+
* [65296eaf1](https://github.com/api-platform/core/commit/65296eaf1eb18dc725e9316e9ab49b191aae43a3) feat(openapi): allow optional request body content (#6374)
37+
* [7399fcf7e](https://github.com/api-platform/core/commit/7399fcf7eaf28cd649d137da1fdd54f69093e275) feat(symfony): skip error handler (#6463)
38+
* [74986cb55](https://github.com/api-platform/core/commit/74986cb552182dc645bd1fc967faa0954dd59e0a) feat: inflector as service (#6447)
39+
* [b47edb2a4](https://github.com/api-platform/core/commit/b47edb2a499c34e79c167f963e3a626a3e9d040a) feat(serializer): context IRI in HAL or JsonApi format (#6215)
40+
* [db1241c66](https://github.com/api-platform/core/commit/db1241c66a08d226f57d8d61e0ec519071c6afdb) feat(openapi): make open_api_override_responses act on default 404 response generation (#6551)
41+
1342
## v3.4.0-alpha.2
1443

1544
### Deprecations:

composer.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,23 @@
4040
"willdurand/negotiation": "^3.1"
4141
},
4242
"require-dev": {
43-
"api-platform/json-schema": "^3.2 || ^4.0",
44-
"api-platform/metadata": "^3.2 || ^4.0",
45-
"api-platform/state": "^3.2 || ^4.0",
46-
"api-platform/doctrine-common": "^3.2 || ^4.0",
47-
"api-platform/doctrine-odm": "^3.2 || ^4.0",
48-
"api-platform/doctrine-orm": "^3.2 || ^4.0",
49-
"api-platform/openapi": "^3.2 || ^4.0",
50-
"api-platform/ramsey-uuid": "^3.2 || ^4.0",
51-
"api-platform/jsonld": "^3.2 || ^4.0",
52-
"api-platform/serializer": "^3.2 || ^4.0",
43+
"api-platform/json-schema": "^3.4 || ^4.0",
44+
"api-platform/metadata": "^3.4 || ^4.0",
45+
"api-platform/state": "^3.4 || ^4.0",
46+
"api-platform/doctrine-common": "^3.4 || ^4.0",
47+
"api-platform/doctrine-odm": "^3.4 || ^4.0",
48+
"api-platform/doctrine-orm": "^3.4 || ^4.0",
49+
"api-platform/openapi": "^3.4 || ^4.0",
50+
"api-platform/ramsey-uuid": "^3.4 || ^4.0",
51+
"api-platform/jsonld": "^3.4 || ^4.0",
52+
"api-platform/serializer": "^3.4 || ^4.0",
5353
"api-platform/json-api": "^3.3 || ^4.0",
54-
"api-platform/http-cache": "^3.2 || ^4.0",
55-
"api-platform/elasticsearch": "^3.2 || ^4.0",
56-
"api-platform/hydra": "^3.2 || ^4.0",
57-
"api-platform/documentation": "^3.2 || ^4.0",
58-
"api-platform/validator": "^3.2 || ^4.0",
59-
"api-platform/graphql": "^3.2 || ^4.0",
54+
"api-platform/http-cache": "^3.4 || ^4.0",
55+
"api-platform/elasticsearch": "^3.4 || ^4.0",
56+
"api-platform/hydra": "^3.4 || ^4.0",
57+
"api-platform/documentation": "^3.4 || ^4.0",
58+
"api-platform/validator": "^3.4 || ^4.0",
59+
"api-platform/graphql": "^3.4 || ^4.0",
6060
"behat/behat": "^3.11",
6161
"behat/mink": "^1.9",
6262
"doctrine/cache": "^1.11 || ^2.1",
@@ -94,7 +94,7 @@
9494
"ramsey/uuid": "^4.0",
9595
"ramsey/uuid-doctrine": "^2.0",
9696
"soyuka/contexts": "^3.3.10",
97-
"soyuka/pmu": "^0.0.11",
97+
"soyuka/pmu": "^0.0.12",
9898
"soyuka/stubs-mongodb": "^1.0",
9999
"symfony/asset": "^6.4 || ^7.1",
100100
"symfony/browser-kit": "^6.4 || ^7.1",

pmu.baseline

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Class "ApiPlatform\Serializer\SerializerContextBuilder" uses "ApiPlatform\Doctrine\Orm\State\Options" but it is not declared as dependency.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the API Platform project.
5+
*
6+
* (c) Kévin Dunglas <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
declare(strict_types=1);
13+
14+
namespace ApiPlatform\Doctrine\Common\Messenger;
15+
16+
use Symfony\Component\Messenger\Envelope;
17+
use Symfony\Component\Messenger\Exception\HandlerFailedException;
18+
use Symfony\Component\Messenger\MessageBusInterface;
19+
20+
/**
21+
* @internal
22+
*/
23+
trait DispatchTrait
24+
{
25+
private ?MessageBusInterface $messageBus;
26+
27+
/**
28+
* @param object|Envelope $message
29+
*/
30+
private function dispatch(object $message): Envelope
31+
{
32+
if (!$this->messageBus instanceof MessageBusInterface) {
33+
throw new \InvalidArgumentException('The message bus is not set.');
34+
}
35+
36+
if (!class_exists(HandlerFailedException::class)) {
37+
return $this->messageBus->dispatch($message);
38+
}
39+
40+
try {
41+
return $this->messageBus->dispatch($message);
42+
} catch (HandlerFailedException $e) {
43+
// unwrap the exception thrown in handler for Symfony Messenger >= 4.3
44+
while ($e instanceof HandlerFailedException) {
45+
/** @var \Throwable $e */
46+
$e = $e->getPrevious();
47+
}
48+
49+
throw $e;
50+
}
51+
}
52+
}

src/Doctrine/Common/composer.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
],
2424
"require": {
2525
"php": ">=8.1",
26-
"api-platform/metadata": "^3.2 || ^4.0",
27-
"api-platform/state": "^3.2 || ^4.0",
26+
"api-platform/metadata": "^3.4 || ^4.0",
27+
"api-platform/state": "^3.4 || ^4.0",
2828
"doctrine/collections": "^2.1",
2929
"doctrine/common": "^3.2.2",
3030
"doctrine/persistence": "^3.2"
@@ -42,7 +42,10 @@
4242
"suggest": {
4343
"phpstan/phpdoc-parser": "For PHP documentation support.",
4444
"symfony/yaml": "For YAML resource configuration.",
45-
"symfony/config": "For XML resource configuration."
45+
"symfony/config": "For XML resource configuration.",
46+
"api-platform/http-cache": "For HTTP cache invalidation.",
47+
"api-platform/graphql": "For GraphQl mercure subscriptions.",
48+
"symfony/mercure-bundle": "For mercure updates publisher."
4649
},
4750
"autoload": {
4851
"psr-4": {

src/Doctrine/Odm/composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
],
2323
"require": {
2424
"php": ">=8.1",
25-
"api-platform/doctrine-common": "^3.2 || ^4.0",
26-
"api-platform/metadata": "^3.2 || ^4.0",
27-
"api-platform/state": "^3.2 || ^4.0",
25+
"api-platform/doctrine-common": "^3.4 || ^4.0",
26+
"api-platform/metadata": "^3.4 || ^4.0",
27+
"api-platform/state": "^3.4 || ^4.0",
2828
"doctrine/mongodb-odm": "^2.2",
2929
"doctrine/mongodb-odm-bundle": "^5.0",
3030
"symfony/property-info": "^6.4 || ^7.1"

src/Doctrine/Orm/Tests/config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ doctrine:
99
orm:
1010
auto_generate_proxy_classes: '%kernel.debug%'
1111
controller_resolver:
12-
auto_mapping: true
12+
enabled: false
13+
auto_mapping: false
1314
enable_lazy_ghost_objects: true
1415
mappings:
1516
ApiPlatform\Doctrine\Orm\Tests\Fixtures\Entity:

src/Doctrine/Orm/composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
],
2222
"require": {
2323
"php": ">=8.1",
24-
"api-platform/doctrine-common": "^3.2 || ^4.0",
25-
"api-platform/metadata": "^3.2 || ^4.0",
26-
"api-platform/state": "^3.2 || ^4.0",
24+
"api-platform/doctrine-common": "^3.4 || ^4.0",
25+
"api-platform/metadata": "^3.4 || ^4.0",
26+
"api-platform/state": "^3.4 || ^4.0",
2727
"doctrine/doctrine-bundle": "^2.11",
2828
"doctrine/orm": "^2.17 || ^3.0",
2929
"symfony/property-info": "^6.4 || ^7.1"

src/Documentation/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
}
2121
],
2222
"require": {
23-
"api-platform/metadata": "^3.2 || ^4.0"
23+
"api-platform/metadata": "^3.4 || ^4.0"
2424
},
2525
"extra": {
2626
"branch-alias": {

0 commit comments

Comments
 (0)