Closed (fixed)
Project:
Drupal core
Version:
8.8.x-dev
Component:
path.module
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
13 Nov 2019 at 22:37 UTC
Updated:
2 Dec 2019 at 17:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
plachComment #3
berdirComment #4
berdirthis is an arbitrary example but now it's one that is no longer in core.services.yml. In a way, I suppose that's better because such an example is closer to what people looking at that documentation actually want to do ;)
That said, it has path.crud as an argument, which hasn't existed for, uhm, 6 years :)
doesn't really matter if the deprecated service or not, but I guess it is currently identical and would result in fewer (misleading) deprecation messages if you'd only access that.
this is new in 8.8, so if we can still get it in, I suppose we don't have to worry about BC :)
Ok, so you're currently only updating the service but not the interface for this form and RequestPath (at least with this one, a subclassed constructor is imaginable.. found one but that doesn't change the constructor: http://grep.xnddx.ru/node/29452542).
What we could *maybe* still get into 8.8 beta would be removing the type hint checking if it implements the new interface, and if not, then we'd do a @trigger_error?
same.
workspaces is/was still experimental and this class is new, so we can update the type hint of this class.
should a test in core/tests rely on a path_alias service or should we use something else for this test? not sure.
Comment #5
plachThis addresses #4, I think :)
Comment #7
ravi.shankar commentedPatch #5 has passed the test so I am moving it to needs review.
Comment #8
jibranPatch looks good to me. Can we still backport this to 8.8.x?
Comment #9
berdirIMHO a slightly less complex version of this would be better. I'd just keep the outer condition and then do standard constructor BC message with fallback to \Drupal::service().
Something like:
The current message tries to address my unspecific, wishful-thinking comment about deprecating the interface, but this isn't the place for it and is actually missing the most important part.. *where* you need to make the change, the constructor of this specific class.
Comment #10
plachThis addresses #9 and also fixes some indentation issues.
Comment #11
berdirWell, both are wrong, actually :) like @todo, @deprecated should be one space in and then the following lines 3.
Wasn't sure if I should still set it to RTBC, but it is in there quite often, so maybe a bit much to clean up pre-commit?
We usually don't bother with BC tests for constructors, entity manager conversion would probably still not be done if that would have been necessary. But we have it now, and since we're super late with this, it doesn't hurt to be extra careful :)
Comment #12
berdirThis is how I believe it should be, like other comments, it should only add linebreaks when the next word would be over 80 characters and mostly we finish it with .. instead. A little bit strange here as it's then always just the Use on the same line but so be it.
Edit: great, managed to upload it twice.
Comment #13
berdirComment #14
plachInterdiff looks good to me
Comment #15
berdirLets say we've reviewed each others changes then, I just change those comments, so setting back to RTBC which it already was before by @jibran.
Comment #16
jibranYup, RTBC +1, the latest changes look good as well.
Comment #18
catchHad to resolve a minor merge conflict and a couple of coding style issues on commit to 9.0.x - which I've already pushed. But this doesn't apply to 8.9.x any more either, so needs a re-roll there.
Comment #19
jibranHere you go.
Comment #22
catchCommitted/pushed to 8.8.x and 8.8.x, thanks!
Comment #23
plachFixed typo in the IS
Comment #24
xjmI think this broke 9.0.x HEAD -- no test runs back there against 9.0.x.
https://www.drupal.org/pift-ci-job/1474419
Comment #25
catchReverted against 9.0.x (but left in 8.8.x and 8.9.x that had proper test runs).
Comment #27
jibranHere is the reroll.
Comment #29
ravi.shankar commentedHere I have tried to re-roll the patch.
Comment #31
berdirTook me a moment to understand this. These workspaces kernel tests were interacting with the path_aliases services without enabling the module. We didn't notice this in 8.x due to the BC in KernelTestBase that always enables it.
The interdiff should probably also be backported to 8.x branches for consistency?
(3094292-31-workspaces-path-alias.patch both the interdiff and the patch for D8)
Comment #33
berdirTwo more kernel test that need path_alias. Since this was hold back from 9.0.x, I'm actually wondering if we don't want to move forward here and just commit a patch that updates the code without BC? We just have to remove the BC layer & tests again anyway?
Comment #34
berdirHere's a version for 9.0.x without the BC layer and legacy tests. The existing parts we can remove in #3092090: Remove legacy Path Alias subsystem. Thoughts? That's a bunch of classes that we don't have to touch again, at least not until we actually make the module optional.
Comment #35
plachMakes sense to me :)
Comment #39
catchMakes sense to skip adding the bc layer to 9.x only to take it away again and avoid relying on the bc layer in 8.x. Committed/pushed to 9.0.x/8.9.x/8.8.x, thanks!
Comment #44
xjmThis introduced test failures on PHP 7.0 so I've reverted it. I initially considered leaving it in 9.0 since it requires PHP 7.2 and is therefore not affected, but that would risk the 8.9 commit diverging from the 9.0 one which we don't want.
Per @larowlan:
Comment #45
larowlanComment #46
berdir> I initially considered leaving it in 9.0 since it requires PHP 7.2 and is therefore not affected, but that would risk the 8.9 commit diverging from the 9.0 one which we don't want.
The test that fails was not added to 9.0.x because it's only a legacy test for BC. So IMHO, for 9.0.x, #34 is still the patch that should be committed (again). Wouldn't have been necessary to revert there, but I see how this issue is becoming very confusing.
Also, for 8.8.x, only the follow-up commit for test consistency from #33 was reverted, which will not actually fix the test fails. As I said, this issue is a mess :-/
I actually don't have PHP 7.0, but my understanding is that this should work then. It does on 7.2. Note that the ? .. : check is necessary because we check with isset() below and (string) $type is an empty string.
Also, for consistency, again re-uploading the 9.0.x patch from #34.(which was actually named 33, I changed that but it's the same patch)
Comment #50
xjmSharp eyes, @Berdir. The two commits have the same title and were separated from each other in the log by other commits. I've reverted the earlier one now... 🤞
Comment #51
xjmOK another problem here is that there were no PHP 7.0 environments tested on commit. I think maybe I set it up that way thinking that PHP 7.0 is EOL, but it meant that we didn't know for days that it was broken -- only when I started reading my work email on a Sunday night. 🙄I've changed that so the 7.0 environment is tested on commit. We should probably leave it that way until EOL.
Comment #52
xjmOops, xposted status.
Comment #53
berdirAww, I was hoping we wouldn't have to do that, testbot is broken anyway right now :)
But fine, for 8.x, we now need a combined patch of the two commits against 8.8.x + the interdiff from #46, will do that later today if nobody beats me to it.
Comment #54
jibranOn it.
Comment #55
jibranHere we go.
Comment #56
jibran@xjm is https://www.drupal.org/commitlog/commit/2/1a3aa31f31b6f191bfd896732a9135... a mistake?
Comment #58
berdirAs discussed in slack, the revert of the revert in 9.0.x was not a mistake, per #46, the 7.0 bug exists in the legacy test for the BC layer that we did not commit to 9.0.x.
For the same reason, "3094292-55-9.0.x.patch" in comment #55 is the direct port of the D8 patch in the same comment, but we should commit "3094292-34-no-bc.patch" from #46 to 9.0.x.
It's probably cleaner to just to a regular commit of that again instead of reverting the revert of the revert of the revert :p
I did verify that the 8.8.x patch does what it should by comparing it against the commit before the revert-dance started:
So the only differences are the actual PHP 7.0 fix, whitespace fixes in the deprecation messages (which is again for code that doesn't need to be in 9.0.x) and that missing trailing comma for the module list in that one test, that can maybe be fixed on commit?
Comment #60
catchCommitted/pushed to 9.0.x/8.9.x/8.8.x, hopefully for the last time ;) Thanks everyone!
Comment #63
xjm🥁