Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sulu/SuluFormBundle
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.5.0
Choose a base ref
...
head repository: sulu/SuluFormBundle
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2.5.1
Choose a head ref
  • 1 commit
  • 9 files changed
  • 1 contributor

Commits on Dec 21, 2022

  1. Copy the full SHA
    9cbb460 View commit details
6 changes: 4 additions & 2 deletions Dynamic/Types/SalutationType.php
Original file line number Diff line number Diff line change
@@ -34,10 +34,11 @@ public function getConfiguration(): FormFieldTypeConfiguration

public function build(FormBuilderInterface $builder, FormField $field, string $locale, array $options): void
{
$options['choice_translation_domain'] = 'messages';
$options['translation_domain'] = 'messages';
$options['expanded'] = false;
$options['multiple'] = false;
$options['choices'] = $this->getChoices();
$options['placeholder'] = 'sulu_form.salutation_please_choose';
$type = ChoiceType::class;
$builder->add($field->getKey(), $type, $options);
}
@@ -48,8 +49,9 @@ public function build(FormBuilderInterface $builder, FormField $field, string $l
protected function getChoices(): array
{
return [
'sulu_form.salutation_mr' => 'mr',
'sulu_form.salutation_ms' => 'ms',
'sulu_form.salutation_mr' => 'mr',
'sulu_form.salutation_neutral' => 'neutral',
];
}
}
4 changes: 3 additions & 1 deletion Resources/translations/admin.de.json
Original file line number Diff line number Diff line change
@@ -82,8 +82,10 @@
"sulu_form.sendinblue_redirection_url": "Weiterleitungs-URL",
"sulu_form.sendinblue_attribute_name_first_name": "Attribut-Name [Vorname]",
"sulu_form.sendinblue_attribute_name_last_name": "Attribut-Name [Nachname]",
"sulu_form.salutation_mr": "Herr",
"sulu_form.salutation_ms": "Frau",
"sulu_form.salutation_mr": "Herr",
"sulu_form.salutation_neutral": "Neutral",
"sulu_form.salutation_please_choose": "Bitte auswählen",
"sulu_form.single_form_selection.no_form_selected": "Kein Formular ausgewählt",
"sulu_form.single_form_selection.overlay_title": "Wählen Sie ein Formular aus",
"sulu_activity.resource.forms": "Formular",
4 changes: 3 additions & 1 deletion Resources/translations/admin.en.json
Original file line number Diff line number Diff line change
@@ -82,8 +82,10 @@
"sulu_form.sendinblue_redirection_url": "Redirection url",
"sulu_form.sendinblue_attribute_name_first_name": "Attribute name [First name]",
"sulu_form.sendinblue_attribute_name_last_name": "Attribute name [Last name]",
"sulu_form.salutation_mr": "Mr.",
"sulu_form.salutation_ms": "Ms.",
"sulu_form.salutation_mr": "Mr.",
"sulu_form.salutation_neutral": "Neutral",
"sulu_form.salutation_please_choose": "Please choose",
"sulu_form.single_form_selection.no_form_selected": "No form selected",
"sulu_form.single_form_selection.overlay_title": "Select a form",
"sulu_activity.resource.forms": "Form",
10 changes: 9 additions & 1 deletion Resources/translations/messages.de.xliff
Original file line number Diff line number Diff line change
@@ -18,6 +18,14 @@
<source>sulu_form.mail.plain_text</source>
<target>Diese Mail kann nur in HTML angezeigt werden</target>
</trans-unit>
<trans-unit id="5">
<source>sulu_form.salutation_neutral</source>
<target>Neutral</target>
</trans-unit>
<trans-unit id="6">
<source>sulu_form.salutation_please_choose</source>
<target>Bitte auswählen</target>
</trans-unit>
</body>
</file>
</xliff>
</xliff>
10 changes: 9 additions & 1 deletion Resources/translations/messages.en.xliff
Original file line number Diff line number Diff line change
@@ -18,6 +18,14 @@
<source>sulu_form.mail.plain_text</source>
<target>This mail can only be viewed in HTML</target>
</trans-unit>
<trans-unit id="5">
<source>sulu_form.salutation_neutral</source>
<target>Neutral</target>
</trans-unit>
<trans-unit id="6">
<source>sulu_form.salutation_please_choose</source>
<target>Please choose</target>
</trans-unit>
</body>
</file>
</xliff>
</xliff>
10 changes: 9 additions & 1 deletion Resources/translations/messages.fr.xliff
Original file line number Diff line number Diff line change
@@ -18,6 +18,14 @@
<source>sulu_form.mail.plain_text</source>
<target>Ce courrier ne peut être visualisé qu'en HTML</target>
</trans-unit>
<trans-unit id="5">
<source>sulu_form.salutation_neutral</source>
<target>Neutre</target>
</trans-unit>
<trans-unit id="6">
<source>sulu_form.salutation_please_choose</source>
<target>Veuillez choisir</target>
</trans-unit>
</body>
</file>
</xliff>
</xliff>
10 changes: 9 additions & 1 deletion Resources/translations/messages.nl.xliff
Original file line number Diff line number Diff line change
@@ -18,6 +18,14 @@
<source>sulu_form.mail.plain_text</source>
<target>Deze mail is alleen in HTML te bekijken</target>
</trans-unit>
<trans-unit id="5">
<source>sulu_form.salutation_neutral</source>
<target>Neutrale</target>
</trans-unit>
<trans-unit id="6">
<source>sulu_form.salutation_please_choose</source>
<target>Gelieve te kiezen</target>
</trans-unit>
</body>
</file>
</xliff>
</xliff>
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -45,6 +45,7 @@
"jackalope/jackalope-doctrine-dbal": "^1.3.2",
"jangregor/phpstan-prophecy": "^1.0",
"massive/search-bundle": "^2.0",
"phpspec/prophecy": "^1.14",
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-doctrine": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
84 changes: 2 additions & 82 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -5,19 +5,14 @@ parameters:
count: 1
path: Admin/DynamicListAdmin.php

-
message: "#^Parameter \\#1 \\$tabOrder of method Sulu\\\\Bundle\\\\AdminBundle\\\\Admin\\\\View\\\\ListViewBuilderInterface\\:\\:setTabOrder\\(\\) expects int, mixed given\\.$#"
count: 1
path: Admin/DynamicListAdmin.php

-
message: "#^Parameter \\#1 \\$viewName of method Sulu\\\\Bundle\\\\AdminBundle\\\\Admin\\\\View\\\\ViewCollection\\:\\:has\\(\\) expects string, mixed given\\.$#"
count: 1
path: Admin/DynamicListAdmin.php

-
message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#"
count: 2
count: 1
path: Admin/DynamicListAdmin.php

-
@@ -410,11 +405,6 @@ parameters:
count: 1
path: Dynamic/Checksum.php

-
message: "#^Cannot access offset 'lists' on array\\|false\\.$#"
count: 1
path: Dynamic/Helper/MailchimpListSelect.php

-
message: "#^Property Sulu\\\\Bundle\\\\FormBundle\\\\Dynamic\\\\Helper\\\\MailchimpListSelect\\:\\:\\$apiKey \\(string\\) does not accept string\\|null\\.$#"
count: 1
@@ -445,21 +435,6 @@ parameters:
count: 1
path: Dynamic/Helper/SendinblueMailTemplateSelect.php

-
message: "#^Cannot access an offset on mixed\\.$#"
count: 2
path: Dynamic/Types/AttachmentType.php

-
message: "#^Cannot access offset 'accept' on mixed\\.$#"
count: 1
path: Dynamic/Types/AttachmentType.php

-
message: "#^Cannot access offset 'max' on mixed\\.$#"
count: 1
path: Dynamic/Types/AttachmentType.php

-
message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#"
count: 1
@@ -640,11 +615,6 @@ parameters:
count: 1
path: Dynamic/Types/FirstNameType.php

-
message: "#^Cannot access offset 'type' on mixed\\.$#"
count: 1
path: Dynamic/Types/FreeTextType.php

-
message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#"
count: 1
@@ -655,11 +625,6 @@ parameters:
count: 1
path: Dynamic/Types/FunctionType.php

-
message: "#^Cannot access offset 'type' on mixed\\.$#"
count: 1
path: Dynamic/Types/HeadlineType.php

-
message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#"
count: 1
@@ -715,11 +680,6 @@ parameters:
count: 1
path: Dynamic/Types/RadioButtonsType.php

-
message: "#^Cannot access offset 'options' on mixed\\.$#"
count: 1
path: Dynamic/Types/RecaptchaType.php

-
message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#"
count: 1
@@ -735,11 +695,6 @@ parameters:
count: 1
path: Dynamic/Types/SendinblueType.php

-
message: "#^Cannot access offset 'type' on mixed\\.$#"
count: 1
path: Dynamic/Types/SpacerType.php

-
message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#"
count: 1
@@ -1102,7 +1057,7 @@ parameters:

-
message: "#^Cannot access offset 'type' on array\\|bool\\|float\\|int\\|string\\.$#"
count: 2
count: 1
path: Form/Builder.php

-
@@ -1130,11 +1085,6 @@ parameters:
count: 1
path: Form/Builder.php

-
message: "#^Parameter \\#1 \\$id of method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Builder\\:\\:build\\(\\) expects int, mixed given\\.$#"
count: 1
path: Form/Builder.php

-
message: "#^Parameter \\#2 \\$type of method Sulu\\\\Bundle\\\\FormBundle\\\\Dynamic\\\\Checksum\\:\\:check\\(\\) expects string, mixed given\\.$#"
count: 1
@@ -1150,31 +1100,16 @@ parameters:
count: 1
path: Form/Builder.php

-
message: "#^Parameter \\#3 \\$typeId of method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Builder\\:\\:build\\(\\) expects string, mixed given\\.$#"
count: 1
path: Form/Builder.php

-
message: "#^Parameter \\#4 \\$formId of method Sulu\\\\Bundle\\\\FormBundle\\\\Dynamic\\\\Checksum\\:\\:check\\(\\) expects int, mixed given\\.$#"
count: 1
path: Form/Builder.php

-
message: "#^Parameter \\#4 \\$locale of method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Builder\\:\\:build\\(\\) expects string\\|null, mixed given\\.$#"
count: 1
path: Form/Builder.php

-
message: "#^Parameter \\#5 \\$formName of method Sulu\\\\Bundle\\\\FormBundle\\\\Dynamic\\\\Checksum\\:\\:check\\(\\) expects string, mixed given\\.$#"
count: 1
path: Form/Builder.php

-
message: "#^Parameter \\#5 \\$name of method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Builder\\:\\:build\\(\\) expects string, mixed given\\.$#"
count: 1
path: Form/Builder.php

-
message: "#^Parameter \\#6 \\$webspaceKey of method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Builder\\:\\:createForm\\(\\) expects string, string\\|null given\\.$#"
count: 1
@@ -1750,21 +1685,6 @@ parameters:
count: 1
path: Repository/DynamicRepository.php

-
message: "#^Parameter \\#2 \\$search of method Sulu\\\\Bundle\\\\FormBundle\\\\Repository\\\\DynamicRepository\\:\\:addSearchFilter\\(\\) expects string\\|null, mixed given\\.$#"
count: 1
path: Repository/DynamicRepository.php

-
message: "#^Parameter \\#3 \\$searchFields of method Sulu\\\\Bundle\\\\FormBundle\\\\Repository\\\\DynamicRepository\\:\\:addSearchFilter\\(\\) expects array\\<string\\>\\|null, mixed given\\.$#"
count: 1
path: Repository/DynamicRepository.php

-
message: "#^Parameter \\#3 \\$toDate of method Sulu\\\\Bundle\\\\FormBundle\\\\Repository\\\\DynamicRepository\\:\\:addDateRangeFilter\\(\\) expects string\\|null, mixed given\\.$#"
count: 1
path: Repository/DynamicRepository.php

-
message: "#^Cannot cast mixed to int\\.$#"
count: 1