Problem/Motivation
Fix PHPCS and PHPStan errors.
See
- https://git.drupalcode.org/project/pdf_to_imagefield/-/jobs/947630
- https://git.drupalcode.org/project/pdf_to_imagefield/-/jobs/947631
Proposed resolution
Fix phpcs and phpctsn errors according to gitlab-ci
Issue fork pdf_to_imagefield-3425194
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
sourabhjainComment #5
sourabhjainBelow are the PHPSTAN errors
I just investigated on the above and it showing imagick extension is missing as per https://github.com/spatie/pdf-to-image/issues/145
Comment #6
hitchshockHi @sourabhjain
Seems like php extension doesn't exist only on your local env, that's why you have such PHPStan errors.
According to
https://git.drupalcode.org/project/pdf_to_imagefield/-/jobs/947631
https://git.drupalcode.org/issue/pdf_to_imagefield-3425194/-/jobs/976016
there is only one PHPStan error
Comment #8
nilesh.addweb commentedHi,
I have fixed remaining phpcs and phstan error.
beofre phpstan-->
After fixing some phpstan and added spatie as per #5 -->
Comment #9
nilesh.addweb commentedNow all pipeline job is green, Need to check composer.json which I have been updated for build pass and need to check after composer-lint.
Before --> https://git.drupalcode.org/issue/pdf_to_imagefield-3425194/-/pipelines/2...
After --> https://git.drupalcode.org/issue/pdf_to_imagefield-3425194/-/pipelines/2...
Comment #10
hitchshockComment #12
hitchshockThanks all for the help.
I reverted some changes to keep the module compatible with other packages and older versions of Drupal.
For example:
- I reverted "spatie/pdf-to-image": "*" cuz our module doesn't support version >=3.0
- We still need to use FileSystemInterface for older Drupal versions
A fix will be provided in the next release