Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"ext-iconv": "*",
"ext-intl": "*",
"ext-mbstring": "*",
"api-platform/core": "^3.2",
"api-platform/core": "^4.0",
"czproject/git-php": "^4.2",
"digitalrevolution/jbdiff": "^1.2",
"digitalrevolution/symfony-console-validation": "^1.1",
Expand Down
193 changes: 117 additions & 76 deletions composer.lock

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions config/packages/api_platform.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
return static function (ApiPlatformConfig $config): void {
$config->title('%env(APP_NAME)% API')
->version('1.0.0')
->showWebby(false)
->useSymfonyListeners(false)
->eventListenersBackwardCompatibilityLayer(false)
//->keepLegacyInflector(false)
->showWebby(true)
->pathSegmentNameGenerator('api_platform.metadata.path_segment_name_generator.dash');

$config->mapping()->paths(['%kernel.project_dir%/src/Entity']);
Expand Down
2 changes: 1 addition & 1 deletion src/ApiPlatform/Factory/CodeReviewOutputFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

namespace DR\Review\ApiPlatform\Factory;

use ApiPlatform\Api\UrlGeneratorInterface;
use DR\Review\ApiPlatform\Output\CodeReviewOutput;
use DR\Review\Controller\App\Review\ReviewController;
use DR\Review\Entity\Review\CodeReview;
use DR\Review\Entity\Review\CodeReviewer;
use DR\Review\Entity\User\User;
use DR\Utils\Assert;
use Symfony\Component\Routing\Generator\UrlGenerator;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;

class CodeReviewOutputFactory
{
Expand Down
2 changes: 1 addition & 1 deletion src/Form/Repository/RepositoryType.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace DR\Review\Form\Repository;

use ApiPlatform\Api\UrlGeneratorInterface;
use DR\Review\Controller\App\Admin\Credentials\CredentialsController;
use DR\Review\Doctrine\Type\RepositoryGitType;
use DR\Review\Entity\Repository\Repository;
Expand All @@ -19,6 +18,7 @@
use Symfony\Component\Form\Extension\Core\Type\UrlType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Validator\Constraints as Assert;

class RepositoryType extends AbstractType
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Controller/Api/DocControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function testHtmlDocs(): void
*/
public function testJsonDocs(): void
{
$this->client->request('GET', '/api/docs', server: ['HTTP_ACCEPT' => 'application/json']);
$this->client->request('GET', '/api/docs', server: ['HTTP_ACCEPT' => 'application/vnd.openapi+json']);
self::assertResponseIsSuccessful();

$data = Json::decode(Assert::notFalse($this->client->getResponse()->getContent()), true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

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

use ApiPlatform\Api\UrlGeneratorInterface;
use DR\Review\ApiPlatform\Factory\CodeReviewOutputFactory;
use DR\Review\ApiPlatform\Factory\UserOutputFactory;
use DR\Review\ApiPlatform\Output\UserOutput;
Expand All @@ -16,6 +15,7 @@
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\MockObject\MockObject;
use Symfony\Component\Routing\Generator\UrlGenerator;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use function DR\PHPUnitExtensions\Mock\consecutive;

#[CoversClass(CodeReviewOutputFactory::class)]
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Form/Repository/RepositoryTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

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

use ApiPlatform\Api\UrlGeneratorInterface;
use DR\Review\Controller\App\Admin\Credentials\CredentialsController;
use DR\Review\Doctrine\Type\RepositoryGitType;
use DR\Review\Entity\Repository\Repository;
Expand All @@ -21,6 +20,7 @@
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\Debug\OptionsResolverIntrospector;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use function DR\PHPUnitExtensions\Mock\consecutive;

#[CoversClass(RepositoryType::class)]
Expand Down