Problem/Motivation
Hello project maintainers,
This is an automated issue to help make this module compatible with Drupal 9.
To read more about this effort by the Drupal Association, please read: Accelerating Drupal 9 module and theme readiness with automated patches
Periodically patches will be added to this issue that remove Drupal 9 deprecations. To stop further patches from being posted simply close this issue(any status besides Active, Needs Review or Needs work) or remove the "ProjectUpdateBotD9" tag from the issue.
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 or Needs work) and the "RectorAutoPatches" tag is left on this issue, new patches will be posted periodically if new deprecations are needed.
As the Drupal Rector project improves and is able to fix more deprecations the patches posted here will cover more of the deprecations in the module.
- Leave open but stop new automated patches.
If you want to use this issue as a starting point to remove deprecations but don't want new automated patches simply leave this issue open but remove the "RectorAutoPatches" from the issue.
You can use Drupal Rector yourself to make these patches.
If you want to receive automated patches again simply add back the "RectorAutoPatches" tag.
- Close it and don't use it
If the maintainers of this project don't find this issue useful they can simply close this issue(any status besides Active, Needs Review or Needs work) 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 9 compatibility it may be useful to other contributors to add those issues as "Related issues" when closing this issue.
Remaining tasks
Using the patches
- Apply the patch in the comment by Project Update Bot
- Thoroughly test the patch. These patches are automatically generated so they haven't been tested manually or automatically.
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 Rector issue queue. For other issues with the bot, for instance if the issue summary created by the bot is unclear, use the Infrastructure project issue queue using the component “Bot: Drupal Rector”.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 3140535-11.patch | 3.73 KB | dww |
Issue fork fieldable_path-3140535
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.
This patch was created using these packages:
Debug info: Run #1473
Comment #3
project update bot commentedFixing summary
Comment #4
valicAdding as well core version, and replacing simpletest code
Comment #5
el1_1el commentedGetting
a small diff from 3
-core: 8.xfixes itComment #7
dwwThis is going to need to be re-rolled now that #3216809: Automated tests fail due to extending TestBase not BrowserTestBase is done, since that issue already converted the fieldable_path test to use
BrowserTestBase.Also, I just marked #3082231: Deprecated Code Report duplicate with this (even though that was the earlier issue about this topic), since the patch here is more complete. However, crediting @Sergiu Stici for their work on the original issue...
I'll be working on this issue today (after some $day_job meetings), so stay tuned for updates. ;)
Thanks,
-Derek
Comment #8
dwwRe-roll for the latest state of the 8.x-1.x branch. Basically, removing the hunks that were already fixed with:
There's some stuff in here I'm not totally thrilled with, but I wanted to upload this as-is to see if the bot is at least happy again.
Comment #9
dwwD8 bot is happy, but this would fail on D9. Here are the local results:
Stay tuned, I'll have a new patch up in a bit...
Comment #10
dwwHuzzah for tests! Even fixing the above errors, the D9 test still fails. The value is not getting set on new nodes, only when you edit existing nodes. I sprinkled some debugging into into the code, and lo, the D8 and D9 code paths aren't the same for this stuff.
Drupal\fieldable_path\Plugin\Field\FieldType\FieldablePath::preSave()gets called twice in D8, and triggers the magic to save the value. In D9, on a new node, it's only called once, and that function doesn't end up doing anything.I'm totally new to this module, so I'm going to have to figure out what's really going on. But at this point, we shouldn't keep changing the D9 tests, we should fix the module so that the code really works as tested... ;)
Comment #11
dwwNew day, new eyes. This port is going to take more effort than the rector bot can help us with. To keep the Git history clean and the scope reasonable, I'm going to commit the attached (assuming the bot agrees with my local results) as the best effort the bot (and its human assistants in this issue) could come up with. I'm going to open a separate ticket to actually make this work in D9 for everything from comment #9 and later...
Comment #13
dwwOkay, cool. Committed that and pushed to 8.x-1.x.
Moving everything else to #3217038: Port fieldable_path to Drupal 9.
Updated the project page "Drupal 9 is here" field to point over there.
Anyone who wants to keep helping with D9 porting is invited to participate over there.
Thanks, everyone!
-Derek