Skip to content

Commit

Permalink
Merge branch 'release/v1.0.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
Invis1ble committed Jun 4, 2024
2 parents 835b72f + 74aa535 commit f49a183
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 17 deletions.
4 changes: 2 additions & 2 deletions config/bundles.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['test' => true],
Invis1ble\SerializerExtensionBundle\Invis1bleSerializerExtensionBundle::class => ['test' => true],
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['test' => true, 'serializer_test' => true],
Invis1ble\SerializerExtensionBundle\Invis1bleSerializerExtensionBundle::class => ['test' => true, 'serializer_test' => true],
];
14 changes: 0 additions & 14 deletions config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,4 @@

</services>

<when env="test">

<services>

<service id="serializer.normalizer.property"
class="Symfony\Component\Serializer\Normalizer\PropertyNormalizer"
autowire="true"
autoconfigure="true">
</service>

</services>

</when>

</container>
17 changes: 17 additions & 0 deletions config/services_serializer_test.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services
https://symfony.com/schema/dic/services/services-1.0.xsd">

<services>

<service id="serializer.normalizer.property"
class="Symfony\Component\Serializer\Normalizer\PropertyNormalizer"
autowire="true"
autoconfigure="true">
</service>

</services>

</container>
4 changes: 4 additions & 0 deletions src/Invis1bleSerializerExtensionBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@ public function loadExtension(
ContainerBuilder $builder,
): void {
$container->import('../config/services.xml');

if ('serializer_test' === $container->env()) {
$container->import('../config/services_serializer_test.xml');
}
}
}
2 changes: 1 addition & 1 deletion tests/Normalizer/UriNormalizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class UriNormalizerTest extends KernelTestCase
*/
public function itTakesPrecedenceOverPropertyNormalizer(): void
{
self::bootKernel();
self::bootKernel(['environment' => 'serializer_test']);

$container = static::getContainer();

Expand Down

0 comments on commit f49a183

Please sign in to comment.