- Issue created by @dineshkumarbollu
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 8:54am 5 July 2023 - Open on Drupal.org →Core: 10.0.7 + Environment: PHP 8.1 & MariaDB 10.3.22last update
over 1 year ago Waiting for branch to pass - Assigned to MacSim
- Status changed to Needs work
over 1 year ago 8:38pm 5 July 2023 - 🇫🇷France MacSim
Hi @dineshkumarbollu
First of all, thanks for opening this issue.
I was wondering if I should have opened a RC release and finally decided to go straight to a 2.0.0 version.
Pretty bad move since I forgot to run PHPCS and PHPUnit before to do it... 😅Tests have been fixed this afternoon now let's talk about PHPCS:
I won't fix the following warnings:
FILE: /var/www/html/vb9/web/modules/contrib/index_now/src/Service/IndexNow.php ------------------------------------------------------------------------------ FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES ------------------------------------------------------------------------------ 99 | WARNING | Only string literals should be passed to t() where possible 107 | WARNING | Only string literals should be passed to t() where possible ------------------------------------------------------------------------------
Because:
- I don't want to duplicate the message in the code,
- I want the message to be translated when displayed to the user but I want it in english in the logs to keep the debug easier (we can search and find the error message in english in the code ; if it is translated in the logs we won't find it in the code)
FILE: /var/www/html/vb9/web/modules/contrib/index_now/src/Form/ModuleSettingsForm.php ------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES ------------------------------------------------------------------------------------- 248 | WARNING | #options values usually have to run through t() for translation 249 | WARNING | #options values usually have to run through t() for translation 250 | WARNING | #options values usually have to run through t() for translation 251 | WARNING | #options values usually have to run through t() for translation -------------------------------------------------------------------------------------
Because those strings represent trademarks and there's no need to translate a trademark.
But I am adding to your list some other standards reported by my own PHPCS that need to be fixed as well:
FILE: /var/www/arvalis/web/modules/contrib/index_now/index_now.module ---------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------------------------------------- 11 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\index_now\NodeOperations. ---------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------------------------------------- FILE: /var/www/arvalis/web/modules/contrib/index_now/tests/src/Unit/NodeOperationsTest.php ---------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------------------------------------- 12 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Tests\UnitTestCase. ---------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------------------------------------- FILE: /var/www/arvalis/web/modules/contrib/index_now/tests/src/Unit/TermOperationsTest.php ---------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------------------------------------- 9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\index_now\Service\IndexNowInterface. ---------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------------------------------------
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 7:33am 6 July 2023 - last update
over 1 year ago 14 pass - thakurnishant_06 India
Hello @MacSim,
Hope you are doing well,
Created a patch for index_now version 2.0.x-dev . Updated all the changes mentioned in #3. The patch seems to fix the errors and warnings.Kindly review the patch.
Thank you. -
thakurnishant_06 →
authored 82c40f42 on 2.0.x
Issue #3372448 by dineshkumarbollu, thakurnishant_06, MacSim: Fix the...
-
thakurnishant_06 →
authored 82c40f42 on 2.0.x
- Status changed to Fixed
over 1 year ago 12:58pm 6 July 2023 - 🇫🇷France MacSim
Thanks to both you.
Last patch has been merged to 2.0.x and will be part of the next release
Automatically closed - issue fixed for 2 weeks with no activity.