diff --git a/Tests/Translation/Extractor/File/Fixture/MyFormType.php b/Tests/Translation/Extractor/File/Fixture/MyFormType.php index 67d40c3c..c487abdc 100644 --- a/Tests/Translation/Extractor/File/Fixture/MyFormType.php +++ b/Tests/Translation/Extractor/File/Fixture/MyFormType.php @@ -68,5 +68,5 @@ public function buildForm(FormBuilderInterface $builder, array $options) ]); } - const CHOICES = ['choices' => [null]]; + public const CHOICES = ['choices' => [null]]; } diff --git a/Translation/Extractor/File/FormExtractor.php b/Translation/Extractor/File/FormExtractor.php index e6caa1ec..6f6b7ef1 100644 --- a/Translation/Extractor/File/FormExtractor.php +++ b/Translation/Extractor/File/FormExtractor.php @@ -244,7 +244,7 @@ protected function parseChoiceNode(Node $item, Node $node, $domain) foreach ($item->value->items as $index => $subItem) { $newItem = clone $subItem; $newItem->key = $subItem->value; - $newItem->value = $subItem->key ?? new Node\Scalar\Int_($index); + $newItem->value = $subItem->key ?? new Node\Scalar\LNumber($index); $subItem = $newItem; $this->parseItem($subItem, $domain); }