Problem/Motivation
From https://git.drupalcode.org/project/eloqua_api_redux/-/jobs/1333054
$ php vendor/bin/phpstan analyze $_WEB_ROOT/modules/custom/$CI_PROJECT_NAME $PHPSTAN_CONFIGURATION --no-progress || EXIT_CODE=$?
------ ----------------------------------------------------------------------
Line src/Service/EloquaApiClient.php
------ ----------------------------------------------------------------------
150 \Drupal calls should be avoided in classes, use dependency injection
instead
------ ----------------------------------------------------------------------
[ERROR] Found 1 errorSteps to reproduce
Run Gitlab CI
Proposed resolution
Use dependency injection
Remaining tasks
- Update the code
- Run sniffers, linters, and automated tests
- Test manually
User interface changes
None
API changes
None
Data model changes
None
Issue fork eloqua_api_redux-3445820
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 #3
papagrandeComment #4
diwakar07 commentedHi,
I reviewed MR !7.
It successfully fixes the phpstan errors, the gitlab ci pipeline passes.
The changes are following the dependency injection.
Looks good to me.
Moving to RTBC.
Comment #5
papagrandeI just merged in another MR. Can someone address the merge conflicts and any new PHPStan errors?
Thanks.
Comment #6
papagrandeConflicts fixed. Please review again.
Comment #7
erindarri commentedWhen attempting to apply this against 2.0.x-dev, this is failing to apply for me in:
settings.php
and EloquaApiClient.php.
Comment #8
erindarri commentedComment #9
erindarri commentedI applied the diff and this merges cleanly.
GitLab pipeline is still passing.
Comment #11
papagrandeThanks @erindarri, @diwakar07