As i check at https://pareview.sh/pareview/https-git.drupal.org-project-image_field_to...
There some issues with code standards.
Should be fixed.
Review of the 8.x-1.x branch (commit df9bce3):
Your README.txt does not follow best practices (headings need to be uppercase). See https://www.drupal.org/node/2181737 .
The INTRODUCTION section is missing.
The REQUIREMENTS section is missing.
The INSTALLATION section is missing.
The CONFIGURATION section is missing.
The image_field_tokens.module does not implement hook_help(). See https://www.drupal.org/docs/develop/documenting-your-project/module-docu... .
Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
FILE: ...areview_temp/src/Plugin/Field/FieldWidget/ImageFieldTokensWigdet.php
--------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 1 LINE
--------------------------------------------------------------------------
101 | ERROR | Type hint "array" missing for $element
101 | ERROR | Type hint "array" missing for $form
--------------------------------------------------------------------------
Time: 768ms; Memory: 4Mb
DrupalPractice has found some issues with your code, but could be false positives.
FILE: ...w_temp/src/Plugin/Field/FieldFormatter/ImageFieldTokensFormatter.php
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
--------------------------------------------------------------------------
82 | WARNING | \Drupal calls should be avoided in classes, use
| | dependency injection instead
86 | WARNING | \Drupal calls should be avoided in classes, use
| | dependency injection instead
87 | WARNING | \Drupal calls should be avoided in classes, use
| | dependency injection instead
--------------------------------------------------------------------------
Time: 663ms; Memory: 4Mb
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | image_field_tokens_d8_coding_standards_3002823_6.patch | 5.58 KB | ysamoylenko |
| #5 | coding_standards-3002823-5.patch | 704 bytes | deaom |
| #3 | coding_standards-3002823-3.patch | 704 bytes | deaom |
Comments
Comment #2
volkswagenchickThis should maybe separated into two issues, having the README in a new issue :)
Comment #3
deaom commentedHi. Fixed the coding standards. Agree to put the readme in a new issue :)
Comment #4
ysamoylenko commentedI can't apply this patch, because it will revert the module state to state https://www.drupal.org/project/image_field_tokens_d8/issues/3002311 which was before applying the patch from this thread. We need to find another solution.
Comment #5
deaom commentedNo problem, there was not a lot of issues so since you applied the patch mentioned above, I just got the new version and did the patch again.
Comment #6
ysamoylenko commentedI've fixed the issue related to the previous comment and also fixed other coding standards.
The problem was related to core ImageWidget where the process() method parameters haven't type hinting.
Now, I've used annotation - {@inheritdoc} for this method inside module widget.
The will be patch attached below.
Comment #8
ysamoylenko commentedThe patch was committed.