[2.0.0-alpha3] Little cleanups

Created on 1 July 2024, 2 months ago
Updated 3 July 2024, 2 months ago

Just a few easy things to have a cleaner alpha3 release:

  • run prettier on YML files
  • run twig linter on Twig files
  • update module descriptions in info files
  • check if all phpunit tests are running
  • fix some PHPCS or PHPMD feedbacks
πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡«πŸ‡·France pdureau Paris

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @pdureau
  • πŸ‡«πŸ‡·France pdureau Paris
  • Issue was unassigned.
  • Status changed to Needs work 2 months ago
  • πŸ‡«πŸ‡·France pdureau Paris
    1. run prettier on YML files >> DONE
    2. run twig linter on Twig files >> DONE
    3. update module descriptions in info files >> DONE
    4. check if all phpunit tests are running
    5. fix some PHPCS or PHPMD feedbacks

    Can you do the rest? Especially PHPMD unused local variables:

    modules/ui_patterns_blocks/src/Plugin/Derivative/EntityComponentBlock.php:17                         UnusedLocalVariable    Avoid unused local variables such as '$component_id'.
    modules/ui_patterns_devel/tests/src/Unit/TwigValidatorRulePluginTest.php:282                         UnusedPrivateMethod    Avoid unused private methods such as 'processNodeWithPrivateFunc'.
    modules/ui_patterns_field_formatters/src/Plugin/Field/FieldFormatter/ComponentFormatterBase.php:292  UnusedLocalVariable    Avoid unused local variables such as '$prop_id'.
    modules/ui_patterns_field_formatters/src/Plugin/Field/FieldFormatter/ComponentFormatterBase.php:299  UnusedLocalVariable    Avoid unused local variables such as '$slots_id'.
    modules/ui_patterns_field_formatters/src/Plugin/Field/FieldFormatter/ComponentFormatterBase.php:303  UnusedLocalVariable    Avoid unused local variables such as '$source_id'.
    modules/ui_patterns_views/src/Plugin/views/row/ComponentRow.php:98                                   UnusedFormalParameter  Avoid unused parameters such as '$form'.
    modules/ui_patterns_views/src/Plugin/views/row/ComponentRow.php:98                                   UnusedFormalParameter  Avoid unused parameters such as '$form_state'.
    modules/ui_patterns_views/src/Plugin/views/style/ComponentStyle.php:108                              UnusedLocalVariable    Avoid unused local variables such as '$delta_group'.
    modules/ui_patterns_views/src/Plugin/views/style/ComponentStyle.php:131                              UnusedLocalVariable    Avoid unused local variables such as '$group_fields'.
    modules/ui_patterns_views/src/Plugin/views/style/ComponentStyle.php:140                              UnusedLocalVariable    Avoid unused local variables such as '$delta_group'.
    modules/ui_patterns_views/src/Plugin/views/style/ComponentStyle.php:208                              UnusedFormalParameter  Avoid unused parameters such as '$form_state'.

    Mosty of them are caused by the combination between key => value loops and reference:

    foreach ($form['grouping'] as $delta_group => &$group) {

  • First commit to issue fork.
  • Pipeline finished with Failed
    2 months ago
    Total: 267s
    #213719
  • πŸ‡«πŸ‡·France pdureau Paris

    thanks.

    Why do we have empty methods in src/Plugin/Derivative/EntityFieldSourceDeriverBase.php :

      /**
       * Get derivative definitions per entity bundle field.
       *
       * @param string $entity_type_id
       *   The entity type id.
       * @param string $bundle
       *   The bundle.
       * @param string $field_name
       *   The field name.
       * @param array $base_plugin_derivative
       *   The base plugin derivative.
       */
      protected function getDerivativeDefinitionsForEntityBundleField(string $entity_type_id, string $bundle, string $field_name, array $base_plugin_derivative): void {
    
      }
    
      /**
       * Get derivative definitions per entity field storage.
       *
       * @param string $entity_type_id
       *   The entity type id.
       * @param string $field_name
       *   The field name.
       * @param array $base_plugin_derivative
       *   The base plugin derivative.
       */
      protected function getDerivativeDefinitionsForEntityStorageField(string $entity_type_id, string $field_name, array $base_plugin_derivative): void {
    
      }
    
      /**
       * Get derivative definitions per entity field storage.
       *
       * @param string $entity_type_id
       *   The entity type id.
       * @param string $field_name
       *   The field name.
       * @param string $property
       *   The property.
       * @param array $base_plugin_derivative
       *   The base plugin derivative.
       */
      protected function getDerivativeDefinitionsForEntityStorageFieldProperty(string $entity_type_id, string $field_name, string $property, array $base_plugin_derivative): void {
    
      }
     
  • πŸ‡«πŸ‡·France pdureau Paris
  • πŸ‡«πŸ‡·France just_like_good_vibes PARIS

    The Empty methods you have pinpointed are the default behavior for plugin derivers that will derive the class. instead of turning all methods abstract and forcing child classes to define an empty method when not used, i have preferred to set an empty method by default and child classes derive and override the implementation they need.

  • πŸ‡©πŸ‡ͺGermany Christian.wiedemann

    Christian.wiedemann β†’ made their first commit to this issue’s fork.

  • Assigned to pdureau
  • πŸ‡«πŸ‡·France pdureau Paris

    Thanks, i take the ticket for some linting.

  • Issue was unassigned.
  • Status changed to Needs review 2 months ago
  • πŸ‡«πŸ‡·France pdureau Paris
  • πŸ‡«πŸ‡·France pdureau Paris
  • Status changed to Needs work 2 months ago
  • πŸ‡«πŸ‡·France pdureau Paris

    Some PHPSTAN work to do before merge.

  • Status changed to RTBC 2 months ago
  • πŸ‡«πŸ‡·France just_like_good_vibes PARIS

    seems ok, i reviewed the changes (without re-tesing the UI)

  • πŸ‡«πŸ‡·France just_like_good_vibes PARIS

    i just did a few UI tests, seems ok

    • pdureau β†’ committed bffa0c4d on 2.0.x
      Issue #3458364 by pdureau, just_like_good_vibes, Christian.wiedemann:...
  • Issue was unassigned.
  • Status changed to Fixed 2 months ago
  • πŸ‡«πŸ‡·France pdureau Paris
  • Status changed to Fixed 2 months ago
  • πŸ‡«πŸ‡·France pdureau Paris
Production build 0.71.5 2024