Issue fork pathauto-3124089

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

Neslee Canil Pinto created an issue. See original summary.

neslee canil pinto’s picture

Status: Active » Needs review
StatusFileSize
new34.91 KB
pobster’s picture

Status: Needs review » Reviewed & tested by the community

LGTM

pobster’s picture

Status: Reviewed & tested by the community » Needs work

Needs tweaking as PathautoTestHelperTrait trait already brings in StringTranslationTrait (and hence there's a clash).

ayush.khare’s picture

Status: Needs work » Needs review
StatusFileSize
new30.07 KB
new57.04 KB

Created re-roll as #2 patch doesn't apply
Resolved some phpcs issues.
And removed use of StringTranslationTrait where PathautoTestHelperTrait is already used in the patch.

meeni_dhobale’s picture

Assigned: Unassigned » meeni_dhobale

Will review patch mentioned in #5

meeni_dhobale’s picture

Status: Needs review » Reviewed & tested by the community

I reviewed patch 3124089-5.patch mentioned in #5. All StringTranslationTrait are removed from the code files where PathautoTestHelperTrait trait is already used. Other coding standard issues are remaining in codebase but it can be solved in another separate issue. This issue can be move to RTBC. Moving to RTBC.

berdir’s picture

Assigned: meeni_dhobale » Unassigned
Status: Reviewed & tested by the community » Needs work

There are about 3 actual changes in PathautoTestHelperTrait that shouldn't use t() at all but just string concentation or something. Anything else is unrelated generated coding standards and addition of traits that already exist through the class hierarchy.

  1. +++ b/src/Form/PatternEditForm.php
    @@ -9,12 +9,15 @@ use Drupal\Core\Form\FormStateInterface;
      */
     class PatternEditForm extends EntityForm {
     
    +  use StringTranslationTrait;
    +
    

    EntityForm extends FormBase which has the trait already.

  2. +++ b/src/Form/PatternEditForm.php
    @@ -110,7 +113,7 @@ class PatternEditForm extends EntityForm {
     
    -    // if there is no type yet, stop here.
    +    // If there is no type yet, stop here.
         if ($this->entity->getType()) {
     
           $alias_type = $this->entity->getAliasType();
    @@ -121,7 +124,10 @@ class PatternEditForm extends EntityForm {
    
    @@ -121,7 +124,10 @@ class PatternEditForm extends EntityForm {
             '#default_value' => $this->entity->getPattern(),
             '#size' => 65,
             '#maxlength' => 1280,
    -        '#element_validate' => ['token_element_validate', 'pathauto_pattern_validate'],
    +        '#element_validate' => [
    +          'token_element_validate',
    +          'pathauto_pattern_validate',
    +        ],
    

    lots of unrelated changes in this file.

  3. +++ b/src/PathautoPatternListBuilder.php
    @@ -4,12 +4,15 @@ namespace Drupal\pathauto;
      * Provides a listing of Pathauto pattern entities.
      */
     class PathautoPatternListBuilder extends DraggableListBuilder {
     
    +  use StringTranslationTrait;
    +
    

    this already exists too.

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

mably’s picture

Status: Needs work » Needs review

  • mably committed 96370ac0 on 8.x-1.x
    task: #3124089 t() calls should be avoided in classes
    
    By: pobster
    By:...
mably’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

pobster’s picture

SIX YEARS