Closed (fixed)
Project:
Webform
Version:
6.1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Nov 2021 at 07:58 UTC
Updated:
13 Dec 2021 at 13:54 UTC
Jump to comment: Most recent
Drupal 9 removed the EntityBase::url, EntityBase::urlInfo() and EntityBase::link() methods, as per https://www.drupal.org/node/2614344
Webform still has Webform::url, Webform::urlInfo and Webform::link.
Install webform under Drupal 9 and call the \Drupal\webform\Entity\Webform::url method.
Put in the same BC layer that Drupal core did for later releases of Drupal 8, and mark the method as deprecated, then remove it in webform 7.
Everything.
None.
Deprecation of the \Drupal\webform\Entity\Webform::url method, and removal in webform 7 as a follow up.
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 #3
paulocsComment #4
paulocsAs this issue is causing problems with drupal 9 compatibility I agree to have the resolution proposed in the issue summary while webform supports Drupal 8.
I'm expanding the issue scope to include
Webform::url(),Webform::urlInfo()andWebform::link(). I'll open a followup issue for remove those methods when webform supports Drupal 9 only.Comment #6
paulocsComment #9
jrockowitz commentedComment #10
steven jones commentedSo thanks for the fast work on this one, but I don't think the fix is correct.
For example, the
urlmethod has been changed to merely return the value oftoUrlbut the return type of the former is a string, whereas the return type of the latter is\Drupal\Core\UrlI think you want the code from Drupal 8.9 core, so it should look like:
But equally the deprecation notice should probably reference the next version of Webform, rather than Drupal core?
The other methods might have similar issues, I've not checked, sorry.
Comment #12
paulocsComment #13
steven jones commentedLooks better, thanks!
Comment #14
jrockowitz commentedI don't think we have to deprecate these methods because they are already broken in Drupal 9 and marked as deprecated in Drupal 8 because the parent ConfigEntityBase has these methods.
Once we are only supporting Drupal 9, we should remove these methods. I would make this ticket postponed until we only support Drupal 9.
Comment #15
paulocsActually I think we can commit this issue as Webform still supports D9 and D8. I created this issue to remove the methods when webform drops supports on D8 #3251295: [Drupal 9.x] Remove Webform::url, Webform::urlInfo() and Webform::link() methods.
As @Steven Jones said, if this issue is not committed, if we call those methods in a drupal 9 project, we have a problem.
I'm moving back the issue to RTBC.
Comment #16
jrockowitz commentedComment #18
jrockowitz commentedMakes sense. Thanks for the PR.