- Issue created by @Binoli Lalani
- First commit to issue fork.
- Merge request !4Issue #3355042: Fix the issues reported by phpcs โ (Open) created by Binoli Lalani
- last update
almost 2 years ago 8 pass - Issue was unassigned.
- Status changed to Needs review
almost 2 years ago 8:18am 19 April 2023 - ๐ฎ๐ณIndia Binoli Lalani Gujarat
- ๐ฎ๐ณIndia dineshkumarbollu
Hi
MR!4 has still some issues.
vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig web/modules/contrib/contact_storage-3355042/
FILE: /var/www/html/drupalvb/web/modules/contrib/contact_storage-3355042/src/Form/ContactStorageSettingsForm.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
38 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
39 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------FILE: /var/www/html/drupalvb/web/modules/contrib/contact_storage-3355042/src/Form/ContactFormDisableForm.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
49 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
50 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------FILE: /var/www/html/drupalvb/web/modules/contrib/contact_storage-3355042/src/EventSubscriber/ContactStorageSettingsFormSave.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------
22 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-------------------------------------------------------------------------------------------------------------------------------FILE: /var/www/html/drupalvb/web/modules/contrib/contact_storage-3355042/src/ContactFormViewBuilder.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------
104 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------FILE: /var/www/html/drupalvb/web/modules/contrib/contact_storage-3355042/tests/src/Functional/ContactStorageTestBase.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
43 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
68 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
72 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------FILE: /var/www/html/drupalvb/web/modules/contrib/contact_storage-3355042/tests/src/Functional/BulkFormTest.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
78 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------FILE: /var/www/html/drupalvb/web/modules/contrib/contact_storage-3355042/tests/src/Functional/ContactStorageTest.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 23 WARNINGS AFFECTING 23 LINES
------------------------------------------------------------------------------------------------------------------------------------------
104 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
129 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
175 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
182 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
188 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
192 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
193 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
194 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
209 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
218 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
241 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
271 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
283 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
308 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
322 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
331 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
423 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
426 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
454 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
468 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
485 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
496 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
515 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------FILE: /var/www/html/drupalvb/web/modules/contrib/contact_storage-3355042/tests/src/Functional/ContactViewBuilderTest.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------
130 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------FILE: /var/www/html/drupalvb/web/modules/contrib/contact_storage-3355042/tests/src/Functional/ContactStoragePersonalTest.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------------------------
101 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
140 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------FILE: /var/www/html/drupalvb/web/modules/contrib/contact_storage-3355042/contact_storage.module
-----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------
419 | WARNING | Unused variable $delta.
432 | WARNING | Unused variable $reply. - Status changed to Needs work
almost 2 years ago 8:35am 19 April 2023 - Status changed to Needs review
almost 2 years ago 9:37am 19 April 2023 - ๐ฎ๐ณIndia Binoli Lalani Gujarat
Hello @dineshkumarbollu,
Thank you for reviewing the MR. Which issues are you facing? Can you please elaborate more? because It seems all errors and warnings have been addressed in my local.
Thank you!
- ๐ฎ๐ณIndia dineshkumarbollu
After I checkout into "3355042-fix-the-issues" branch in my local i getting errors.
vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig web/modules/contrib/contact_storage-3355042/
FILE: /var/www/html/drupalvb/web/modules/contrib/contact_storage-3355042/src/Form/ContactStorageSettingsForm.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
38 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
39 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------FILE: /var/www/html/drupalvb/web/modules/contrib/contact_storage-3355042/src/Form/ContactFormDisableForm.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
49 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
50 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------FILE: /var/www/html/drupalvb/web/modules/contrib/contact_storage-3355042/src/EventSubscriber/ContactStorageSettingsFormSave.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------
22 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-------------------------------------------------------------------------------------------------------------------------------FILE: /var/www/html/drupalvb/web/modules/contrib/contact_storage-3355042/src/ContactFormViewBuilder.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------
104 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------FILE: /var/www/html/drupalvb/web/modules/contrib/contact_storage-3355042/tests/src/Functional/ContactStorageTestBase.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
43 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
68 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
72 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead - last update
almost 2 years ago 2 pass, 6 fail - ๐ฎ๐ณIndia chanderbhushan
Hi, I have applied patch for fix issues.
The last submitted patch, 9: phpcs-3355042-9.patch, failed testing. View results โ
- last update
almost 2 years ago 2 pass, 6 fail The last submitted patch, 11: phpcs-3355042-10.patch, failed testing. View results โ
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.- last update
almost 2 years ago 10 fail The last submitted patch, 13: phpcs-issue-fixes-3355042-13.patch, failed testing. View results โ
- last update
almost 2 years ago 8 pass - ๐ฎ๐ณIndia Binoli Lalani Gujarat
Hello,
There is already created issue ๐ t() calls should be avoided in classes RTBC for t() calls so I think we need to reopen that issue.
I have fixed other warnings in MR.
Thank you!
- ๐ท๐บRussia zniki.ru
zniki.ru โ made their first commit to this issueโs fork.
- last update
over 1 year ago 8 pass - Status changed to Needs work
over 1 year ago 3:36pm 23 November 2023 - ๐ท๐บRussia zniki.ru
Thanks a lot for your contribution.
Please check my comments.
And right now we have phpcs report in the pipeline, as you can see there are 5 more errors, that can be fixed with phpcbf. - Assigned to nitin_lama
- last update
over 1 year ago 8 pass - Issue was unassigned.
Shruthi rao โ made their first commit to this issueโs fork.
- last update
over 1 year ago 8 pass - ๐ท๐บRussia zniki.ru
@Shruthi rao thanks for your changes.
As mentioned at #15 there is an issue ๐ t() calls should be avoided in classes RTBC , let's not make changes to t() functions in this issue.
I suggest to revert commit 30d4afc
Please check MR discussion, there are several open threads waiting for changes.
- last update
about 1 year ago 8 pass Hi @Nikolay Shapovalov, as per your suggestion i have reverted the commit 30d4afc.
Thank you- Status changed to Needs review
11 months ago 12:27pm 23 May 2024 - last update
11 months ago 10 fail The last submitted patch, 25: contact_storage-3355042-25.patch, failed testing. View results โ
- ๐ท๐บRussia zniki.ru
@silvi.addweb please use MR approach instead of patch. [#3344225]
- ๐ฎ๐ณIndia kulpratap2002
Now Iโve fixed the PHPCS issues, and all tests have passed successfully. @nikolay shapovalov Please review.
Hi @kul.pratap,
I have checked the pipeline and re-ran the phpcs job, confirmed it succeeded.
Will now move this to RTBC.
Thanks,
Jake- ๐ท๐บRussia zniki.ru
As mentioned by @Berdir at https://www.drupal.org/project/entity_reference_revisions/issues/3128194... ๐ Fix the issues reported by phpcs Needs review
He prefer to use same rules as we have at Drupal core, so let's fix only there.IS updated, added list of violations.
- ๐ฎ๐ณIndia kulpratap2002
@nikolay shapovalov if i revert the changes you had mentioned in the MR, then it leads to fail the phpcs tests.
- ๐ท๐บRussia zniki.ru
@kul.pratap it's okay to keep some code style issues, and change them latter in follow up issue.
- ๐ฎ๐ณIndia kulpratap2002
"@nikolay shapovalov, I have resolved all the issues, and the pipeline has successfully passed.
Kindly review it.
Thank you!" - Status changed to Needs review
29 days ago 9:45am 8 March 2025 - First commit to issue fork.
- ๐ฆ๐นAustria klausi ๐ฆ๐น Vienna
I fixed the comments in the pull request, please review.
Uploading stable patch file for composer patches.
- ๐บ๐ฆUkraine andriy khomych
Thanks Klausi.
Looks good to me and solves this issue.
However, we have failed pipelines (one is PHPCS more issues, and another is PHPStan more issues).
I think they can be done in follow-ups.
It has been moved to RTBC. - ๐ฆ๐นAustria klausi ๐ฆ๐น Vienna
Thanks - I think we should only do the PHPCS fixes here, to not make the merge request even bigger with out of scope changes.
PHPStan: ๐ Fix the issues reported by phpcs Needs review