- Issue created by @jay jangid
- @jay-jangid opened merge request.
- Issue was unassigned.
- Status changed to Needs review
almost 2 years ago 11:21am 7 February 2023 - š®š³India jay jangid Jaipur
Created MR , please review.
Thank you.
- Status changed to Needs work
almost 2 years ago 12:07pm 7 February 2023 - š®š³India mrinalini9 New Delhi
Hi,
I have reviewed MR, it removed all the phpcs errors and warnings but these changes doesn't seems correct to me:
1. For example:
t() calls
, it should be$this->t()
not$this()
here:diff --git a/src/ViewsUiFormService.php b/src/ViewsUiFormService.php - $perms = ['' => t('- None -')]; + $perms = ['' => $this('- None -')];
2. Doc comment short description should explain what the function is actually doing not the function name as it is here:
diff --git a/views_field_permissions.install b/views_field_permissions.install - * Update views configs to guarantee retrocompatibility for the role-based - * permission feature. + * Summary of views_field_permissions_update_8001.
3. For line exceeds 80 characters, break the sentence just once it's reaching 80 characters, not from anywhere. Like here:
diff --git a/views_field_permissions.module b/views_field_permissions.module - // Save the new settings, log the change, and mark the view for update. + // Save the new settings, log the change, + // mark the view for update.
It should be:
+ // Save the new settings, log the change, mark the view for + // update.
Thanks & Regards,
Mrinalini - First commit to issue fork.
- First commit to issue fork.
- Status changed to Needs review
almost 2 years ago 6:41am 14 March 2023 - Status changed to Needs work
over 1 year ago 2:31pm 13 May 2023 - š®š¹Italy apaderno Brescia, š®š¹
I am going to review the MR3. (It is not clear whether MR5 was created to fix something that MR3 did not fix.)
- // Get list of permissions - $perms = ['' => t('- None -')]; + // Get list of permissions. + $perms = ['' => $this->t('- None -')]; $permissions = $this->permissionHandler->getPermissions();
That comment can be removed, since it describes something the code makes already clear.
- // Save the new settings, log the change, and mark the view for update. + // Save the new settings,log the change,and mark the view for + // update.
In English, there must be a space between a comma and the word following it.
- Assigned to nitin_lama
- First commit to issue fork.
- Issue was unassigned.
- š®š¹Italy apaderno Brescia, š®š¹
$form['options']['expose']['views_field_permissions'] = $elements; $form['actions']['submit']['#submit'][] = [get_class($this), 'submit']; + + return $form;
A method that is declared as
public function form(array &$form, FormStateInterface &$form_state)
does not need to return$form
.Also, the report shows errors/warnings for five files, but MR5 just changes a single file.
- Status changed to Needs review
about 1 year ago 11:24am 17 November 2023 - Status changed to Needs work
about 1 year ago 11:43am 17 November 2023 - Assigned to nitin_lama
- Issue was unassigned.
- Status changed to Needs review
about 1 year ago 8:34am 23 November 2023 - Status changed to RTBC
8 months ago 11:59am 30 May 2024 Hi @everyone,
All issues mentioned were fixed after #16's MR!5 commit
drupal-orgissue git:(main) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig views_field_permissions ā drupal-orgissue git:(main) ā
Moving this to RTBC.
Thanks,
Jake- š®š¹Italy apaderno Brescia, š®š¹
apaderno ā changed the visibility of the branch 3339907-drupal-coding-standards to hidden.
- Status changed to Closed: outdated
8 months ago 1:24pm 31 May 2024 - š®š¹Italy apaderno Brescia, š®š¹
These issues has been already fixed in š Automated Drupal 10 compatibility fixes Fixed . GitLab CI does not show any PHP_CodeSniffer warning/error that should be fixed.