Needs work
Project:
Svg Image
Version:
3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 May 2026 at 07:05 UTC
Updated:
2 Jul 2026 at 17:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
o_timoshchuk commentedComment #3
o_timoshchuk commentedComment #5
o_timoshchuk commentedI have verified that the issue appeared in Drupal Core 11.3.10, as the ResponsiveImageFormatter parent class was updated.
The patch was tested successfully.
Comment #7
hosterholzMR !59 breaks compatibility with Drupal 11.3 and earlier.
To preserve backward compatibility, only add a type hint to the $fileUrlGenerator property.
Comment #8
orkutmuratyilmazWhen I upgrade my core version to 11.4.0-rc2, I get the error message below:
Fatal error: Type of Drupal\svg_image_responsive\Plugin\Field\FieldFormatter\SvgResponsiveImageFormatter::$fileUrlGenerator must be Drupal\Core\File\FileUrlGeneratorInterface (as in class Drupal\responsive_image\Plugin\Field\FieldFormatter\ResponsiveImageFormatter) in /var/www/html/web/modules/contrib/svg_image/modules/svg_image_responsive/src/Plugin/Field/FieldFormatter/SvgResponsiveImageFormatter.php on line 28Comment #9
tregonia commentedAs previously reported for the rc version, updating to Drupal 11.4.0 official release throws a fatal error and bricks the site.
Fatal error: Type of Drupal\svg_image_responsive\Plugin\Field\FieldFormatter\SvgResponsiveImageFormatter::$fileUrlGenerator must be Drupal\Core\File\FileUrlGeneratorInterface (as in class Drupal\responsive_image\Plugin\Field\FieldFormatter\ResponsiveImageFormatter) in /home/ide/project/docroot/modules/contrib/svg_image/modules/svg_image_responsive/src/Plugin/Field/FieldFormatter/SvgResponsiveImageFormatter.php on line 28Comment #11
tregonia commentedCreated the merge request from the branch in #7. Tested with Drupal 11.4.0 and confirmed that the type change resolved the issue.
RTBC+1
Comment #12
siramsay commentedTested the patch from #62 to do a D10 => D11 upgrade to 11.4.0 and it worked.
Prior to patch I got
Fatal error: Type of Drupal\svg_image_responsive\Plugin\Field\FieldFormatter\SvgResponsiveImageFormatter::$fileUrlGeneratorRTBC+1
Adding patch for reference
Comment #14
anybodyFor the reasons given I'm merging MR!62, but we should consider a 4.x version compatible with Drupal ^11.4|| ^12 which removes this like in MR!59.
Leaving this open for that reason.
Comment #15
anybodyClosing #3608004: Fix incompatible $fileUrlGenerator redeclaration in SVG responsive image formatter which is well documented. I agree there should be a test that should have failed with this broken implementation.
Comment #18
anybodyReverted, I accidentally merged the wrong MR. See #14 which is still correct.