- Issue created by @arti_parmar
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 12:23pm 15 June 2023 - Status changed to Needs work
over 1 year ago 5:10pm 15 June 2023 - 🇵ðŸ‡Philippines kenyoOwen
Hi arti_parmar
After I applied your patch that also has errors, there are still errors and warnings remaining.
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml image_url_formatter
FILE: /Users/studenttrainees/Project10/drupalorg10/docroot/modules/contrib/image_url_formatter/src/Plugin/Field/FieldFormatter/ImageUrlFormatter.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AND 3 WARNINGS AFFECTING 6 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
16 | ERROR | [x] Whitespace found at end of line
58 | ERROR | [ ] Parameter $image_style_storage is not described in comment
128 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
128 | ERROR | [x] Array indentation error, expected 8 spaces but found 5
134 | WARNING | [ ] Line exceeds 80 characters; contains 117 characters
134 | ERROR | [x] No space found before comment text; expected "// $element['url_type'][0]['#description'] = $this->t("Like:
| | 'http://example.com/sites/default/files/image.png'");" but found "//$element['url_type'][0]['#description'] = $this->t("Like:
| | 'http://example.com/sites/default/files/image.png'");"
135 | WARNING | [ ] Line exceeds 80 characters; contains 132 characters
135 | ERROR | [x] No space found before comment text; expected "// $element['url_type'][1]['#description'] = $this->t("With leading slash, no base URL, like:
| | '/sites/default/files/image.png'");" but found "//$element['url_type'][1]['#description'] = $this->t("With leading slash, no base URL, like:
| | '/sites/default/files/image.png'");"
136 | WARNING | [ ] Line exceeds 80 characters; contains 128 characters
136 | ERROR | [x] No space found before comment text; expected "// $element['url_type'][2]['#description'] = $this->t("No base URL or leading slash, like:
| | 'sites/default/files/image.png'");" but found "//$element['url_type'][2]['#description'] = $this->t("No base URL or leading slash, like:
| | 'sites/default/files/image.png'");"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Time: 171ms; Memory: 10MB
- Assigned to nitin_lama
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 6:19am 16 June 2023 - 🇮🇳India arti_parmar
Hi, @kenyoOwen,
PHPCBF CAN FIX THE SNIFF VIOLATIONS AUTOMATICALLY,
so first of all please run phpcbf and then check only those error is showing which i fixed. - Assigned to nitin_lama
- Status changed to Needs work
over 1 year ago 7:20am 16 June 2023 - 🇮🇳India nitin_lama India
@arti_parmar, the mentioned errors/warning in the IS are fixed but there are still more errors/warning left.
FILE: /home/system/Documents/contribution/image_url_formatter/image_url_formatter.module ---------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------------------------- 38 | ERROR | Type hint "array" missing for $variables ---------------------------------------------------------------------------------------- FILE: /home/system/Documents/contribution/image_url_formatter/src/Plugin/Field/FieldFormatter/ImageUrlFormatter.php ------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------- 234 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead ------------------------------------------------------------------------------------------------------------------- Time: 34ms; Memory: 6MB
- 🇮🇳India nitin_lama India
Updated patch with the remaining phpcs fixes.
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 7:29am 16 June 2023 - Assigned to kartiktandon
- Issue was unassigned.
- Status changed to Needs work
over 1 year ago 11:34am 22 June 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
The latest patch does not even fix all the errors/warnings the other patches fixed.
- Status changed to Needs review
over 1 year ago 6:56am 18 July 2023 - 🇮🇳India mrinalini9 New Delhi
Not able to apply patch #11, getting some error saying: "fatal: unrecognized input".
So, added a patch that consists of all the phpcs errors/warnings fixes, please review it.Thanks!
- Status changed to Needs work
over 1 year ago 7:21am 18 July 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
- - Install the Image URL Formatter module as you would normally install a contributed + - Install the Image URL Formatter module as you would normally install a + contributed
Since that text is part of a list, the last line must be indented.
Also, the line after contributed should be written in the same line with contributed.
Then, since that text is changed, the text suggested in the README template → should be used.Install as you would normally install a contributed Drupal module. For further information, see [Installing Drupal Modules](https://www.drupal.org/docs/extending-drupal/installing-drupal-modules).
/** * @file - * Add an URL formatter for image field + * Add an URL formatter for image field. */
The usual description is Hook implementations for the [module name] module. where [module name] is the module name shown in the .info.yml file.
+ * @param \Drupal\Core\Entity\EntityStorageInterface $image_style_storage + * The Image Style Storage.
Only the first word in the description must be capitalized.
- Status changed to Needs review
over 1 year ago 8:09am 18 July 2023 - 🇮🇳India mrinalini9 New Delhi
Updated patch #15 by addressing #16, please review it.
Thanks!
- Status changed to Needs work
over 1 year ago 8:31am 18 July 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
+1. After installation of this module you'll get a new format type "Image URL" you can assign to any Image Field in a Content Type. Just go to the Type's "Manage Display" and choose "Image URL" instead of "Image" from the Format Combo-Box.
The lines after the first one must be indented.
+ - Install the Image URL Formatter module as you would normally install a + contributed Drupal module. For further information, see + [Installing Drupal Modules](https://www.drupal.org/docs/extending-drupal/installing-drupal-modules).
The first sentence does not need to say the module name. The README template uses the following text.
Install as you would normally install a contributed Drupal module. For further information, see [Installing Drupal Modules](https://www.drupal.org/docs/extending-drupal/installing-drupal-modules).
- Status changed to Needs review
over 1 year ago 9:46am 18 July 2023 - 🇮🇳India sakthi_dev
Please review. Addressed all the changes in comment #18.
-
g089h515r806 →
committed 840870d9 on 8.x-1.x authored by
sakthi_dev →
Issue #3367005 by mrinalini9, nitin_lama, arti_parmar, kartiktandon,...
-
g089h515r806 →
committed 840870d9 on 8.x-1.x authored by
sakthi_dev →
- Status changed to Fixed
over 1 year ago 10:06am 17 August 2023 Automatically closed - issue fixed for 2 weeks with no activity.