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
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

pdureau created an issue. See original summary.

pdureau’s picture

Issue summary: View changes
pdureau’s picture

Assigned: pdureau » Unassigned
Status: Active » Needs work
  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?

vendor/bin/phpcs --standard=Drupal --extensions=php,module docroot/modules/custom/ui_patterns
vendor/bin/phpcs --standard=PHPCompatibility --extensions=php,module --runtime-set testVersion 8.3 docroot/modules/custom/ui_patterns
vendor/bin/phpmd docroot/modules/custom/ui_patterns text codesize
vendor/bin/phpmd docroot/modules/custom/ui_patterns text unusedcode
vendor/bin/phpmd docroot/modules/custom/ui_patterns text design
vendor/bin/drupal-check docroot/modules/custom/ui_patterns

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) {

just_like_good_vibes made their first commit to this issue’s fork.

pdureau’s picture

Assigned: Unassigned » just_like_good_vibes

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 {

  }
 
pdureau’s picture

just_like_good_vibes’s picture

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.

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

pdureau’s picture

Thanks, i take the ticket for some linting.

pdureau’s picture

Assigned: pdureau » Unassigned
Status: Needs work » Needs review
pdureau’s picture

pdureau’s picture

Assigned: Unassigned » just_like_good_vibes
Status: Needs review » Needs work

Some PHPSTAN work to do before merge.

just_like_good_vibes’s picture

Status: Needs work » Reviewed & tested by the community

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

just_like_good_vibes’s picture

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:...
pdureau’s picture

Assigned: just_like_good_vibes » Unassigned
Status: Reviewed & tested by the community » Fixed
pdureau’s picture

Status: Fixed » Closed (fixed)
christian.wiedemann’s picture