Problem/Motivation
Hello project maintainers,
This is an automated issue to help make this module compatible with Drupal 10.
To read more about this effort by the Drupal Association, please read: The project update bot is being refreshed to support Drupal 10 readiness of contributed projects
Patches will periodically be added to this issue that remove Drupal 10 deprecated API uses. To stop further patches from being posted, change the status to anything other than Active, Needs review, Needs work or Reviewed and tested by the community. Alternatively, you can remove the "ProjectUpdateBotD10" tag from the issue to stop the bot from posting updates.
The patches will be posted by the Project Update Bot official user account. This account will not receive any issue credit contributions for itself or any company.
Proposed resolution
You have a few options for how to use this issue:
- Accept automated patches until this issue is closed
If this issue is left open (status of Active, Needs review, Needs work or Reviewed and tested by the community) and the "ProjectUpdateBotD10" tag is left on this issue, new patches will be posted periodically if new deprecation fixes are needed.
As the Drupal Rector project improves and is able to fix more deprecated API uses, the patches posted here will cover more of the deprecated API uses in the module.
Patches and/or merge requests posted by others are ignored by the bot, and general human interactions in the issue do not stop the bot from posting updates, so feel free to use this issue to refine bot patches. The bot will still post new patches then if there is a change in the new generated patch compared to the patch that the bot posted last. Those changes are then up to humans to integrate.
- Leave open but stop new automated patches.
If you want to use this issue as a starting point to remove deprecated API uses but then don't want new automated patches, remove the "ProjectUpdateBotD10" tag from the issue and use it like any other issue (the status does not matter then). If you want to receive automated patches again, add back the "ProjectUpdateBotD10" tag.
- Close it and don't use it
If the maintainers of this project don't find this issue useful, they can close this issue (any status besides Active, Needs review, Needs work and Reviewed and tested by the community) and no more automated patches will be posted here.
If the issue is reopened, then new automated patches will be posted.
If you are using another issue(s) to work on Drupal 10 compatibility it would be very useful to other contributors to add those issues as "Related issues" when closing this issue.
Remaining tasks
Using the patches
- Apply the latest patch in the comments by Project Update Bot or human contributors that made it better.
- Thoroughly test the patch. These patches are automatically generated so they haven't been tested manually or automatically.
- Provide feedback about how the testing went. If you can improve the patch, post an updated patch here.
Providing feedback
If there are problems with one of the patches posted by the Project Update Bot, such as it does not correctly replace a deprecation, you can file an issue in the Drupal Rector issue queue. For other issues with the bot, for instance if the issue summary created by the bot is unclear, use the Project analysis issue queue.
| Comment | File | Size | Author |
|---|---|---|---|
| #27 | svg-error.png | 31.86 KB | sarikawirtz |
| #23 | svg_image-3299276-23-d10_compat.patch | 12.07 KB | daniel_j |
Issue fork svg_image-3299276
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:
- 3299276-automated-drupal-10
changes, plain diff MR !14
- 8.x-1.x
changes, plain diff MR !13
Comments
Comment #2
project update bot commentedThis is an automated patch generated by Drupal Rector. Please see the issue summary for more details.
It is important that any automated tests available are run with this patch and that you manually test this patch.
Drupal 10 Compatibility
According to the Upgrade Status module, even with this patch, this module is not yet compatible with Drupal 10.
Currently Drupal Rector, version 0.13.0, cannot fix all Drupal 10 compatibility problems.
This patch does not update the
info.ymlfile for Drupal 10 compatibility.Leaving this issue open, even after committing the current patch, will allow the Project Update Bot to post additional Drupal 10 compatibility fixes as they become available in Drupal Rector.
Debug info
This patch was created using these packages:
Comment #3
atul_ghate commentedHi,
i will review this patch.
Comment #4
atul_ghate commentedVerified patch #2 on Drupal 10 Patch applied successfully
Testing Steps:
1. Install drupal 10
2. clone the branch on drupal (8.x-1.x-dev) on drupal 9 and checked deprecated code uisng upgrade status module
3. Added some changes in info.yml file and provide a patch as said upgrade status module and Applied patch #4 and #2 again checked
deprecated code on drupal 9
4. Then installed module on drupal 10
5. check module installed sucsessfully or not
module has been installed succesfully but after installing module on my drupal 10 site ,site not working properly showing errors in recent log messages, it can be moved to needs work.
thanks and regards
Comment #5
jrglasgow commentedpatch in #4 works for me
Comment #6
WebbehGiven #4, moving to NW. #4, can you please provide the error messages? That would be very helpful.
Comment #7
ameymudras commentedThere were 2 issues in the above patch #4
1. The manage display page throwing website encountered error. Logs displayed following error
ArgumentCountError: Too few arguments to function Drupal\image\Plugin\Field\FieldFormatter\ImageFormatter::__construct(), 9 passed in /app/modules/contrib/svg_image/src/Plugin/Field/FieldFormatter/SvgImageFormatter.php on line 49 and exactly 10 expected in Drupal\image\Plugin\Field\FieldFormatter\ImageFormatter->__construct() (line 75 of /app/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php)2. The code was using /Drupal calls and not dependency injection
I have fixed these issues along with other coding standard issues
Comment #8
project update bot commentedUpdating bot issue summary.See #3313904: Update project bot templates for RTBC status support and human interaction tips
Comment #9
kristen pol@ameymudras Thanks for testing and updating the patch and providing an interdiff.
This module needs functional testing on Drupal 10. Adding general instructions:
https://www.drupal.org/community-initiatives/contribution-events-initiat...
Comment #10
nx2611 commentedThis is working for me in Drupal 9.5 and 10.1. Here are the steps for manual testing:
Comment #11
kristen polThanks for the updated patch and testing. Removing testing tag.
I took a quick look at the interdiff and nothing jumped out at me so keeping as RTBC.
Comment #12
prudloff commentedConfigManagerInterface::findConfigEntityDependents()is deprecated so I updated #7 to replace it.Comment #13
yashingole commentedI have reviewed and checked Patch #12 this works for drupal 9.4 and drupal 10.0. and 10.0.1
Screenshots of the compatibility on 9.4 and the Uploaded svg image on 10 have been attached for reference:
Comment #14
gaurav-mathur commentedvarify patch #2 and #4 module succesfully installed but site is not working and log displayed errors ,it can be moved to need work and need testing for drupal 10 .
Comment #15
WebbehFrom #14, marking as Needs Work, although we do need logged errors of what actually was shown to diagnose the issue.
Removing images from the attachments, as those are not necessary.
Comment #16
j-vee commentedCan't reproduce issues mentioned in #14, the patch in #12 works fine and SVG images & related functionality works as before. I think this is ready to be released especially with D10 being out.
Comment #18
smustgrave commentedHello wonder if this can get committed for a D10 release now that 10 is out.
Comment #19
jcnventuraPretty sure that the usage of the file_url_generator service makes this no longer compatible with Drupal <9.3, as it was introduced in that version.
Comment #20
smustgrave commentedMy suggestion would be to start a new branch supporting 9.4 and 10
Comment #21
martijn de wit@imyaro Do you have time to work on this module or do you need some (new) co-maintainers?
Comment #22
danflanagan8Here's an update patch that corrects the core_version_requirement to make it 9.3 and up. I also removed code related to cache context that is no longer needed as of #2669074: Convert file_create_url() & file_url_transform_relative() to service, deprecate it. That was a workaround before the url generator service was in here.
At this point 9.2 is no longer supported so I don't think a new branch is required here.
Comment #23
daniel_j commentedThe 'core' key must be removed if support for Drupal < 8.7 is dropped. The attached patch does this. It also uses dependency injection for the FileUrlGenerator service rather than calling \Drupal::service().
Comment #24
danflanagan8I just learned that about an hour ago!
The updates in the latest patch look good to me. I haven't tested it though. Here's the interdiff between 22 and 23.
Comment #25
anybodyDrupal 10 is out, so this is important. Any maintainer plans here?
Comment #26
sarikawirtz commentedComment #27
sarikawirtz commented#23 Installed and enabled module on Drupal10. Applied patch. Allowed field to accept "SVG" image but did not work for me. after uploading sgv image got an error(
svg-error.png)
In log error: Entity view display 'node.article.default': Component 'comment' was disabled because its settings depend on removed dependencies.
Comment #28
sarikawirtz commentedComment #29
martijn de wit@Sarika Wirtz can you post also your image field widget settings form?
Did you install and test it on a clean D10 installation ?
Comment #30
poker10 commentedI tried to repeat the steps from #27, but cannot reproduce the problem.
Clean D10 installation, installed and enabled this module with the patch applied. Allowed field to accept the "SVG" format. Created new node and uploaded SVG image without any problems. The node detail page is displayed correctly with the SVG image.
Also I suppose we should leave the tags here just in case the bot comes with something new (or the maintainer should decide if/when to remove that tag).
Comment #31
danflanagan8This should be at NR. The errors in #27 appear unrelated to this module and it should not have been kicked back to NW. It would be great if someone who has tested (@poker10?) would RTBC this.
Comment #32
sarikawirtz commentedAs @Martijn de Wit said. I installed fresh installation of Drupal10.
Comment #33
sarikawirtz commentedAs @Martijn de Wit said. I installed fresh installation of Drupal10. Installed module. Applied patch, allowed field to accept
svgand I must say it's working perfectly fine. I can not reproduce my own error anymore. moving to RTBC.Comment #34
sarikawirtz commentedComment #35
sarikawirtz commented@poker10 By mistake i removed your tag. Added them again. My apologies.
Comment #40
grevil commentedRTBC +1. Couldn't find any missing deprecation errors, using the upgrade_status module and PHPStan. Installs successfully under Drupal 10.
I closed MR 13 for visibility's sake (since it was on the wrong issue fork branch). Removed patch #12 from "3299276-automated-drupal-10", applied patch #23 by @daniel_j to branch "3299276-automated-drupal-10" and opened an MR for easier review!
Comment #41
anybodyThank you for this review and cleanup @Grevil! Also confirming RTBC! :)
Maintainers?
Comment #42
nagy.balint commentedI sent a mail through contact form to the maintainer.
Comment #43
le72This is the one of few modules which prevent our upgraded to D10!
Please add a new version.
Comment #44
asterovim commentedI can confirm, it's work ! thanks.
Comment #45
imyaro commentedChecking patch, will do a release soon.
Thanks everyone for participating
Comment #47
imyaro commentedGreat job!
Merged. Release coming soon.
Comment #48
imyaro commented