- Issue created by @Kingdutch
- Issue was unassigned.
- Status changed to Needs review
about 1 year ago 12:48pm 25 July 2023 - last update
about 1 year ago 29,881 pass - π³π±Netherlands Kingdutch
Uploading a patch that makes the proposed change. Since in the LinkGeneratorTest we mock the assembler, we need to change it to return a
GeneratedUrl
instance, since external URLs are now tested withtoString(TRUE)
rather thantoString(FALSE)
.We can see this is an API stable change because the actual output of the link itself is not changed (assuming no other tests break and need fixing).
- πΊπΈUnited States mglaman WI, USA
This seems to make sense, to me. The code had an explicit way to exit early if the link was external by directly creating a generated link. Now external links get generated the same as any others.
I wouldn't expect any tests to be broken as this is very internal.
- π¨πSwitzerland Berdir Switzerland
I don't remember why exactly we had this special case, Not sure if there's a performance aspect to it.
That said, this barely seem relevant to the meta issue because it is about Link objects, which are not used in StreamWrappers, only the underlying Url objects. I suppose it does become an issue if you use FileUrlGenerator::generateUrl() and then pass that Url to a Link object, but there are not that many cases in core that actually do this. It's the last piece in the puzzle.
- π¨πSwitzerland Berdir Switzerland
One more thing to consider here. We might want to deprecate getExternalUrl() only in D11 for D12 as we deprecate the separate interface. Modules that will want to remain compatible with D10 and D11 will need to keep the method anyway and that's going to be confusing otherwise.
- Status changed to Needs work
about 1 year ago 3:09pm 11 August 2023 - πΊπΈUnited States smustgrave
Correct me if I'm wrong but this seems like a change that could use a CR?