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.
Issue fork better_normalizers-3286221
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 #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 this patch makes this module compatible with Drupal 10! 🎉
This patch updates 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
project update bot commentedComment #4
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 this patch makes this module compatible with Drupal 10! 🎉
Therefore this patch updates 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 #7
vladimirausPatch works fine. Hiding files, so can concentrate on MR.
Also added contrib HAL module as dependency.
To test on Drupal 10
1. Add repository to
composer.jsonbefore main drupal repository.2. Run
Comment #8
rajab natshahComment #9
andypostIs there a reason for the module in terms of D10?
I bet all normalizers already in core so no need in the module, even default content module v1 is not going to be compatible with D10
Comment #10
rajab natshahYou are right Andrey
#3331814: Remove the Better Normalizers module from Varbase Core 10.0.x branch
My actions are:
10.0.xbranchHaving a working module ( with
composer update) in an upgrade step from Drupal 9 to Drupal 10. Is just a stage to ease up the upgrade process with auto updater.I worked on #3160146: Add a Normalizer and Denormalizer to support Layout Builder
If this is in Drupal 10 core that will be so nice too
Comment #11
rajab natshahHoping for a soft commit, and a soft release ( pre-release ), would speed up testing upgrades to Drupal 10
Comment #12
rajab natshahComment #13
andypostI think better to update project page with this notes (thank you)
Hal will need new major release 2.x branch
Comment #14
rajab natshahComment #15
rajab natshahComment #17
m4olivei@andypost and/or other maintainers, could we get confirmation that this is the case? I don't understand the comment about default content module, it doesn't seem to depend on better_normalizers 🤔.
It would be great to get the project page updated to the effect of whatever should be done for folks having this module as a dependency in Drupal 9 that are moving to Drupal 10. See also other issue recently opened related to Drupal 10 compatibility: #3354893: Deprecation warning 'Not marking service definitions as public is deprecated'.
Given all that, it doesn't seem like this is in actual fact RTBC, so updating the status.
Comment #19
murilohp commentedJust added HAL as a dependency on composer and I brought the stuff from #3354893: Deprecation warning 'Not marking service definitions as public is deprecated' to the MR.
Great! I'm also have the same question and want to know it, I'm upgrading my project to D10 and I don't know if I can get rid off this module or not.
I'll move this back to NR to see what you guys think.
Comment #20
muskan_mahajan commentedI have checked MR1 and in drupal-check getting one error which is not ignorable. So, uploading a patch and drupal-check error file for the same.
Comment #21
joachim commentedThis is patch #20 rerolled to apply to beta5.
Comment #22
murilohp commentedThanks for sharing the report @muskan_mahajan, I've just updated the MR
Comment #23
abhinavk commentedI have tested MR !1 in drupal 10.0.9. It is working fine for me.
Moving to RTBC.
Comment #24
rajab natshahHopping for a commit and a tag release
Comment #25
rajab natshahOnly for testing:
Having the issue fork in the
composer.jsonfile.In the
repositoriesand in
requireComment #26
andypostStill not clear what to commit MR vs patch, as next beta6 is needed for upgrade I'm fine to commit and create release but then it need to fix tests...
So what is a plan?
Comment #27
murilohp commentedHey @andypost I think you should go with the MR in this case. The MR have the test fixed(both for D9 and D10), and also incorporates the #3354893: Deprecation warning 'Not marking service definitions as public is deprecated'(which can be closed as duplicated since the deprecation notice reported is for D10 and we can address this here), what do you think?
Comment #28
murilohp commentedPosting the static patch because using the MR doesn't allow pinning to a specific commit.
Comment #29
pfrenssenMR looks good to me.
Comment #30
smulvih2+1 RTBC, can we get a new release?
Comment #31
joshf commentedAttached a patch that will apply cleanly to the d.o. packaged version of 8.x-1.0-beta5. This can be used to patch the module via composer. Be aware that if you want to update to D10 via composer you'll need to use one of several available workarounds to deal with the fact that composer cannot patch in a dependency change.
Comment #32
smulvih2Works on D10 with the following in composer.json:
Comment #33
aurelianzaha commented+1 to commit this
Comment #34
rajab natshahHoping for a commit and a release.
To have a smooth upgrade process for projects.
Comment #35
larowlanI don't think this will be compatible with D9, so we will need a new major version here
Comment #36
larowlanThis doesn't apply to the HEAD of 8.x-1.x can we get a reroll?
Thanks
Comment #37
vladimirausMR is mergable.
If you are talking about the latest patch, it is for latest stable release, not for the dev.
Comment #38
joshf commentedAttached a new patch that will apply to HEAD.
Again to clarify:
#31 applies cleanly to the distributed version of 8.x-1.0-beta5, and is suitable for use in composer patches.
#38 applies to HEAD, and should be suitable to merge.
Thanks!
Comment #39
larowlanCutting a 2.0.0-beta1
Please note that there will not be a version that works on D9 and D10, that's not possible because of the return type hint change for normalizers between Symfony 4 and 6.
Comment #40
larowlanI'd also like to echo the sentiment of @andypost above - you should be moving away from this module towards normalizers in core and default content v2
Comment #41
vladimirausThnaks 🍰