From 19965bc8ad36517d78364eaed35388586baa0bc4 Mon Sep 17 00:00:00 2001 From: jkindly Date: Wed, 9 Oct 2024 09:05:04 +0200 Subject: [PATCH] OP-558: Coding standard --- .github/workflows/build.yml | 2 +- .github/workflows/coding_standard.yml | 2 +- ...AutomaticBlacklistingConfigurationType.php | 9 ------ src/Resources/config/services/form.xml | 1 - src/Resources/views/Form/theme.html.twig | 28 ------------------- 5 files changed, 2 insertions(+), 40 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 32137db..3c61b07 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: fail-fast: false matrix: php: [ "8.2", "8.3" ] - symfony: [ "^6.4", "^7.1" ] + symfony: [ "^6.4" ] sylius: [ "~v2.0.0-alpha.2" ] node: [ "20.x" ] mysql: ["8.0"] diff --git a/.github/workflows/coding_standard.yml b/.github/workflows/coding_standard.yml index 2f3b564..9066cde 100644 --- a/.github/workflows/coding_standard.yml +++ b/.github/workflows/coding_standard.yml @@ -19,7 +19,7 @@ jobs: fail-fast: false matrix: php: [ "8.2", "8.3" ] - symfony: [ "^6.4", "^7.1" ] + symfony: [ "^6.4" ] sylius: [ "~v2.0.0-alpha.2" ] node: [ "20.x" ] diff --git a/src/Form/Type/AutomaticBlacklistingConfigurationType.php b/src/Form/Type/AutomaticBlacklistingConfigurationType.php index 3b8095a..b4b6279 100644 --- a/src/Form/Type/AutomaticBlacklistingConfigurationType.php +++ b/src/Form/Type/AutomaticBlacklistingConfigurationType.php @@ -25,17 +25,12 @@ final class AutomaticBlacklistingConfigurationType extends AbstractResourceType { - /** @var array */ - private $attributeChoices; - public function __construct( private array $rules, string $dataClass, - array $attributeChoices, array $validationGroups = [], ) { parent::__construct($dataClass, $validationGroups); - $this->attributeChoices = $attributeChoices; } public function buildForm(FormBuilderInterface $builder, array $options): void @@ -75,10 +70,6 @@ public function buildForm(FormBuilderInterface $builder, array $options): void ], 'placeholder' => 'bitbag_sylius_blacklist_plugin.ui.choose_time_range', ]) -// ->add('rules', AutomaticBlacklistingRuleCollectionType::class, [ -// 'label' => 'bitbag_sylius_blacklist_plugin.form.automatic_blacklisting_rule.rules', -// 'button_add_label' => 'sylius.form.promotion.add_rule', -// ]) ->add('rules', LiveCollectionType::class, [ 'entry_type' => AutomaticBlacklistingRuleType::class, 'allow_add' => true, diff --git a/src/Resources/config/services/form.xml b/src/Resources/config/services/form.xml index 0337872..bed1f8a 100644 --- a/src/Resources/config/services/form.xml +++ b/src/Resources/config/services/form.xml @@ -49,7 +49,6 @@ class="BitBag\SyliusBlacklistPlugin\Form\Type\AutomaticBlacklistingConfigurationType"> %bitbag.sylius_blacklist_plugin.automatic_blacklisting_rules% %bitbag_sylius_blacklist_plugin.model.automatic_blacklisting_configuration.class% - %bitbag.sylius_blacklist_plugin.form.type.automatic_blacklisting_configuration.validation_groups% %bitbag.sylius_blacklist_plugin.form.type.validation_groups% diff --git a/src/Resources/views/Form/theme.html.twig b/src/Resources/views/Form/theme.html.twig index ee5c7d0..783e072 100644 --- a/src/Resources/views/Form/theme.html.twig +++ b/src/Resources/views/Form/theme.html.twig @@ -1,33 +1,5 @@ {% extends '@SyliusAdmin/shared/form_theme.html.twig' %} -{% block bitbag_sylius_customer_autocomplete_choice_row %} -
- {{- form_label(form) -}} - - {{- form_errors(form) -}} -
- -{% endblock %} - -{% block bitbag_sylius_blacklist_plugin_automatic_blacklisting_rule_widget %} -
- {{ block('form_widget') }} -
-{% endblock %} - {%- block bitbag_sylius_blacklist_plugin_automatic_blacklisting_rule_row -%}
{{- form_errors(form) -}}