Closed (fixed)
Project:
Image Link Formatter
Version:
2.2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
24 Jun 2026 at 22:34 UTC
Updated:
9 Jul 2026 at 22:40 UTC
Jump to comment: Most recent
Comments
Comment #4
dydave commentedQuick follow-up on this issue:
Core version requirements were raised to Drupal 12. 🥳
In other words, current versions are still supported exactly the same way, but the mode can now also be used on Drupal 12.
Removed a lot of code, in particular in field formatter plugin classes, where the __constructor and create methods could be removed.
The create method was refactored and moved to the Trait.
Added PHP Attributes
GroupandRunTestsInSeparateProcessesin Tests and had to keep the@groupEnabled Upgrade status job in gitlab CI.
PHPSTAN validation jobs for 3 major core versions:
Had a few issues getting phpstan jobs working for previous major (10.6.x) and next major (12.x):
Based on #3545263: Fix PHPStan for previous major, I was able to find a few solutions:
a. For previous major: D10.6.x errors being raised due to added PHP Attributes in Tests files:
GroupandRunTestsInSeparateProcesses.The solution was found in:
https://git.drupalcode.org/project/smart_trim/-/merge_requests/116/diffs...
Which was to add before script commands to remove the problematic pieces of code before running phpstan for the previous major build, see:
https://git.drupalcode.org/project/image_link_formatter/-/blob/2.2.1/.gi...
b. For next major: D12.x errors being raised du to:
Corresponding to calling
$this->container->getin the Kernel tests files and the solution was to ignore these specific lines.Rounds of improvements suggested by AI
On my local environment, I worked with an AI agent which suggested several interesting additional changes that I considered, reviewed and tested: Code style improvements, performance, security, etc...
Note that I checked whether issue #3064751: Responsive image formatter does not support URL/Link options was fixed corresponding to a @todo in the Image Link Formatter Kernel tests:
The changes have not yet been integrated to the 11.3.x branch.
In other words, the issue is fixed but will only be available with D11.4.x and above.
We can probably come back to this @todo task a little bit later, once the first 11.4.x stable releases are avaiblable.
Since all the jobs and tests were still passing 🟢, I went ahead and merged the changes above at #3. 🥳
The changes were published in the new release image_link_formatter-2.2.1 which is now compatible with Drupal 12.
Lastly, the pipelines schedules were updated at:
https://git.drupalcode.org/project/image_link_formatter/-/pipeline_sched...
Two automated builds are now in place:
Since all the work to be carried in this ticket should have been completed at this point, marking it as Fixed for now.
Feel free to let us know if you have any questions or concerns on any of the recent code changes, or the project in general, we would surely be glad to help.
Thanks in advance.