Skip to content

Commit 4a8e6b4

Browse files
Update dependency api-platform/core to v4 (#854)
* Update dependency api-platform/core to v4 * Upgrade api platform * Upgrade api platform * Upgrade api platform --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Frank Dekker <[email protected]>
1 parent c77735e commit 4a8e6b4

File tree

8 files changed

+124
-86
lines changed

8 files changed

+124
-86
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"ext-iconv": "*",
3636
"ext-intl": "*",
3737
"ext-mbstring": "*",
38-
"api-platform/core": "^3.2",
38+
"api-platform/core": "^4.0",
3939
"czproject/git-php": "^4.2",
4040
"digitalrevolution/jbdiff": "^1.2",
4141
"digitalrevolution/symfony-console-validation": "^1.1",

composer.lock

Lines changed: 117 additions & 76 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/packages/api_platform.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@
77
return static function (ApiPlatformConfig $config): void {
88
$config->title('%env(APP_NAME)% API')
99
->version('1.0.0')
10-
->showWebby(false)
11-
->useSymfonyListeners(false)
12-
->eventListenersBackwardCompatibilityLayer(false)
13-
//->keepLegacyInflector(false)
10+
->showWebby(true)
1411
->pathSegmentNameGenerator('api_platform.metadata.path_segment_name_generator.dash');
1512

1613
$config->mapping()->paths(['%kernel.project_dir%/src/Entity']);

src/ApiPlatform/Factory/CodeReviewOutputFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33

44
namespace DR\Review\ApiPlatform\Factory;
55

6-
use ApiPlatform\Api\UrlGeneratorInterface;
76
use DR\Review\ApiPlatform\Output\CodeReviewOutput;
87
use DR\Review\Controller\App\Review\ReviewController;
98
use DR\Review\Entity\Review\CodeReview;
109
use DR\Review\Entity\Review\CodeReviewer;
1110
use DR\Review\Entity\User\User;
1211
use DR\Utils\Assert;
1312
use Symfony\Component\Routing\Generator\UrlGenerator;
13+
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
1414

1515
class CodeReviewOutputFactory
1616
{

src/Form/Repository/RepositoryType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
namespace DR\Review\Form\Repository;
55

6-
use ApiPlatform\Api\UrlGeneratorInterface;
76
use DR\Review\Controller\App\Admin\Credentials\CredentialsController;
87
use DR\Review\Doctrine\Type\RepositoryGitType;
98
use DR\Review\Entity\Repository\Repository;
@@ -19,6 +18,7 @@
1918
use Symfony\Component\Form\Extension\Core\Type\UrlType;
2019
use Symfony\Component\Form\FormBuilderInterface;
2120
use Symfony\Component\OptionsResolver\OptionsResolver;
21+
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
2222
use Symfony\Component\Validator\Constraints as Assert;
2323

2424
class RepositoryType extends AbstractType

tests/Functional/Controller/Api/DocControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function testHtmlDocs(): void
2727
*/
2828
public function testJsonDocs(): void
2929
{
30-
$this->client->request('GET', '/api/docs', server: ['HTTP_ACCEPT' => 'application/json']);
30+
$this->client->request('GET', '/api/docs', server: ['HTTP_ACCEPT' => 'application/vnd.openapi+json']);
3131
self::assertResponseIsSuccessful();
3232

3333
$data = Json::decode(Assert::notFalse($this->client->getResponse()->getContent()), true);

tests/Unit/ApiPlatform/Factory/CodeReviewOutputFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
namespace DR\Review\Tests\Unit\ApiPlatform\Factory;
55

6-
use ApiPlatform\Api\UrlGeneratorInterface;
76
use DR\Review\ApiPlatform\Factory\CodeReviewOutputFactory;
87
use DR\Review\ApiPlatform\Factory\UserOutputFactory;
98
use DR\Review\ApiPlatform\Output\UserOutput;
@@ -16,6 +15,7 @@
1615
use PHPUnit\Framework\Attributes\CoversClass;
1716
use PHPUnit\Framework\MockObject\MockObject;
1817
use Symfony\Component\Routing\Generator\UrlGenerator;
18+
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
1919
use function DR\PHPUnitExtensions\Mock\consecutive;
2020

2121
#[CoversClass(CodeReviewOutputFactory::class)]

tests/Unit/Form/Repository/RepositoryTypeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
namespace DR\Review\Tests\Unit\Form\Repository;
55

6-
use ApiPlatform\Api\UrlGeneratorInterface;
76
use DR\Review\Controller\App\Admin\Credentials\CredentialsController;
87
use DR\Review\Doctrine\Type\RepositoryGitType;
98
use DR\Review\Entity\Repository\Repository;
@@ -21,6 +20,7 @@
2120
use Symfony\Component\Form\FormBuilderInterface;
2221
use Symfony\Component\OptionsResolver\Debug\OptionsResolverIntrospector;
2322
use Symfony\Component\OptionsResolver\OptionsResolver;
23+
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
2424
use function DR\PHPUnitExtensions\Mock\consecutive;
2525

2626
#[CoversClass(RepositoryType::class)]

0 commit comments

Comments
 (0)