Problems/Motivation:
FILE: ...eb/modules/contrib/domain_language-3370924/src/Form/DomainLanguageForm.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 10 WARNINGS AFFECTING 10 LINES
--------------------------------------------------------------------------------
36 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
39 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
42 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
46 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
50 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
84 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
128 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
148 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
160 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
175 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
--------------------------------------------------------------------------------
FILE: ...eb/modules/contrib/domain_language-3370924/src/DomainLanguageOverrider.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------------
82 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
91 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
104 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
166 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
167 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
--------------------------------------------------------------------------------
Steps to Reproduce:
Execute the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig domain_language/
Remaining Tasks:
Needs dependency injections to be injected in code.
Issue fork domain_language-3370924
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
urvashi_vora commentedUnassigning, as its been 2 weeks and no work is done.
As per Issue Etiquette #8 of Dont's (https://www.drupal.org/docs/develop/issues/issue-procedures-and-etiquett...), do not assign yourself to an issue unless you intend to work on it in a fairly short timeframe.
Comment #3
urvashi_vora commentedAlso, as per issue summary, it is not clear, which command has been executed to reproduce this issue.
Comment #4
urvashi_vora commentedComment #5
urvashi_vora commentedI have updated the issue summary.
Comment #6
urvashi_vora commentedI will provide a solution shortly.
Comment #8
urvashi_vora commentedPlease review.
Thanks
Comment #9
thakurnishant_06 commentedHello @urvashi_vora
I have tested MR10, and the changes made have resolved all the errors and warnings.
Thank you for the support
Comment #11
jeroentMerged to 8.x-1.x. Thanks!
Comment #12
jeroentComment #13
cslevy commentedHello,
This merge generates a fatal error.
Fatal error: Uncaught TypeError: Drupal\domain_language\DomainLanguageOverrider::__construct(): Argument #1 ($current_user) must be of type Drupal\Core\Session\AccountProxyInterface, Drupal\Core\Config\CachedStorage given, called in .../web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 and defined in .../web/modules/contrib/domain_language/src/DomainLanguageOverrider.php:81
This class is defined in the services in the following way:
And also the create method was introduced.
We don't need both. I think the dependencies should be defined in the services.yml, and this create method removed.
Comment #15
bburgThis issue is closed, so I created #3388388: DomainLanguageOverrider service arguments to address the error cslevy mentions.