Problem/Motivation
Currently, build pipelines are failing for the 2.2.x branch see:
https://git.drupalcode.org/project/image_link_formatter/-/pipelines/899367
Screenshot:

Failing jobs : PHPSTAN (all versions) due to errors :
------ -----------------------------------------------------------------------
Line src/Plugin/Field/FieldFormatter/ImageLinkFormatterTrait.php (in
context of class
Drupal\image_link_formatter\Plugin\Field\FieldFormatter\ImageLinkForm
atter)
------ -----------------------------------------------------------------------
38 Drupal\Core\DependencyInjection\DependencySerializationTrait does not
support private properties.
🪪 dependencySerializationTraitProperty.unsupportedPrivateProperty
💡 See https://www.drupal.org/node/3110266
45 Drupal\Core\DependencyInjection\DependencySerializationTrait does not
support private properties.
🪪 dependencySerializationTraitProperty.unsupportedPrivateProperty
💡 See https://www.drupal.org/node/3110266
------ -----------------------------------------------------------------------
------ -----------------------------------------------------------------------
Line src/Plugin/Field/FieldFormatter/ImageLinkFormatterTrait.php (in
context of class
Drupal\responsive_image_link_formatter\Plugin\Field\FieldFormatter\Re
sponsiveImageLinkFormatter)
------ -----------------------------------------------------------------------
38 Drupal\Core\DependencyInjection\DependencySerializationTrait does not
support private properties.
🪪 dependencySerializationTraitProperty.unsupportedPrivateProperty
💡 See https://www.drupal.org/node/3110266
45 Drupal\Core\DependencyInjection\DependencySerializationTrait does not
support private properties.
🪪 dependencySerializationTraitProperty.unsupportedPrivateProperty
💡 See https://www.drupal.org/node/3110266
------ -----------------------------------------------------------------------
[ERROR] Found 4 errors
For PHPUNIT : the jobs are not failing, but next minor and next major are completing with warnings due to deprecation messages, mostly unrelated to the module itself.
Steps to reproduce
Run build pipeline for branch 2.2.x at:
https://git.drupalcode.org/project/image_link_formatter/-/pipelines/new
Proposed resolution
Fix PHPSTAN reported errors: most likely just change the problematic properties from private to protected.
For PHPUNIT jobs, I think we should probably try ignoring deprecation errors :
Deprecation messages related with the module should be prompted by PHPSTAN, upgrade status and other validation jobs.
There is no real interest for the module's maintenance in keeping the deprecation messages triggered by the inherited Tests classes from Core (ImageFormatter and ResponsiveImageFormatter).
If deprecations are not anticipated, that's not necessarily a big deal either for the module, since the tests/jobs would fail with errors and we would be able to know exactly which deprecated code to replace.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| image_link_formatter-gitlabci-failed-pipeline1a.jpg | 188.94 KB | dydave |
Issue fork image_link_formatter-3612821
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 #4
dydave commentedQuick follow-up on this issue:
All the changes described in the issue summary were implemented in MR !15, created above at #2.
Since all the jobs and tests were back to passing 🟢, I went ahead and merged the changes above at #3.
The build pipelines are now back to passing for the branch 2.2.x 🟢 for all supported versions, see:
https://git.drupalcode.org/project/image_link_formatter/-/pipelines/899481
At this point, since all the work expected in this ticket should have been completed, marking it as Fixed for now.
Feel free to let us know if you have any questions on any of the recent code changes or the project in general, we would surely be glad to help.
Thanks in advance!