Skip to content

Commit

Permalink
fix: RekapagerLinkProcessor was added to the wrong package (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
priyadi authored Sep 8, 2024
1 parent e44c003 commit 24c61c1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

# 0.17.5

* fix: `RekapagerLinkProcessor` was added to the wrong package

# 0.17.2

* fix(`SymfonySerializerKeysetPageIdentifierEncoder`): handle more errors
Expand Down
8 changes: 8 additions & 0 deletions packages/rekapager-api-platform/config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Rekalogika\Rekapager\ApiPlatform\Implementation\RekapagerExtension;
use Rekalogika\Rekapager\ApiPlatform\Implementation\RekapagerOpenApiFactoryDecorator;
use Rekalogika\Rekapager\ApiPlatform\PagerFactoryInterface;
use Rekalogika\Rekapager\ApiPlatform\RekapagerLinkProcessor;
use Rekalogika\Rekapager\Contracts\PageIdentifierEncoderResolverInterface;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;

Expand Down Expand Up @@ -43,6 +44,13 @@
'$urlGenerationStrategy' => '%api_platform.url_generation_strategy%',
]);

$services
->set(RekapagerLinkProcessor::class)
->decorate('api_platform.state_processor.respond', priority: 410)
->args([
service('.inner'),
]);

$services
->set('rekalogika.rekapager.api_platform.page_normalizer')
->class(PagerNormalizer::class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* that was distributed with this source code.
*/

namespace Rekalogika\Rekapager\Bundle;
namespace Rekalogika\Rekapager\ApiPlatform;

use ApiPlatform\Metadata\HttpOperation;
use ApiPlatform\Metadata\Operation;
Expand Down
8 changes: 0 additions & 8 deletions packages/rekapager-bundle/config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use Rekalogika\Rekapager\Bundle\Contracts\PageUrlGeneratorFactoryInterface;
use Rekalogika\Rekapager\Bundle\Implementation\SymfonyPageUrlGeneratorFactory;
use Rekalogika\Rekapager\Bundle\PagerFactory;
use Rekalogika\Rekapager\Bundle\RekapagerLinkProcessor;
use Rekalogika\Rekapager\Bundle\Twig\RekapagerExtension;
use Rekalogika\Rekapager\Bundle\Twig\RekapagerRuntime;
use Rekalogika\Rekapager\Bundle\Twig\TwigPagerRenderer;
Expand Down Expand Up @@ -72,13 +71,6 @@
'$defaultUrlReferenceType' => '%rekalogika.rekapager.config.default_url_reference_type%',
]);

$services
->set(RekapagerLinkProcessor::class)
->decorate('api_platform.state_processor.respond', priority: 410)
->args([
service('.inner'),
]);

$services
->set(TwigPagerRenderer::class)
->args([
Expand Down

0 comments on commit 24c61c1

Please sign in to comment.