diff --git a/composer.lock b/composer.lock index 1e12e6f7..01d91e9e 100644 --- a/composer.lock +++ b/composer.lock @@ -3946,16 +3946,16 @@ }, { "name": "jbtronics/dompdf-font-loader-bundle", - "version": "v1.1.3", + "version": "v1.1.4", "source": { "type": "git", "url": "https://github.com/jbtronics/dompdf-font-loader-bundle.git", - "reference": "da01d9655826105d53f9d0e8ba4f9d838201dcb2" + "reference": "1b41014a2dd9e82ba6a62e61deeebe3cdc1eaf1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jbtronics/dompdf-font-loader-bundle/zipball/da01d9655826105d53f9d0e8ba4f9d838201dcb2", - "reference": "da01d9655826105d53f9d0e8ba4f9d838201dcb2", + "url": "https://api.github.com/repos/jbtronics/dompdf-font-loader-bundle/zipball/1b41014a2dd9e82ba6a62e61deeebe3cdc1eaf1f", + "reference": "1b41014a2dd9e82ba6a62e61deeebe3cdc1eaf1f", "shasum": "" }, "require": { @@ -3995,9 +3995,9 @@ ], "support": { "issues": "https://github.com/jbtronics/dompdf-font-loader-bundle/issues", - "source": "https://github.com/jbtronics/dompdf-font-loader-bundle/tree/v1.1.3" + "source": "https://github.com/jbtronics/dompdf-font-loader-bundle/tree/v1.1.4" }, - "time": "2025-02-07T23:21:03+00:00" + "time": "2025-07-07T20:39:34+00:00" }, { "name": "jbtronics/settings-bundle", diff --git a/src/Form/SelectTypeOrderExtension.php b/src/Form/SelectTypeOrderExtension.php index bc7ca82f..7115d763 100644 --- a/src/Form/SelectTypeOrderExtension.php +++ b/src/Form/SelectTypeOrderExtension.php @@ -41,7 +41,7 @@ class SelectTypeOrderExtension extends AbstractTypeExtension ]; } - public function configureOptions(OptionsResolver $resolver) + public function configureOptions(OptionsResolver $resolver): void { $resolver->setDefault('ordered', false); $resolver->setDefault('by_reference', function (Options $options) { @@ -50,7 +50,7 @@ class SelectTypeOrderExtension extends AbstractTypeExtension }); } - public function buildView(FormView $view, FormInterface $form, array $options) + public function buildView(FormView $view, FormInterface $form, array $options): void { //Pass the data in ordered form to the frontend controller, so it can make the items appear in the correct order. if ($options['ordered']) { diff --git a/src/Form/Type/TriStateCheckboxType.php b/src/Form/Type/TriStateCheckboxType.php index 4523a839..b2a85ad3 100644 --- a/src/Form/Type/TriStateCheckboxType.php +++ b/src/Form/Type/TriStateCheckboxType.php @@ -100,7 +100,7 @@ final class TriStateCheckboxType extends AbstractType implements DataTransformer * @return mixed The value in the transformed representation * */ - public function transform(mixed $value) + public function transform(mixed $value): mixed { if (true === $value) { return 'true'; @@ -142,7 +142,7 @@ final class TriStateCheckboxType extends AbstractType implements DataTransformer * * @return mixed The value in the original representation */ - public function reverseTransform(mixed $value) + public function reverseTransform(mixed $value): mixed { return match ($value) { 'true' => true, diff --git a/src/Serializer/StructuralElementDenormalizer.php b/src/Serializer/StructuralElementDenormalizer.php index d9b03ae7..9f4256f9 100644 --- a/src/Serializer/StructuralElementDenormalizer.php +++ b/src/Serializer/StructuralElementDenormalizer.php @@ -122,7 +122,7 @@ class StructuralElementDenormalizer implements DenormalizerInterface, Denormaliz return $deserialized_entity; } - public function getSupportedTypes(): array + public function getSupportedTypes(?string $format): array { //Must be false, because we use in_array in supportsDenormalization return [ diff --git a/src/Serializer/StructuralElementNormalizer.php b/src/Serializer/StructuralElementNormalizer.php index e73f69be..7ce774f9 100644 --- a/src/Serializer/StructuralElementNormalizer.php +++ b/src/Serializer/StructuralElementNormalizer.php @@ -24,19 +24,17 @@ namespace App\Serializer; use App\Entity\Base\AbstractStructuralDBElement; use Symfony\Component\DependencyInjection\Attribute\Autowire; +use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; /** * @see \App\Tests\Serializer\StructuralElementNormalizerTest */ -class StructuralElementNormalizer implements NormalizerInterface +class StructuralElementNormalizer implements NormalizerInterface, NormalizerAwareInterface { - public function __construct( - #[Autowire(service: ObjectNormalizer::class)]private readonly NormalizerInterface $normalizer - ) - { - } + use NormalizerAwareTrait; public function supportsNormalization($data, ?string $format = null, array $context = []): bool { @@ -48,7 +46,7 @@ class StructuralElementNormalizer implements NormalizerInterface return $data instanceof AbstractStructuralDBElement; } - public function normalize($object, ?string $format = null, array $context = []): mixed + public function normalize($object, ?string $format = null, array $context = []): \ArrayObject|bool|float|int|string { if (!$object instanceof AbstractStructuralDBElement) { throw new \InvalidArgumentException('This normalizer only supports AbstractStructural objects!'); diff --git a/src/Twig/TwigCoreExtension.php b/src/Twig/TwigCoreExtension.php index 352e09d3..7b2b58f8 100644 --- a/src/Twig/TwigCoreExtension.php +++ b/src/Twig/TwigCoreExtension.php @@ -34,8 +34,11 @@ use Twig\TwigTest; */ final class TwigCoreExtension extends AbstractExtension { - public function __construct(protected ObjectNormalizer $objectNormalizer) + private readonly ObjectNormalizer $objectNormalizer; + + public function __construct() { + $this->objectNormalizer = new ObjectNormalizer(); } public function getFunctions(): array