diff --git a/Bundles/Acl/phpstan.neon b/Bundles/Acl/phpstan.neon index 37c5c6ef47e..053c794de25 100644 --- a/Bundles/Acl/phpstan.neon +++ b/Bundles/Acl/phpstan.neon @@ -1,4 +1,3 @@ parameters: ignoreErrors: - - '#.+ has invalid typehint type Symfony\\Component\\OptionsResolver\\OptionsResolverInterface.#' - '#Argument of an invalid type .+RolesTransfer supplied for foreach, only iterables are supported.#' diff --git a/Bundles/Acl/src/Spryker/Zed/Acl/Communication/Form/GroupForm.php b/Bundles/Acl/src/Spryker/Zed/Acl/Communication/Form/GroupForm.php index a3e5a2247fc..5a928af8af3 100644 --- a/Bundles/Acl/src/Spryker/Zed/Acl/Communication/Form/GroupForm.php +++ b/Bundles/Acl/src/Spryker/Zed/Acl/Communication/Form/GroupForm.php @@ -13,7 +13,6 @@ use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormInterface; use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Constraints\Callback; use Symfony\Component\Validator\Constraints\NotBlank; @@ -62,11 +61,11 @@ public function configureOptions(OptionsResolver $resolver) /** * @deprecated Use `configureOptions()` instead. * - * @param \Symfony\Component\OptionsResolver\OptionsResolverInterface $resolver + * @param \Symfony\Component\OptionsResolver\OptionsResolver $resolver * * @return void */ - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function setDefaultOptions(OptionsResolver $resolver) { $this->configureOptions($resolver); } diff --git a/Bundles/Acl/src/Spryker/Zed/Acl/Communication/Form/RuleForm.php b/Bundles/Acl/src/Spryker/Zed/Acl/Communication/Form/RuleForm.php index 0bd20338967..c06f9bd1e7d 100644 --- a/Bundles/Acl/src/Spryker/Zed/Acl/Communication/Form/RuleForm.php +++ b/Bundles/Acl/src/Spryker/Zed/Acl/Communication/Form/RuleForm.php @@ -13,7 +13,6 @@ use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; use Symfony\Component\Validator\Constraints\NotBlank; /** @@ -45,11 +44,11 @@ public function configureOptions(OptionsResolver $resolver) /** * @deprecated Use `configureOptions()` instead. * - * @param \Symfony\Component\OptionsResolver\OptionsResolverInterface $resolver + * @param \Symfony\Component\OptionsResolver\OptionsResolver $resolver * * @return void */ - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function setDefaultOptions(OptionsResolver $resolver) { $this->configureOptions($resolver); } diff --git a/Bundles/BusinessOnBehalfGui/src/Spryker/Zed/BusinessOnBehalfGui/Communication/Form/CustomerBusinessUnitAttachForm.php b/Bundles/BusinessOnBehalfGui/src/Spryker/Zed/BusinessOnBehalfGui/Communication/Form/CustomerBusinessUnitAttachForm.php index d297544b0a4..b1f24fc61a4 100644 --- a/Bundles/BusinessOnBehalfGui/src/Spryker/Zed/BusinessOnBehalfGui/Communication/Form/CustomerBusinessUnitAttachForm.php +++ b/Bundles/BusinessOnBehalfGui/src/Spryker/Zed/BusinessOnBehalfGui/Communication/Form/CustomerBusinessUnitAttachForm.php @@ -70,7 +70,6 @@ protected function addCompanyBusinessUnitCollectionField(FormBuilderInterface $b 'label' => 'Business Unit', 'placeholder' => 'Business Unit name', 'choices' => $options[static::OPTION_COMPANY_BUSINESS_UNIT_CHOICES], - 'choices_as_values' => true, 'required' => true, ]); diff --git a/Bundles/Category/src/Spryker/Zed/Category/Communication/Form/CategoryType.php b/Bundles/Category/src/Spryker/Zed/Category/Communication/Form/CategoryType.php index f0680c28825..9fdf7433ce4 100644 --- a/Bundles/Category/src/Spryker/Zed/Category/Communication/Form/CategoryType.php +++ b/Bundles/Category/src/Spryker/Zed/Category/Communication/Form/CategoryType.php @@ -188,7 +188,6 @@ protected function addParentNodeField(FormBuilderInterface $builder, array $choi 'property_path' => 'parentCategoryNode', 'label' => 'Parent', 'choices' => $choices, - 'choices_as_values' => true, 'choice_label' => 'name', 'choice_value' => 'idCategoryNode', 'group_by' => 'path', @@ -209,7 +208,6 @@ protected function addExtraParentsField(FormBuilderInterface $builder, array $ch $builder->add(self::FIELD_EXTRA_PARENTS, Select2ComboBoxType::class, [ 'label' => 'Additional Parents', 'choices' => $choices, - 'choices_as_values' => true, 'choice_label' => 'name', 'choice_value' => 'idCategoryNode', 'multiple' => true, @@ -240,7 +238,6 @@ protected function addTemplateField(FormBuilderInterface $builder, array $choice $builder->add(static::FIELD_TEMPLATE, Select2ComboBoxType::class, [ 'label' => 'Template', 'choices' => array_flip($choices), - 'choices_as_values' => true, 'required' => true, 'constraints' => [ new NotBlank(), diff --git a/Bundles/Cms/src/Spryker/Zed/Cms/Communication/Controller/GlossaryController.php b/Bundles/Cms/src/Spryker/Zed/Cms/Communication/Controller/GlossaryController.php index 4a213d30d1f..aea51fc5770 100644 --- a/Bundles/Cms/src/Spryker/Zed/Cms/Communication/Controller/GlossaryController.php +++ b/Bundles/Cms/src/Spryker/Zed/Cms/Communication/Controller/GlossaryController.php @@ -304,7 +304,7 @@ protected function extractGlossaryMapping(?int $idPage, LocaleTransfer $localeTr */ protected function handleAjaxRequest(array $forms, int $idForm, LocaleTransfer $localeTransfer): JsonResponse { - if ($forms[$idForm]->isValid()) { + if ($forms[$idForm]->isSubmitted() && $forms[$idForm]->isValid()) { $data = $forms[$idForm]->getData(); $this->saveGlossaryKeyPageMapping($data, $localeTransfer); diff --git a/Bundles/CmsBlockCategoryConnector/src/Spryker/Zed/CmsBlockCategoryConnector/Communication/Form/CategoryType.php b/Bundles/CmsBlockCategoryConnector/src/Spryker/Zed/CmsBlockCategoryConnector/Communication/Form/CategoryType.php index 8616fee0b17..99e6c977ada 100644 --- a/Bundles/CmsBlockCategoryConnector/src/Spryker/Zed/CmsBlockCategoryConnector/Communication/Form/CategoryType.php +++ b/Bundles/CmsBlockCategoryConnector/src/Spryker/Zed/CmsBlockCategoryConnector/Communication/Form/CategoryType.php @@ -88,7 +88,6 @@ protected function addCmsBlockFields(FormBuilderInterface $builder, array $posit 'property_path' => static::FIELD_CMS_BLOCKS . '[' . $idCmsBlockCategoryPosition . ']', 'label' => 'CMS Blocks: ' . $positionName, 'choices' => array_flip($choices), - 'choices_as_values' => true, 'multiple' => true, 'required' => false, 'attr' => [ diff --git a/Bundles/CmsBlockCategoryConnector/src/Spryker/Zed/CmsBlockCategoryConnector/Communication/Form/CmsBlockType.php b/Bundles/CmsBlockCategoryConnector/src/Spryker/Zed/CmsBlockCategoryConnector/Communication/Form/CmsBlockType.php index 6df2f49a23a..0513dcc9321 100644 --- a/Bundles/CmsBlockCategoryConnector/src/Spryker/Zed/CmsBlockCategoryConnector/Communication/Form/CmsBlockType.php +++ b/Bundles/CmsBlockCategoryConnector/src/Spryker/Zed/CmsBlockCategoryConnector/Communication/Form/CmsBlockType.php @@ -144,7 +144,6 @@ protected function addCategoryField(FormBuilderInterface $builder, array $catego 'property_path' => static::FIELD_CATEGORIES . '[' . $idCmsBlockCategoryPosition . ']', 'label' => 'Categories: ' . $positionName, 'choices' => array_flip($categoryList), - 'choices_as_values' => true, 'multiple' => true, 'required' => false, ]); diff --git a/Bundles/CmsBlockGui/src/Spryker/Zed/CmsBlockGui/Communication/Form/Block/CmsBlockForm.php b/Bundles/CmsBlockGui/src/Spryker/Zed/CmsBlockGui/Communication/Form/Block/CmsBlockForm.php index e0cd49acee8..3baef8c552d 100644 --- a/Bundles/CmsBlockGui/src/Spryker/Zed/CmsBlockGui/Communication/Form/Block/CmsBlockForm.php +++ b/Bundles/CmsBlockGui/src/Spryker/Zed/CmsBlockGui/Communication/Form/Block/CmsBlockForm.php @@ -129,7 +129,6 @@ protected function addFkTemplateField(FormBuilderInterface $builder, array $choi $builder->add(static::FIELD_FK_TEMPLATE, ChoiceType::class, [ 'label' => 'Template', 'choices' => array_flip($choices[static::OPTION_TEMPLATE_CHOICES]), - 'choices_as_values' => true, 'constraints' => [ new Callback([ 'callback' => function ($name, ExecutionContextInterface $context) { diff --git a/Bundles/CmsGui/src/Spryker/Zed/CmsGui/Communication/Form/Page/CmsPageFormType.php b/Bundles/CmsGui/src/Spryker/Zed/CmsGui/Communication/Form/Page/CmsPageFormType.php index e7eaf2355f1..6077df20d2e 100644 --- a/Bundles/CmsGui/src/Spryker/Zed/CmsGui/Communication/Form/Page/CmsPageFormType.php +++ b/Bundles/CmsGui/src/Spryker/Zed/CmsGui/Communication/Form/Page/CmsPageFormType.php @@ -112,7 +112,6 @@ protected function addFkTemplateField(FormBuilderInterface $builder, array $choi $builder->add(static::FIELD_FK_TEMPLATE, ChoiceType::class, [ 'label' => 'Template', 'choices' => array_flip($choices), - 'choices_as_values' => true, ]); return $this; diff --git a/Bundles/CmsGui/src/Spryker/Zed/CmsGui/Communication/Form/Version/CmsVersionFormType.php b/Bundles/CmsGui/src/Spryker/Zed/CmsGui/Communication/Form/Version/CmsVersionFormType.php index 837b967e162..12e6292b6d3 100644 --- a/Bundles/CmsGui/src/Spryker/Zed/CmsGui/Communication/Form/Version/CmsVersionFormType.php +++ b/Bundles/CmsGui/src/Spryker/Zed/CmsGui/Communication/Form/Version/CmsVersionFormType.php @@ -61,7 +61,6 @@ protected function addVersionNameField(FormBuilderInterface $builder, array $cho $builder->add('version', ChoiceType::class, [ 'label' => false, 'choices' => array_flip($choices), - 'choices_as_values' => true, 'required' => true, 'constraints' => [ new Required(), diff --git a/Bundles/CompanyBusinessUnitGui/src/Spryker/Zed/CompanyBusinessUnitGui/Communication/Form/CompanyBusinessUnitForm.php b/Bundles/CompanyBusinessUnitGui/src/Spryker/Zed/CompanyBusinessUnitGui/Communication/Form/CompanyBusinessUnitForm.php index 69612167f72..b1958f2b8d6 100644 --- a/Bundles/CompanyBusinessUnitGui/src/Spryker/Zed/CompanyBusinessUnitGui/Communication/Form/CompanyBusinessUnitForm.php +++ b/Bundles/CompanyBusinessUnitGui/src/Spryker/Zed/CompanyBusinessUnitGui/Communication/Form/CompanyBusinessUnitForm.php @@ -105,7 +105,6 @@ protected function addParentNameField( 'label' => 'Parent', 'placeholder' => 'No parent', 'choices' => $choicesValues, - 'choices_as_values' => true, 'required' => false, 'choice_attr' => $choicesAttributes, ]); @@ -178,7 +177,6 @@ protected function addCompanyField(FormBuilderInterface $builder, array $choices 'label' => 'Company', 'placeholder' => 'Select one', 'choices' => $choices, - 'choices_as_values' => true, 'constraints' => [ new NotBlank(), ], diff --git a/Bundles/CompanyBusinessUnitGui/src/Spryker/Zed/CompanyBusinessUnitGui/Communication/Form/CompanyUserBusinessUnitForm.php b/Bundles/CompanyBusinessUnitGui/src/Spryker/Zed/CompanyBusinessUnitGui/Communication/Form/CompanyUserBusinessUnitForm.php index d40f6b580da..25564cf7e52 100644 --- a/Bundles/CompanyBusinessUnitGui/src/Spryker/Zed/CompanyBusinessUnitGui/Communication/Form/CompanyUserBusinessUnitForm.php +++ b/Bundles/CompanyBusinessUnitGui/src/Spryker/Zed/CompanyBusinessUnitGui/Communication/Form/CompanyUserBusinessUnitForm.php @@ -63,7 +63,6 @@ protected function addCompanyBusinessUnitCollectionField(FormBuilderInterface $b 'placeholder' => 'Business Unit name', 'choices' => $options[static::OPTION_VALUES_BUSINESS_UNITS_CHOICES], 'choice_attr' => $options[static::OPTION_ATTRIBUTES_BUSINESS_UNITS_CHOICES], - 'choices_as_values' => true, 'required' => true, 'attr' => [ 'template_path' => $this->getTemplatePath(), diff --git a/Bundles/CompanyRoleGui/src/Spryker/Zed/CompanyRoleGui/Communication/Form/CompanyRoleCreateForm.php b/Bundles/CompanyRoleGui/src/Spryker/Zed/CompanyRoleGui/Communication/Form/CompanyRoleCreateForm.php index 8554ebefdfc..88ccd39c55d 100644 --- a/Bundles/CompanyRoleGui/src/Spryker/Zed/CompanyRoleGui/Communication/Form/CompanyRoleCreateForm.php +++ b/Bundles/CompanyRoleGui/src/Spryker/Zed/CompanyRoleGui/Communication/Form/CompanyRoleCreateForm.php @@ -165,7 +165,6 @@ protected function addPermissionCollectionField(FormBuilderInterface $builder, a { $builder->add(static::FIELD_PERMISSION_COLLECTION, ChoiceType::class, [ 'choices' => $options[static::OPTION_PERMISSION_CHOICES], - 'choices_as_values' => true, 'label' => false, 'expanded' => true, 'required' => true, diff --git a/Bundles/CompanyRoleGui/src/Spryker/Zed/CompanyRoleGui/Communication/Form/CompanyUserRoleByCompany/CompanyUserRoleByCompanyForm.php b/Bundles/CompanyRoleGui/src/Spryker/Zed/CompanyRoleGui/Communication/Form/CompanyUserRoleByCompany/CompanyUserRoleByCompanyForm.php index 75f2bbb9a42..64414d0e9bb 100644 --- a/Bundles/CompanyRoleGui/src/Spryker/Zed/CompanyRoleGui/Communication/Form/CompanyUserRoleByCompany/CompanyUserRoleByCompanyForm.php +++ b/Bundles/CompanyRoleGui/src/Spryker/Zed/CompanyRoleGui/Communication/Form/CompanyUserRoleByCompany/CompanyUserRoleByCompanyForm.php @@ -72,7 +72,6 @@ protected function addCompanyRoleCollectionField(FormBuilderInterface $builder, $builder->add(static::FIELD_COMPANY_ROLE_COLLECTION, ChoiceType::class, [ 'choices' => $options[static::OPTION_COMPANY_ROLE_CHOICES], 'constraints' => $this->createCompanyRoleCollectionConstraints(), - 'choices_as_values' => true, 'label' => false, 'expanded' => true, 'required' => true, diff --git a/Bundles/CompanyRoleGui/src/Spryker/Zed/CompanyRoleGui/Communication/Form/CompanyUserRoleForm.php b/Bundles/CompanyRoleGui/src/Spryker/Zed/CompanyRoleGui/Communication/Form/CompanyUserRoleForm.php index c8ccdffcf5e..e0f6c633e37 100644 --- a/Bundles/CompanyRoleGui/src/Spryker/Zed/CompanyRoleGui/Communication/Form/CompanyUserRoleForm.php +++ b/Bundles/CompanyRoleGui/src/Spryker/Zed/CompanyRoleGui/Communication/Form/CompanyUserRoleForm.php @@ -75,7 +75,6 @@ protected function addCompanyRoleCollectionField(FormBuilderInterface $builder, 'choices' => $options[static::OPTION_VALUES_ROLES_CHOICES], 'choice_attr' => $options[static::OPTION_ATTRIBUTES_ROLES_CHOICES], 'constraints' => $this->createCompanyRoleCollectionConstraints(), - 'choices_as_values' => true, 'label' => false, 'expanded' => true, 'required' => true, diff --git a/Bundles/CompanyUnitAddressGui/src/Spryker/Zed/CompanyUnitAddressGui/Communication/Form/CompanyUnitAddressForm.php b/Bundles/CompanyUnitAddressGui/src/Spryker/Zed/CompanyUnitAddressGui/Communication/Form/CompanyUnitAddressForm.php index 12f96103f91..fb64444e211 100644 --- a/Bundles/CompanyUnitAddressGui/src/Spryker/Zed/CompanyUnitAddressGui/Communication/Form/CompanyUnitAddressForm.php +++ b/Bundles/CompanyUnitAddressGui/src/Spryker/Zed/CompanyUnitAddressGui/Communication/Form/CompanyUnitAddressForm.php @@ -90,7 +90,6 @@ protected function addCompanyField(FormBuilderInterface $builder, array $choices 'label' => 'Company', 'placeholder' => 'Select one', 'choices' => array_flip($choices), - 'choices_as_values' => true, 'constraints' => [ new NotBlank(), ], @@ -111,7 +110,6 @@ protected function addCountryField(FormBuilderInterface $builder, array $choices 'label' => 'Country', 'placeholder' => 'Select one', 'choices' => array_flip($choices), - 'choices_as_values' => true, 'constraints' => [ new NotBlank(), ], diff --git a/Bundles/CompanyUserGui/src/Spryker/Zed/CompanyUserGui/Communication/Form/CompanyUserCustomerForm.php b/Bundles/CompanyUserGui/src/Spryker/Zed/CompanyUserGui/Communication/Form/CompanyUserCustomerForm.php index 4dc6ef82ccb..24203492e27 100644 --- a/Bundles/CompanyUserGui/src/Spryker/Zed/CompanyUserGui/Communication/Form/CompanyUserCustomerForm.php +++ b/Bundles/CompanyUserGui/src/Spryker/Zed/CompanyUserGui/Communication/Form/CompanyUserCustomerForm.php @@ -125,7 +125,6 @@ protected function addSalutationField(FormBuilderInterface $builder, array $choi 'label' => 'Salutation', 'placeholder' => 'Select one', 'choices' => $choices, - 'choices_as_values' => true, 'required' => false, ]); @@ -174,7 +173,6 @@ protected function addGenderField(FormBuilderInterface $builder, array $choices) 'label' => 'Gender', 'placeholder' => 'Select one', 'choices' => $choices, - 'choices_as_values' => true, 'constraints' => [ new Required(), ], diff --git a/Bundles/CompanyUserGui/src/Spryker/Zed/CompanyUserGui/Communication/Form/CompanyUserForm.php b/Bundles/CompanyUserGui/src/Spryker/Zed/CompanyUserGui/Communication/Form/CompanyUserForm.php index 5faba410701..a58845d37c0 100644 --- a/Bundles/CompanyUserGui/src/Spryker/Zed/CompanyUserGui/Communication/Form/CompanyUserForm.php +++ b/Bundles/CompanyUserGui/src/Spryker/Zed/CompanyUserGui/Communication/Form/CompanyUserForm.php @@ -111,7 +111,6 @@ protected function addCompanyField(FormBuilderInterface $builder, array $choices 'label' => 'Company', 'placeholder' => 'Company name', 'choices' => $choices, - 'choices_as_values' => true, 'constraints' => [ new NotBlank(), ], diff --git a/Bundles/CompanyUserGui/src/Spryker/Zed/CompanyUserGui/Communication/Form/CustomerCompanyAttachForm.php b/Bundles/CompanyUserGui/src/Spryker/Zed/CompanyUserGui/Communication/Form/CustomerCompanyAttachForm.php index bd43a028f57..a9f67f6a012 100644 --- a/Bundles/CompanyUserGui/src/Spryker/Zed/CompanyUserGui/Communication/Form/CustomerCompanyAttachForm.php +++ b/Bundles/CompanyUserGui/src/Spryker/Zed/CompanyUserGui/Communication/Form/CustomerCompanyAttachForm.php @@ -70,7 +70,6 @@ protected function addCompanyField(FormBuilderInterface $builder, array $choices 'label' => 'Company', 'placeholder' => 'Company name', 'choices' => $choices, - 'choices_as_values' => true, 'constraints' => [ new NotBlank(), new GreaterThan([ diff --git a/Bundles/Customer/src/Spryker/Zed/Customer/Communication/Form/AddressForm.php b/Bundles/Customer/src/Spryker/Zed/Customer/Communication/Form/AddressForm.php index cce15ff4f92..eb6856a1618 100644 --- a/Bundles/Customer/src/Spryker/Zed/Customer/Communication/Form/AddressForm.php +++ b/Bundles/Customer/src/Spryker/Zed/Customer/Communication/Form/AddressForm.php @@ -124,7 +124,6 @@ protected function addSalutationField(FormBuilderInterface $builder, array $choi 'label' => 'Salutation', 'placeholder' => 'Select one', 'choices' => array_flip($choices), - 'choices_as_values' => true, ]); return $this; @@ -261,7 +260,6 @@ protected function addFkCountryField(FormBuilderInterface $builder, array $choic 'label' => 'Country', 'placeholder' => 'Select one', 'choices' => array_flip($choices), - 'choices_as_values' => true, 'preferred_choices' => $preferredChoices, 'constraints' => [ new NotBlank(), diff --git a/Bundles/Customer/src/Spryker/Zed/Customer/Communication/Form/CustomerForm.php b/Bundles/Customer/src/Spryker/Zed/Customer/Communication/Form/CustomerForm.php index fa3b14b2f62..0f48a220673 100644 --- a/Bundles/Customer/src/Spryker/Zed/Customer/Communication/Form/CustomerForm.php +++ b/Bundles/Customer/src/Spryker/Zed/Customer/Communication/Form/CustomerForm.php @@ -131,7 +131,6 @@ protected function addSalutationField(FormBuilderInterface $builder, array $choi 'label' => 'Salutation', 'placeholder' => 'Select one', 'choices' => array_flip($choices), - 'choices_as_values' => true, 'constraints' => [ new NotBlank(), ], @@ -182,7 +181,6 @@ protected function addGenderField(FormBuilderInterface $builder, array $choices) 'label' => 'Gender', 'placeholder' => 'Select one', 'choices' => array_flip($choices), - 'choices_as_values' => true, 'constraints' => [ new Required(), ], @@ -259,7 +257,6 @@ protected function addLocaleField(FormBuilderInterface $builder, array $choices) 'label' => 'Locale', 'placeholder' => 'Select one', 'choices' => array_flip($choices), - 'choices_as_values' => true, 'required' => false, ]); diff --git a/Bundles/Customer/src/Spryker/Zed/Customer/Communication/Form/CustomerUpdateForm.php b/Bundles/Customer/src/Spryker/Zed/Customer/Communication/Form/CustomerUpdateForm.php index 7bf0f21c776..24ce48da746 100644 --- a/Bundles/Customer/src/Spryker/Zed/Customer/Communication/Form/CustomerUpdateForm.php +++ b/Bundles/Customer/src/Spryker/Zed/Customer/Communication/Form/CustomerUpdateForm.php @@ -79,7 +79,6 @@ protected function addDefaultBillingAddressField(FormBuilderInterface $builder, 'label' => 'Billing Address', 'placeholder' => 'Select one', 'choices' => array_flip($choices), - 'choices_as_values' => true, 'required' => false, ]); @@ -98,7 +97,6 @@ protected function addDefaultShippingAddressField(FormBuilderInterface $builder, 'label' => 'Shipping Address', 'placeholder' => 'Select one', 'choices' => array_flip($choices), - 'choices_as_values' => true, 'required' => false, ]); diff --git a/Bundles/Development/src/Spryker/Zed/Development/Communication/Form/BundlesFormType.php b/Bundles/Development/src/Spryker/Zed/Development/Communication/Form/BundlesFormType.php index dc4021eb3b6..1bc77ca2354 100644 --- a/Bundles/Development/src/Spryker/Zed/Development/Communication/Form/BundlesFormType.php +++ b/Bundles/Development/src/Spryker/Zed/Development/Communication/Form/BundlesFormType.php @@ -47,7 +47,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'expanded' => true, 'multiple' => true, 'choices' => array_flip($options[static::BUNDLE_NAME_CHOICES]), - 'choices_as_values' => true, ]); $builder->add(static::SHOW_INCOMING, CheckboxType::class, [ diff --git a/Bundles/Discount/src/Spryker/Zed/Discount/Communication/Form/CalculatorForm.php b/Bundles/Discount/src/Spryker/Zed/Discount/Communication/Form/CalculatorForm.php index dac9b993852..26c9a589aac 100644 --- a/Bundles/Discount/src/Spryker/Zed/Discount/Communication/Form/CalculatorForm.php +++ b/Bundles/Discount/src/Spryker/Zed/Discount/Communication/Form/CalculatorForm.php @@ -197,7 +197,6 @@ protected function addDiscountCollectorStrategyTypeSelector(FormBuilderInterface 'multiple' => false, 'label' => 'Discount collection type', 'choices' => array_flip($this->getFactory()->createCalculatorFormDataProvider()->getOptions()[static::OPTION_COLLECTOR_TYPE_CHOICES]), - 'choices_as_values' => true, 'attr' => [ 'class' => 'inline-radio', ], @@ -217,7 +216,6 @@ protected function addCalculatorType(FormBuilderInterface $builder) 'label' => 'Calculator type', 'placeholder' => 'Select one', 'choices' => array_flip($this->getFactory()->createCalculatorFormDataProvider()->getData()[static::FIELD_CALCULATOR_PLUGIN]), - 'choices_as_values' => true, 'required' => true, 'choice_attr' => function ($pluginName) { return [ diff --git a/Bundles/Discount/src/Spryker/Zed/Discount/Communication/Form/GeneralForm.php b/Bundles/Discount/src/Spryker/Zed/Discount/Communication/Form/GeneralForm.php index 5c6257e4691..ed7cff474d5 100644 --- a/Bundles/Discount/src/Spryker/Zed/Discount/Communication/Form/GeneralForm.php +++ b/Bundles/Discount/src/Spryker/Zed/Discount/Communication/Form/GeneralForm.php @@ -90,7 +90,6 @@ protected function addDiscountType(FormBuilderInterface $builder) $builder->add(static::FIELD_DISCOUNT_TYPE, ChoiceType::class, [ 'label' => 'Discount Type', 'choices' => array_flip($this->getVoucherChoices()), - 'choices_as_values' => true, 'constraints' => [ new NotBlank(), ], @@ -163,7 +162,6 @@ protected function addExclusive(FormBuilderInterface $builder) self::NON_EXCLUSIVE, self::EXCLUSIVE, ]), - 'choices_as_values' => true, 'constraints' => [ new NotBlank(), ], diff --git a/Bundles/Discount/src/Spryker/Zed/Discount/Communication/Form/VoucherForm.php b/Bundles/Discount/src/Spryker/Zed/Discount/Communication/Form/VoucherForm.php index c50ac2eba65..0eae3765f73 100644 --- a/Bundles/Discount/src/Spryker/Zed/Discount/Communication/Form/VoucherForm.php +++ b/Bundles/Discount/src/Spryker/Zed/Discount/Communication/Form/VoucherForm.php @@ -96,7 +96,6 @@ protected function addRandomGeneratedCodeLength(FormBuilderInterface $builder) 'placeholder' => 'No additional random characters', 'required' => false, 'choices' => array_flip($this->createCodeLengthRangeList()), - 'choices_as_values' => true, ] ); diff --git a/Bundles/DummyPayment/phpstan.neon b/Bundles/DummyPayment/phpstan.neon index aee57795041..096cae4b077 100644 --- a/Bundles/DummyPayment/phpstan.neon +++ b/Bundles/DummyPayment/phpstan.neon @@ -1,3 +1,2 @@ parameters: ignoreErrors: - - '#.+ has invalid typehint type Symfony\\Component\\OptionsResolver\\OptionsResolverInterface.#' diff --git a/Bundles/DummyPayment/src/Spryker/Yves/DummyPayment/Form/CreditCardSubForm.php b/Bundles/DummyPayment/src/Spryker/Yves/DummyPayment/Form/CreditCardSubForm.php index d62498930ec..102c0ac4015 100644 --- a/Bundles/DummyPayment/src/Spryker/Yves/DummyPayment/Form/CreditCardSubForm.php +++ b/Bundles/DummyPayment/src/Spryker/Yves/DummyPayment/Form/CreditCardSubForm.php @@ -13,7 +13,6 @@ use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; class CreditCardSubForm extends AbstractSubForm { @@ -68,11 +67,11 @@ public function configureOptions(OptionsResolver $resolver) /** * @deprecated Use `configureOptions()` instead. * - * @param \Symfony\Component\OptionsResolver\OptionsResolverInterface $resolver + * @param \Symfony\Component\OptionsResolver\OptionsResolver $resolver * * @return void */ - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function setDefaultOptions(OptionsResolver $resolver) { $this->configureOptions($resolver); } @@ -177,7 +176,6 @@ protected function addCardExpiresMonth(FormBuilderInterface $builder, array $opt [ 'label' => 'dummyPaymentCreditCard.card_expires', 'choices' => array_flip($options[self::OPTIONS_FIELD_NAME][self::OPTION_CARD_EXPIRES_CHOICES_MONTH]), - 'choices_as_values' => true, 'required' => true, 'constraints' => [ $this->createNotBlankConstraint(), @@ -202,7 +200,6 @@ protected function addCardExpiresYear(FormBuilderInterface $builder, array $opti [ 'label' => false, 'choices' => array_flip($options[self::OPTIONS_FIELD_NAME][self::OPTION_CARD_EXPIRES_CHOICES_YEAR]), - 'choices_as_values' => true, 'required' => true, 'attr' => [ 'placeholder' => 'Expires year', diff --git a/Bundles/DummyPayment/src/Spryker/Yves/DummyPayment/Form/InvoiceSubForm.php b/Bundles/DummyPayment/src/Spryker/Yves/DummyPayment/Form/InvoiceSubForm.php index 12f7131b9c4..1f18c85e07d 100644 --- a/Bundles/DummyPayment/src/Spryker/Yves/DummyPayment/Form/InvoiceSubForm.php +++ b/Bundles/DummyPayment/src/Spryker/Yves/DummyPayment/Form/InvoiceSubForm.php @@ -11,7 +11,6 @@ use Spryker\Shared\DummyPayment\DummyPaymentConfig; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; class InvoiceSubForm extends AbstractSubForm { @@ -56,11 +55,11 @@ public function configureOptions(OptionsResolver $resolver) /** * @deprecated Use `configureOptions()` instead. * - * @param \Symfony\Component\OptionsResolver\OptionsResolverInterface $resolver + * @param \Symfony\Component\OptionsResolver\OptionsResolver $resolver * * @return void */ - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function setDefaultOptions(OptionsResolver $resolver) { $this->configureOptions($resolver); } diff --git a/Bundles/Gui/phpstan.neon b/Bundles/Gui/phpstan.neon index 455bf4e849c..1b00e15912d 100644 --- a/Bundles/Gui/phpstan.neon +++ b/Bundles/Gui/phpstan.neon @@ -1,6 +1,4 @@ parameters: ignoreErrors: - '#Function twig_escape_filter not found.#' - - '#.+ has invalid typehint type Symfony\\Component\\OptionsResolver\\OptionsResolverInterface.#' - - '#Call to method setDefault\(\) on an unknown class Symfony\\Component\\OptionsResolver\\OptionsResolverInterface.#' - '#Class Symfony\\Bridge\\Twig\\Form\\TwigRenderer not found.#' diff --git a/Bundles/Gui/src/Spryker/Shared/Gui/Form/AbstractForm.php b/Bundles/Gui/src/Spryker/Shared/Gui/Form/AbstractForm.php index c21a909d445..c8867eafc3e 100644 --- a/Bundles/Gui/src/Spryker/Shared/Gui/Form/AbstractForm.php +++ b/Bundles/Gui/src/Spryker/Shared/Gui/Form/AbstractForm.php @@ -12,7 +12,7 @@ use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormTypeInterface; use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; /** * @deprecated Use `Spryker\Zed\Kernel\Communication\Form\AbstractType` for Zed and `Spryker\Yves\Kernel\Form\AbstractType` for Yves instead. @@ -45,11 +45,11 @@ abstract public function populateFormFields(); abstract protected function getDataClass(); /** - * @param \Symfony\Component\OptionsResolver\OptionsResolverInterface $resolver + * @param \Symfony\Component\OptionsResolver\OptionsResolver $resolver * * @return void */ - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function setDefaultOptions(OptionsResolver $resolver) { if ($this->getDataClass() instanceof TransferInterface) { $resolver->setDefault('data_class', get_class($this->getDataClass())); diff --git a/Bundles/Gui/src/Spryker/Zed/Gui/Communication/Form/DeleteForm.php b/Bundles/Gui/src/Spryker/Zed/Gui/Communication/Form/DeleteForm.php index 14903f90b89..45faeb98be8 100644 --- a/Bundles/Gui/src/Spryker/Zed/Gui/Communication/Form/DeleteForm.php +++ b/Bundles/Gui/src/Spryker/Zed/Gui/Communication/Form/DeleteForm.php @@ -12,7 +12,6 @@ use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; /** * @method \Spryker\Zed\Gui\Communication\GuiCommunicationFactory getFactory() @@ -40,11 +39,11 @@ public function configureOptions(OptionsResolver $resolver) /** * @deprecated Use `configureOptions()` instead. * - * @param \Symfony\Component\OptionsResolver\OptionsResolverInterface $resolver + * @param \Symfony\Component\OptionsResolver\OptionsResolver $resolver * * @return void */ - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function setDefaultOptions(OptionsResolver $resolver) { $this->configureOptions($resolver); } diff --git a/Bundles/Gui/src/Spryker/Zed/Gui/Communication/Form/Type/AutosuggestType.php b/Bundles/Gui/src/Spryker/Zed/Gui/Communication/Form/Type/AutosuggestType.php index a6752b6412b..b6154dd9912 100644 --- a/Bundles/Gui/src/Spryker/Zed/Gui/Communication/Form/Type/AutosuggestType.php +++ b/Bundles/Gui/src/Spryker/Zed/Gui/Communication/Form/Type/AutosuggestType.php @@ -12,7 +12,6 @@ use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormView; use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; /** * @method \Spryker\Zed\Gui\Communication\GuiCommunicationFactory getFactory() @@ -56,11 +55,11 @@ public function configureOptions(OptionsResolver $resolver) /** * @deprecated Use `configureOptions()` instead. * - * @param \Symfony\Component\OptionsResolver\OptionsResolverInterface $resolver + * @param \Symfony\Component\OptionsResolver\OptionsResolver $resolver * * @return void */ - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function setDefaultOptions(OptionsResolver $resolver) { $this->configureOptions($resolver); } diff --git a/Bundles/Gui/src/Spryker/Zed/Gui/Communication/Form/Type/Select2ComboBoxType.php b/Bundles/Gui/src/Spryker/Zed/Gui/Communication/Form/Type/Select2ComboBoxType.php index e3ad1912ac9..a87702bfc52 100644 --- a/Bundles/Gui/src/Spryker/Zed/Gui/Communication/Form/Type/Select2ComboBoxType.php +++ b/Bundles/Gui/src/Spryker/Zed/Gui/Communication/Form/Type/Select2ComboBoxType.php @@ -12,7 +12,6 @@ use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormView; use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; /** * @method \Spryker\Zed\Gui\Communication\GuiCommunicationFactory getFactory() @@ -50,11 +49,11 @@ public function configureOptions(OptionsResolver $resolver) /** * @deprecated Use `configureOptions()` instead. * - * @param \Symfony\Component\OptionsResolver\OptionsResolverInterface $resolver + * @param \Symfony\Component\OptionsResolver\OptionsResolver $resolver * * @return void */ - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function setDefaultOptions(OptionsResolver $resolver) { $this->configureOptions($resolver); } diff --git a/Bundles/Gui/src/Spryker/Zed/Gui/Communication/Form/Type/SelectType.php b/Bundles/Gui/src/Spryker/Zed/Gui/Communication/Form/Type/SelectType.php index e481c02060a..80799848e28 100644 --- a/Bundles/Gui/src/Spryker/Zed/Gui/Communication/Form/Type/SelectType.php +++ b/Bundles/Gui/src/Spryker/Zed/Gui/Communication/Form/Type/SelectType.php @@ -12,7 +12,6 @@ use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormView; use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; /** * @method \Spryker\Zed\Gui\Communication\GuiCommunicationFactory getFactory() @@ -52,11 +51,11 @@ public function configureOptions(OptionsResolver $resolver) /** * @deprecated Use `configureOptions()` instead. * - * @param \Symfony\Component\OptionsResolver\OptionsResolverInterface $resolver + * @param \Symfony\Component\OptionsResolver\OptionsResolver $resolver * * @return void */ - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function setDefaultOptions(OptionsResolver $resolver) { $this->configureOptions($resolver); } diff --git a/Bundles/ManualOrderEntryGui/src/Spryker/Zed/ManualOrderEntryGui/Communication/Form/Customer/CustomersListType.php b/Bundles/ManualOrderEntryGui/src/Spryker/Zed/ManualOrderEntryGui/Communication/Form/Customer/CustomersListType.php index c99c3e0986e..5c6be8ce1ca 100644 --- a/Bundles/ManualOrderEntryGui/src/Spryker/Zed/ManualOrderEntryGui/Communication/Form/Customer/CustomersListType.php +++ b/Bundles/ManualOrderEntryGui/src/Spryker/Zed/ManualOrderEntryGui/Communication/Form/Customer/CustomersListType.php @@ -60,7 +60,6 @@ protected function addCustomerIdField(FormBuilderInterface $builder, array $cust 'property_path' => QuoteTransfer::CUSTOMER . '.' . CustomerTransfer::ID_CUSTOMER, 'label' => 'Select Customer', 'choices' => array_flip($customerList), - 'choices_as_values' => true, 'multiple' => false, 'required' => true, ]); diff --git a/Bundles/ManualOrderEntryGui/src/Spryker/Zed/ManualOrderEntryGui/Communication/Form/Shipment/ShipmentType.php b/Bundles/ManualOrderEntryGui/src/Spryker/Zed/ManualOrderEntryGui/Communication/Form/Shipment/ShipmentType.php index d89cc50c000..ff5cfef6c93 100644 --- a/Bundles/ManualOrderEntryGui/src/Spryker/Zed/ManualOrderEntryGui/Communication/Form/Shipment/ShipmentType.php +++ b/Bundles/ManualOrderEntryGui/src/Spryker/Zed/ManualOrderEntryGui/Communication/Form/Shipment/ShipmentType.php @@ -64,7 +64,6 @@ protected function addStoreField(FormBuilderInterface $builder, array $shipmentM 'property_path' => QuoteTransfer::SHIPMENT . '.' . ShipmentTransfer::METHOD . '.' . ShipmentMethodTransfer::ID_SHIPMENT_METHOD, 'label' => 'Selecting a shipment method', 'choices' => array_flip($shipmentMethods), - 'choices_as_values' => true, 'multiple' => false, 'required' => true, ]); diff --git a/Bundles/ManualOrderEntryGui/src/Spryker/Zed/ManualOrderEntryGui/Communication/Form/Store/StoreType.php b/Bundles/ManualOrderEntryGui/src/Spryker/Zed/ManualOrderEntryGui/Communication/Form/Store/StoreType.php index 981d0673ee2..2abfcff386d 100644 --- a/Bundles/ManualOrderEntryGui/src/Spryker/Zed/ManualOrderEntryGui/Communication/Form/Store/StoreType.php +++ b/Bundles/ManualOrderEntryGui/src/Spryker/Zed/ManualOrderEntryGui/Communication/Form/Store/StoreType.php @@ -62,7 +62,6 @@ protected function addStoreField(FormBuilderInterface $builder, array $storesLis 'property_path' => QuoteTransfer::MANUAL_ORDER . '.' . ManualOrderTransfer::STORE_CURRENCY, 'label' => 'Store and Currency', 'choices' => array_flip($storesList), - 'choices_as_values' => true, 'multiple' => false, 'required' => true, ]); diff --git a/Bundles/MerchantRelationshipGui/src/Spryker/Zed/MerchantRelationshipGui/Communication/Form/MerchantRelationshipCreateForm.php b/Bundles/MerchantRelationshipGui/src/Spryker/Zed/MerchantRelationshipGui/Communication/Form/MerchantRelationshipCreateForm.php index d26f0fb74c5..cd49b3dde82 100644 --- a/Bundles/MerchantRelationshipGui/src/Spryker/Zed/MerchantRelationshipGui/Communication/Form/MerchantRelationshipCreateForm.php +++ b/Bundles/MerchantRelationshipGui/src/Spryker/Zed/MerchantRelationshipGui/Communication/Form/MerchantRelationshipCreateForm.php @@ -96,7 +96,6 @@ protected function addCompanyField(FormBuilderInterface $builder, array $options 'choices' => array_flip($options[static::OPTION_COMPANY_CHOICES]), 'mapped' => false, 'data' => $options[static::OPTION_SELECTED_COMPANY], - 'choices_as_values' => true, 'constraints' => [ new NotBlank(), ], @@ -117,7 +116,6 @@ protected function addMerchantField(FormBuilderInterface $builder, array $choice 'label' => static::MERCHANT_FIELD_LABEL, 'placeholder' => static::MERCHANT_FIELD_PLACEHOLDER, 'choices' => array_flip($choices), - 'choices_as_values' => true, 'constraints' => [ new NotBlank(), ], @@ -143,7 +141,6 @@ protected function addOwnerCompanyBusinessUnitField(FormBuilderInterface $builde 'label' => static::FK_COMPANY_BUSINESS_UNIT_FIELD_LABEL, 'placeholder' => static::FK_COMPANY_BUSINESS_UNIT_FIELD_PLACEHOLDER, 'choices' => array_flip($options[static::OPTION_ASSIGNED_COMPANY_BUSINESS_UNIT_CHOICES]), - 'choices_as_values' => true, 'required' => $options[static::OPTION_IS_PERSISTENCE_FORM], 'constraints' => $constraints, ]); @@ -163,7 +160,6 @@ protected function addAssignedCompanyBusinessUnitField(FormBuilderInterface $bui 'label' => static::ASSIGNED_COMPANY_BUSINESS_UNIT_FIELD_LABEL, 'placeholder' => static::ASSIGNED_COMPANY_BUSINESS_UNIT_FIELD_PLACEHOLDER, 'choices' => array_flip($choices), - 'choices_as_values' => true, 'required' => false, 'multiple' => 'true', ]); diff --git a/Bundles/MerchantRelationshipGui/src/Spryker/Zed/MerchantRelationshipGui/Communication/Form/MerchantRelationshipEditForm.php b/Bundles/MerchantRelationshipGui/src/Spryker/Zed/MerchantRelationshipGui/Communication/Form/MerchantRelationshipEditForm.php index aaecc7067e4..4275e630b44 100644 --- a/Bundles/MerchantRelationshipGui/src/Spryker/Zed/MerchantRelationshipGui/Communication/Form/MerchantRelationshipEditForm.php +++ b/Bundles/MerchantRelationshipGui/src/Spryker/Zed/MerchantRelationshipGui/Communication/Form/MerchantRelationshipEditForm.php @@ -42,7 +42,6 @@ protected function addCompanyDisabledField(FormBuilderInterface $builder, array 'choices' => array_flip($options[static::OPTION_COMPANY_CHOICES]), 'mapped' => false, 'data' => $options[static::OPTION_SELECTED_COMPANY], - 'choices_as_values' => true, 'disabled' => 'disabled', 'constraints' => [ new NotBlank(), @@ -64,7 +63,6 @@ protected function addMerchantDisabledField(FormBuilderInterface $builder, array 'label' => static::MERCHANT_FIELD_LABEL, 'placeholder' => static::MERCHANT_FIELD_PLACEHOLDER, 'choices' => array_flip($choices), - 'choices_as_values' => true, 'disabled' => 'disabled', 'constraints' => [ new NotBlank(), diff --git a/Bundles/MerchantRelationshipSalesOrderThresholdGui/src/Spryker/Zed/MerchantRelationshipSalesOrderThresholdGui/Communication/Form/MerchantRelationshipThresholdType.php b/Bundles/MerchantRelationshipSalesOrderThresholdGui/src/Spryker/Zed/MerchantRelationshipSalesOrderThresholdGui/Communication/Form/MerchantRelationshipThresholdType.php index 3b6e4cd6bcf..31b7f93442c 100644 --- a/Bundles/MerchantRelationshipSalesOrderThresholdGui/src/Spryker/Zed/MerchantRelationshipSalesOrderThresholdGui/Communication/Form/MerchantRelationshipThresholdType.php +++ b/Bundles/MerchantRelationshipSalesOrderThresholdGui/src/Spryker/Zed/MerchantRelationshipSalesOrderThresholdGui/Communication/Form/MerchantRelationshipThresholdType.php @@ -83,7 +83,6 @@ protected function addStoreCurrencyField(FormBuilderInterface $builder, array $o $builder->add(static::FIELD_STORE_CURRENCY, Select2ComboBoxType::class, [ 'label' => 'Store and Currency', 'choices' => $options[static::OPTION_STORE_CURRENCY_ARRAY], - 'choices_as_values' => true, 'placeholder' => false, 'multiple' => false, 'required' => true, diff --git a/Bundles/NavigationGui/src/Spryker/Zed/NavigationGui/Communication/Form/NavigationNodeFormType.php b/Bundles/NavigationGui/src/Spryker/Zed/NavigationGui/Communication/Form/NavigationNodeFormType.php index 0a809aa7070..552bd770205 100644 --- a/Bundles/NavigationGui/src/Spryker/Zed/NavigationGui/Communication/Form/NavigationNodeFormType.php +++ b/Bundles/NavigationGui/src/Spryker/Zed/NavigationGui/Communication/Form/NavigationNodeFormType.php @@ -92,7 +92,6 @@ protected function addNodeTypeField(FormBuilderInterface $builder) self::NODE_TYPE_LINK => 'Link', self::NODE_TYPE_EXTERNAL_URL => 'External URL', ]), - 'choices_as_values' => true, 'choice_attr' => [ 'Category' => ['data-url' => '/search-for-category'], 'CMS page' => ['data-url' => '/search-for-cms'], diff --git a/Bundles/PriceProductMerchantRelationshipGui/src/Spryker/Zed/PriceProductMerchantRelationshipGui/Communication/Form/MerchantRelationshipPriceDimensionForm.php b/Bundles/PriceProductMerchantRelationshipGui/src/Spryker/Zed/PriceProductMerchantRelationshipGui/Communication/Form/MerchantRelationshipPriceDimensionForm.php index 7248f508945..693296cc82d 100644 --- a/Bundles/PriceProductMerchantRelationshipGui/src/Spryker/Zed/PriceProductMerchantRelationshipGui/Communication/Form/MerchantRelationshipPriceDimensionForm.php +++ b/Bundles/PriceProductMerchantRelationshipGui/src/Spryker/Zed/PriceProductMerchantRelationshipGui/Communication/Form/MerchantRelationshipPriceDimensionForm.php @@ -65,7 +65,6 @@ protected function addMerchantRelationshipCollectionField(FormBuilderInterface $ $builder->add(PriceProductDimensionTransfer::ID_MERCHANT_RELATIONSHIP, ChoiceType::class, [ 'choices' => $options[static::OPTION_VALUES_MERCHANT_RELATIONSHIP_CHOICES], 'placeholder' => static::FIELD_PLACEHOLDER_MERCHANT_RELATIONSHIP, - 'choices_as_values' => true, 'label' => static::FIELD_LABEL_MERCHANT_RELATIONSHIP, 'attr' => [ 'template_path' => $this->getTemplatePath(), diff --git a/Bundles/ProductAttributeGui/src/Spryker/Zed/ProductAttributeGui/Communication/Controller/AttributeController.php b/Bundles/ProductAttributeGui/src/Spryker/Zed/ProductAttributeGui/Communication/Controller/AttributeController.php index ab817fac258..39ec7a7b487 100644 --- a/Bundles/ProductAttributeGui/src/Spryker/Zed/ProductAttributeGui/Communication/Controller/AttributeController.php +++ b/Bundles/ProductAttributeGui/src/Spryker/Zed/ProductAttributeGui/Communication/Controller/AttributeController.php @@ -70,7 +70,7 @@ public function createAction(Request $request) ->getAttributeForm($dataProvider->getData(), $dataProvider->getOptions()) ->handleRequest($request); - if (!$attributeForm->isValid()) { + if (!$attributeForm->isSubmitted() || !$attributeForm->isValid()) { return $this->viewResponse([ 'form' => $attributeForm->createView(), ]); @@ -179,7 +179,7 @@ public function editAction(Request $request) ->getAttributeForm($dataProvider->getData($idProductManagementAttribute), $dataProvider->getOptions($idProductManagementAttribute)) ->handleRequest($request); - if (!$attributeForm->isValid()) { + if (!$attributeForm->isSubmitted() || !$attributeForm->isValid()) { return $this->viewResponse([ 'form' => $attributeForm->createView(), ]); diff --git a/Bundles/ProductAttributeGui/src/Spryker/Zed/ProductAttributeGui/Communication/Form/AttributeForm.php b/Bundles/ProductAttributeGui/src/Spryker/Zed/ProductAttributeGui/Communication/Form/AttributeForm.php index 537cc37f268..14fef599d76 100644 --- a/Bundles/ProductAttributeGui/src/Spryker/Zed/ProductAttributeGui/Communication/Form/AttributeForm.php +++ b/Bundles/ProductAttributeGui/src/Spryker/Zed/ProductAttributeGui/Communication/Form/AttributeForm.php @@ -154,7 +154,6 @@ protected function addInputTypeField(FormBuilderInterface $builder, array $optio $builder->add(self::FIELD_INPUT_TYPE, ChoiceType::class, [ 'label' => 'Input type', 'choices' => array_flip($options[self::OPTION_ATTRIBUTE_TYPE_CHOICES]), - 'choices_as_values' => true, 'constraints' => [ new NotBlank(), ], diff --git a/Bundles/ProductListGui/src/Spryker/Zed/ProductListGui/Communication/Form/ProductListCategoryRelationFormType.php b/Bundles/ProductListGui/src/Spryker/Zed/ProductListGui/Communication/Form/ProductListCategoryRelationFormType.php index 9736ab0d8ad..3fcdaf7e3ce 100644 --- a/Bundles/ProductListGui/src/Spryker/Zed/ProductListGui/Communication/Form/ProductListCategoryRelationFormType.php +++ b/Bundles/ProductListGui/src/Spryker/Zed/ProductListGui/Communication/Form/ProductListCategoryRelationFormType.php @@ -87,7 +87,6 @@ protected function addCategoryIdsField(FormBuilderInterface $builder, array $opt $builder->add(static::FIELD_CATEGORY_IDS, Select2ComboBoxType::class, [ 'label' => 'Categories', 'choices' => array_flip($options[ProductListAggregateFormType::OPTION_CATEGORY_IDS]), - 'choices_as_values' => true, 'multiple' => true, 'required' => false, ]); diff --git a/Bundles/ProductManagement/src/Spryker/Zed/ProductManagement/Communication/Form/Product/AttributeAbstractForm.php b/Bundles/ProductManagement/src/Spryker/Zed/ProductManagement/Communication/Form/Product/AttributeAbstractForm.php index f56d32ee313..d69bdeaaab4 100644 --- a/Bundles/ProductManagement/src/Spryker/Zed/ProductManagement/Communication/Form/Product/AttributeAbstractForm.php +++ b/Bundles/ProductManagement/src/Spryker/Zed/ProductManagement/Communication/Form/Product/AttributeAbstractForm.php @@ -207,7 +207,6 @@ protected function addValueField(FormBuilderInterface $builder, array $options = $config['multiple'] = false; $config['placeholder'] = '-'; $config['choices'] = array_flip($this->getChoiceList($name, $attributes[$name], $existingValue, $idLocale)); - $config['choices_as_values'] = true; if ($allowInput) { $config['attr']['tags'] = true; diff --git a/Bundles/ProductManagement/src/Spryker/Zed/ProductManagement/Communication/Form/ProductFormAdd.php b/Bundles/ProductManagement/src/Spryker/Zed/ProductManagement/Communication/Form/ProductFormAdd.php index fca8193622d..1ae8d41ae79 100644 --- a/Bundles/ProductManagement/src/Spryker/Zed/ProductManagement/Communication/Form/ProductFormAdd.php +++ b/Bundles/ProductManagement/src/Spryker/Zed/ProductManagement/Communication/Form/ProductFormAdd.php @@ -536,7 +536,6 @@ protected function addTaxRateField(FormBuilderInterface $builder, array $options 'label' => 'Tax Set', 'required' => true, 'choices' => array_flip($options[static::OPTION_TAX_RATES]), - 'choices_as_values' => true, 'placeholder' => '-', 'constraints' => [ new NotBlank(), diff --git a/Bundles/ProductOption/src/Spryker/Zed/ProductOption/Communication/Form/ProductOptionGroupForm.php b/Bundles/ProductOption/src/Spryker/Zed/ProductOption/Communication/Form/ProductOptionGroupForm.php index 69196cfefc8..72964d015a8 100644 --- a/Bundles/ProductOption/src/Spryker/Zed/ProductOption/Communication/Form/ProductOptionGroupForm.php +++ b/Bundles/ProductOption/src/Spryker/Zed/ProductOption/Communication/Form/ProductOptionGroupForm.php @@ -186,7 +186,6 @@ protected function addTaxSetField(FormBuilderInterface $builder, array $options [ 'label' => 'Tax set', 'choices' => array_flip($options[self::OPTION_TAX_SETS]), - 'choices_as_values' => true, ] ); diff --git a/Bundles/ProductRelation/src/Spryker/Zed/ProductRelation/Communication/Form/ProductRelationFormType.php b/Bundles/ProductRelation/src/Spryker/Zed/ProductRelation/Communication/Form/ProductRelationFormType.php index b5cbb943635..c920c0dc5fe 100644 --- a/Bundles/ProductRelation/src/Spryker/Zed/ProductRelation/Communication/Form/ProductRelationFormType.php +++ b/Bundles/ProductRelation/src/Spryker/Zed/ProductRelation/Communication/Form/ProductRelationFormType.php @@ -123,7 +123,6 @@ protected function addRelationTypeField(FormBuilderInterface $builder, array $op 'label' => 'Relation type', 'property_path' => ProductRelationTransfer::PRODUCT_RELATION_TYPE . '.' . ProductRelationTypeTransfer::KEY, 'choices' => array_flip($options[static::OPTION_RELATION_CHOICES]), - 'choices_as_values' => true, ]); return $this; diff --git a/Bundles/ProductSearch/src/Spryker/Zed/ProductSearch/Communication/Form/FilterPreferencesForm.php b/Bundles/ProductSearch/src/Spryker/Zed/ProductSearch/Communication/Form/FilterPreferencesForm.php index ab6bfeab5d6..bb722589c01 100644 --- a/Bundles/ProductSearch/src/Spryker/Zed/ProductSearch/Communication/Form/FilterPreferencesForm.php +++ b/Bundles/ProductSearch/src/Spryker/Zed/ProductSearch/Communication/Form/FilterPreferencesForm.php @@ -133,7 +133,6 @@ protected function addInputTypeField(FormBuilderInterface $builder, array $optio $builder->add(self::FIELD_FILTER_TYPE, ChoiceType::class, [ 'label' => 'Filter type', 'choices' => array_flip($options[self::OPTION_FILTER_TYPE_CHOICES]), - 'choices_as_values' => true, 'constraints' => [ new NotBlank(), ], diff --git a/Bundles/ProductSearch/src/Spryker/Zed/ProductSearch/Communication/Form/SearchPreferencesForm.php b/Bundles/ProductSearch/src/Spryker/Zed/ProductSearch/Communication/Form/SearchPreferencesForm.php index c5a9ae909d2..d88cae047c9 100644 --- a/Bundles/ProductSearch/src/Spryker/Zed/ProductSearch/Communication/Form/SearchPreferencesForm.php +++ b/Bundles/ProductSearch/src/Spryker/Zed/ProductSearch/Communication/Form/SearchPreferencesForm.php @@ -115,7 +115,6 @@ protected function addFullTextField(FormBuilderInterface $builder) { $builder->add(self::FIELD_FULL_TEXT, ChoiceType::class, [ 'choices' => array_flip($this->getYesNoChoices()), - 'choices_as_values' => true, ]); $this->addBoolModelTransformer($builder, self::FIELD_FULL_TEXT); @@ -132,7 +131,6 @@ protected function addFullTextBoostedField(FormBuilderInterface $builder) { $builder->add(self::FIELD_FULL_TEXT_BOOSTED, ChoiceType::class, [ 'choices' => array_flip($this->getYesNoChoices()), - 'choices_as_values' => true, ]); $this->addBoolModelTransformer($builder, self::FIELD_FULL_TEXT_BOOSTED); @@ -149,7 +147,6 @@ protected function addSuggestionTermsField(FormBuilderInterface $builder) { $builder->add(self::FIELD_SUGGESTION_TERMS, ChoiceType::class, [ 'choices' => array_flip($this->getYesNoChoices()), - 'choices_as_values' => true, ]); $this->addBoolModelTransformer($builder, self::FIELD_SUGGESTION_TERMS); @@ -166,7 +163,6 @@ protected function addCompletionTermsField(FormBuilderInterface $builder) { $builder->add(self::FIELD_COMPLETION_TERMS, ChoiceType::class, [ 'choices' => array_flip($this->getYesNoChoices()), - 'choices_as_values' => true, ]); $this->addBoolModelTransformer($builder, self::FIELD_COMPLETION_TERMS); diff --git a/Bundles/Sales/phpstan.neon b/Bundles/Sales/phpstan.neon index 5323022bb01..c46fe11b9e4 100644 --- a/Bundles/Sales/phpstan.neon +++ b/Bundles/Sales/phpstan.neon @@ -1,7 +1,5 @@ parameters: ignoreErrors: - - '#Parameter \$resolver of method [a-zA-Z0-9\\]+::setDefaultOptions\(\) has invalid typehint type Symfony\\Component\\OptionsResolver\\OptionsResolverInterface#' - - '#Parameter \#1 \$resolver of method .+Form::configureOptions\(\) expects .+OptionsResolver, Symfony\\Component\\OptionsResolver\\OptionsResolverInterface given#' - '#Parameter \#1 \$v of method .+SpyOmsOrderItemStateHistory::setOrderItem\(\) expects .+SpySalesOrderItem|null, \$this\(Spryker\\Zed\\Sales\\Persistence\\Propel\\AbstractSpySalesOrderItem\) given#' - '#Call to an undefined static method Orm\\Zed\\Sales\\Persistence\\Base\\SpySalesOrder::getFkCustomer\(\)\.#' - '#Call to an undefined static method Orm\\Zed\\Sales\\Persistence\\Base\\SpySalesOrderQuery::filterByFkCustomer\(\)\.#' diff --git a/Bundles/Sales/src/Spryker/Zed/Sales/Communication/Form/AddressForm.php b/Bundles/Sales/src/Spryker/Zed/Sales/Communication/Form/AddressForm.php index 4b218f69dea..76fd4c7dc27 100644 --- a/Bundles/Sales/src/Spryker/Zed/Sales/Communication/Form/AddressForm.php +++ b/Bundles/Sales/src/Spryker/Zed/Sales/Communication/Form/AddressForm.php @@ -13,7 +13,6 @@ use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; use Symfony\Component\Validator\Constraints\Email; use Symfony\Component\Validator\Constraints\NotBlank; @@ -78,11 +77,11 @@ public function configureOptions(OptionsResolver $resolver) /** * @deprecated Use `configureOptions()` instead. * - * @param \Symfony\Component\OptionsResolver\OptionsResolverInterface $resolver + * @param \Symfony\Component\OptionsResolver\OptionsResolver $resolver * * @return void */ - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function setDefaultOptions(OptionsResolver $resolver) { $this->configureOptions($resolver); } @@ -126,7 +125,6 @@ protected function addSalutationField(FormBuilderInterface $builder, array $choi 'label' => 'Salutation', 'placeholder' => '-select-', 'choices' => array_flip($choices), - 'choices_as_values' => true, 'required' => false, ]); @@ -210,7 +208,6 @@ protected function addCountryField(FormBuilderInterface $builder, array $choices 'label' => 'Country', 'placeholder' => '-select-', 'choices' => array_flip($choices), - 'choices_as_values' => true, 'constraints' => [ new NotBlank(), ], diff --git a/Bundles/Sales/src/Spryker/Zed/Sales/Communication/Form/CustomerForm.php b/Bundles/Sales/src/Spryker/Zed/Sales/Communication/Form/CustomerForm.php index 267ac289e43..0062ba79fe8 100644 --- a/Bundles/Sales/src/Spryker/Zed/Sales/Communication/Form/CustomerForm.php +++ b/Bundles/Sales/src/Spryker/Zed/Sales/Communication/Form/CustomerForm.php @@ -12,7 +12,6 @@ use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; use Symfony\Component\Validator\Constraints\NotBlank; /** @@ -62,11 +61,11 @@ public function configureOptions(OptionsResolver $resolver) /** * @deprecated Use `configureOptions()` instead. * - * @param \Symfony\Component\OptionsResolver\OptionsResolverInterface $resolver + * @param \Symfony\Component\OptionsResolver\OptionsResolver $resolver * * @return void */ - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function setDefaultOptions(OptionsResolver $resolver) { $this->configureOptions($resolver); } @@ -99,7 +98,6 @@ public function addSalutationField(FormBuilderInterface $builder, array $choices 'label' => 'Salutation', 'placeholder' => '-select-', 'choices' => array_flip($choices), - 'choices_as_values' => true, ]); return $this; diff --git a/Bundles/SalesOrderThresholdGui/src/Spryker/Zed/SalesOrderThresholdGui/Communication/Form/GlobalThresholdType.php b/Bundles/SalesOrderThresholdGui/src/Spryker/Zed/SalesOrderThresholdGui/Communication/Form/GlobalThresholdType.php index c4792e7d732..fa9366373cd 100644 --- a/Bundles/SalesOrderThresholdGui/src/Spryker/Zed/SalesOrderThresholdGui/Communication/Form/GlobalThresholdType.php +++ b/Bundles/SalesOrderThresholdGui/src/Spryker/Zed/SalesOrderThresholdGui/Communication/Form/GlobalThresholdType.php @@ -90,7 +90,6 @@ protected function addStoreCurrencyField(FormBuilderInterface $builder, array $o $builder->add(static::FIELD_STORE_CURRENCY, Select2ComboBoxType::class, [ 'label' => 'Store and Currency', 'choices' => $options[static::OPTION_STORE_CURRENCY_ARRAY], - 'choices_as_values' => true, 'placeholder' => false, 'multiple' => false, 'required' => true, diff --git a/Bundles/Shipment/src/Spryker/Zed/Shipment/Communication/Form/MethodForm.php b/Bundles/Shipment/src/Spryker/Zed/Shipment/Communication/Form/MethodForm.php index 2eb94ebbac1..65ec2480cc6 100644 --- a/Bundles/Shipment/src/Spryker/Zed/Shipment/Communication/Form/MethodForm.php +++ b/Bundles/Shipment/src/Spryker/Zed/Shipment/Communication/Form/MethodForm.php @@ -112,7 +112,6 @@ protected function addCarrierField(FormBuilderInterface $builder, array $options 'label' => 'Carrier', 'placeholder' => 'Select one', 'choices' => array_flip($options[self::OPTION_CARRIER_CHOICES]), - 'choices_as_values' => true, 'constraints' => [ new NotBlank(), new Required(), @@ -171,7 +170,6 @@ protected function addAvailabilityPluginField(FormBuilderInterface $builder, arr 'label' => 'Availability Plugin', 'placeholder' => 'Select one', 'choices' => array_flip($options[self::OPTION_AVAILABILITY_PLUGIN_CHOICE_LIST]), - 'choices_as_values' => true, 'required' => false, ]); @@ -190,7 +188,6 @@ protected function addPricePluginField(FormBuilderInterface $builder, array $opt 'label' => 'Price Plugin', 'placeholder' => 'Select one', 'choices' => array_flip($options[self::OPTION_PRICE_PLUGIN_CHOICE_LIST]), - 'choices_as_values' => true, 'required' => false, ]); @@ -209,7 +206,6 @@ protected function addDeliveryTimePluginField(FormBuilderInterface $builder, arr 'label' => 'Delivery Time Plugin', 'placeholder' => 'Select one', 'choices' => array_flip($options[self::OPTION_DELIVERY_TIME_PLUGIN_CHOICE_LIST]), - 'choices_as_values' => true, 'required' => false, ]); @@ -256,7 +252,6 @@ protected function addTaxSetField(FormBuilderInterface $builder, array $options) [ 'label' => 'Tax set', 'choices' => array_flip($options[self::OPTION_TAX_SETS]), - 'choices_as_values' => true, ] ); diff --git a/Bundles/Store/src/Spryker/Zed/Store/Communication/Form/Type/StoreRelationToggleType.php b/Bundles/Store/src/Spryker/Zed/Store/Communication/Form/Type/StoreRelationToggleType.php index feba167e4ec..fdace5df228 100644 --- a/Bundles/Store/src/Spryker/Zed/Store/Communication/Form/Type/StoreRelationToggleType.php +++ b/Bundles/Store/src/Spryker/Zed/Store/Communication/Form/Type/StoreRelationToggleType.php @@ -124,7 +124,6 @@ protected function addFieldEditableIdStores(FormBuilderInterface $builder) 'expanded' => true, 'multiple' => true, 'choices' => array_flip($this->getStoreNameMap()), - 'choices_as_values' => true, ] ); @@ -150,7 +149,6 @@ protected function addFieldImmutableIdStores(FormBuilderInterface $builder) 'property_path' => static::FIELD_ID_STORES, 'multiple' => true, 'choices' => array_flip($this->getStoreNameMap()), - 'choices_as_values' => true, ] ); diff --git a/Bundles/Symfony/composer.json b/Bundles/Symfony/composer.json index 9b5ba769dd5..c74d1b889ae 100644 --- a/Bundles/Symfony/composer.json +++ b/Bundles/Symfony/composer.json @@ -10,7 +10,7 @@ "symfony/debug": "^3.0.0 || ^4.0.0", "symfony/filesystem": "^3.0.0 || ^4.0.0", "symfony/finder": "^3.0.0 || ^4.0.0", - "symfony/form": "^3.0.0", + "symfony/form": "^3.0.0 || ^4.0.0", "symfony/http-kernel": "^3.0.0", "symfony/intl": "^3.0.0 || ^4.0.0", "symfony/options-resolver": "^3.0.0 || ^4.0.0", diff --git a/Bundles/Symfony/phpstan.neon b/Bundles/Symfony/phpstan.neon index 9532ef6abb3..9631d44c608 100644 --- a/Bundles/Symfony/phpstan.neon +++ b/Bundles/Symfony/phpstan.neon @@ -1,4 +1 @@ parameters: - ignoreErrors: - - '#.+ has invalid typehint type Symfony\\Component\\OptionsResolver\\OptionsResolverInterface.#' - - '#Parameter \#1 \$resolver of method .+FormType::configureOptions\(\) expects .+OptionsResolver, Symfony\\Component\\OptionsResolver\\OptionsResolverInterface given#' diff --git a/Bundles/Symfony/src/Spryker/Shared/Symfony/Form/Extension/DoubleSubmitProtection/Type/DoubleSubmitFormType.php b/Bundles/Symfony/src/Spryker/Shared/Symfony/Form/Extension/DoubleSubmitProtection/Type/DoubleSubmitFormType.php index c0cd1e91d0d..ec2b83439ee 100644 --- a/Bundles/Symfony/src/Spryker/Shared/Symfony/Form/Extension/DoubleSubmitProtection/Type/DoubleSubmitFormType.php +++ b/Bundles/Symfony/src/Spryker/Shared/Symfony/Form/Extension/DoubleSubmitProtection/Type/DoubleSubmitFormType.php @@ -17,7 +17,6 @@ use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormView; use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; use Symfony\Component\Translation\TranslatorInterface; class DoubleSubmitFormType extends AbstractTypeExtension @@ -135,11 +134,11 @@ public function configureOptions(OptionsResolver $resolver) /** * @deprecated Use `configureOptions()` instead. * - * @param \Symfony\Component\OptionsResolver\OptionsResolverInterface $resolver + * @param \Symfony\Component\OptionsResolver\OptionsResolver $resolver * * @return void */ - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function setDefaultOptions(OptionsResolver $resolver) { $this->configureOptions($resolver); } diff --git a/Bundles/Tax/src/Spryker/Zed/Tax/Communication/Form/TaxRateForm.php b/Bundles/Tax/src/Spryker/Zed/Tax/Communication/Form/TaxRateForm.php index d9a71f9190e..cadb7df78ca 100644 --- a/Bundles/Tax/src/Spryker/Zed/Tax/Communication/Form/TaxRateForm.php +++ b/Bundles/Tax/src/Spryker/Zed/Tax/Communication/Form/TaxRateForm.php @@ -76,7 +76,6 @@ protected function addCountry(FormBuilderInterface $builder) 'multiple' => false, 'label' => 'Country', 'choices' => array_flip($this->getFactory()->createTaxRateFormDataProvider()->getOptions()[self::FIELD_COUNTRY]), - 'choices_as_values' => true, 'constraints' => [ new GreaterThan([ 'value' => 0, diff --git a/Bundles/Tax/src/Spryker/Zed/Tax/Communication/Form/TaxSetForm.php b/Bundles/Tax/src/Spryker/Zed/Tax/Communication/Form/TaxSetForm.php index daaeab72bf2..12f4fb25ad8 100644 --- a/Bundles/Tax/src/Spryker/Zed/Tax/Communication/Form/TaxSetForm.php +++ b/Bundles/Tax/src/Spryker/Zed/Tax/Communication/Form/TaxSetForm.php @@ -79,7 +79,6 @@ protected function addTaxRates(FormBuilderInterface $builder) 'expanded' => true, 'multiple' => true, 'label' => 'Tax rates', - 'choices_as_values' => true, 'choices' => $this->getFactory()->createTaxSetFormDataProvider()->getOptions()[self::FIELD_TAX_RATES], 'choice_label' => 'name', 'choice_value' => 'idTaxRate', diff --git a/Bundles/User/src/Spryker/Zed/User/Communication/Form/UserForm.php b/Bundles/User/src/Spryker/Zed/User/Communication/Form/UserForm.php index d9b5966f209..9aaa3032a31 100644 --- a/Bundles/User/src/Spryker/Zed/User/Communication/Form/UserForm.php +++ b/Bundles/User/src/Spryker/Zed/User/Communication/Form/UserForm.php @@ -226,7 +226,6 @@ protected function addGroupField(FormBuilderInterface $builder, array $choices) 'multiple' => true, 'expanded' => true, 'choices' => array_flip($choices), - 'choices_as_values' => true, ]); return $this; diff --git a/Bundles/User/src/Spryker/Zed/User/Communication/Form/UserUpdateForm.php b/Bundles/User/src/Spryker/Zed/User/Communication/Form/UserUpdateForm.php index dbad757e97c..9b6481558d2 100644 --- a/Bundles/User/src/Spryker/Zed/User/Communication/Form/UserUpdateForm.php +++ b/Bundles/User/src/Spryker/Zed/User/Communication/Form/UserUpdateForm.php @@ -52,7 +52,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) $builder->add(self::FIELD_STATUS, ChoiceType::class, [ 'choices' => array_flip($options[self::OPTION_STATUS_CHOICES]), - 'choices_as_values' => true, ]); }