+ */
+class RangeNormalizer implements NormalizerInterface, DenormalizerInterface
+{
+ public function normalize(mixed $denormalized, array $options = []): string
+ {
+ return $denormalized[0].'..'.$denormalized[1];
+ }
+
+ public function denormalize(mixed $normalized, array $options = []): array
+ {
+ return array_map(static fn (string $v): int => (int) $v, explode('..', $normalized));
+ }
+
+ public static function getNormalizedType(): BuiltinType
+ {
+ return Type::string();
+ }
+}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/JsonEncoder/bundles.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/JsonEncoder/bundles.php
new file mode 100644
index 0000000000000..15ff182c6fed5
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/JsonEncoder/bundles.php
@@ -0,0 +1,18 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
+use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\TestBundle;
+
+return [
+ new FrameworkBundle(),
+ new TestBundle(),
+];
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/JsonEncoder/config.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/JsonEncoder/config.yml
new file mode 100644
index 0000000000000..55fdf53f5c2fd
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/JsonEncoder/config.yml
@@ -0,0 +1,24 @@
+imports:
+ - { resource: ../config/default.yml }
+
+framework:
+ http_method_override: false
+ type_info: ~
+ json_encoder:
+ enabled: true
+ paths:
+ Symfony\Bundle\FrameworkBundle\Tests\Functional\app\JsonEncoder\Dto\: '../../Tests/Functional/app/JsonEncoder/Dto/*'
+
+services:
+ _defaults:
+ autoconfigure: true
+
+ json_encoder.encoder.alias:
+ alias: json_encoder.encoder
+ public: true
+
+ json_encoder.decoder.alias:
+ alias: json_encoder.decoder
+ public: true
+
+ Symfony\Bundle\FrameworkBundle\Tests\Functional\app\JsonEncoder\RangeNormalizer: ~
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy