Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EasyApiPlatform] Modernize the code #1473

Merged
merged 3 commits into from
Jul 16, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;

final class ReadListenerCompilerPass implements CompilerPassInterface
final readonly class ReadListenerCompilerPass implements CompilerPassInterface
{
private const DEFINITION_ID_READ_LISTENER = 'api_platform.listener.request.read';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use EonX\EasyApiPlatform\Paginator\CustomPaginator;
use Symfony\Component\HttpKernel\Event\ViewEvent;

final class HttpKernelViewListener
final readonly class HttpKernelViewListener
{
public function __invoke(ViewEvent $event): void
{
Expand Down
2 changes: 1 addition & 1 deletion packages/EasyApiPlatform/src/Paginator/CustomPaginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use ApiPlatform\Doctrine\Orm\Paginator;

final class CustomPaginator implements CustomPaginatorInterface
final readonly class CustomPaginator implements CustomPaginatorInterface
{
public function __construct(
private Paginator $decorated,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use EonX\EasyApiPlatform\Paginator\CustomPaginatorInterface;
use Symfony\Component\HttpFoundation\Request;

final class SerializerContextBuilder implements SerializerContextBuilderInterface
final readonly class SerializerContextBuilder implements SerializerContextBuilderInterface
{
public function __construct(
private SerializerContextBuilderInterface $decorated,
Expand Down