Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
2x: The \Drupal\Core\Path\AliasManager class is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Instead, use \Drupal\path_alias\AliasManager. See https://drupal.org/node/3092086
2x in ConditionsFormTest::testConditionsFormWidgets from Drupal\Tests\rules\Functional
Change record The Path Alias core subsystem has been moved to the "path_alias" module
Comments
Comment #2
TR CreditAttribution: TR commentedI'm going to postpone this because it's going to be a long time before we can do this. I'll re-open it ~1 month ahead of time so that we can work on a patch at that time.
Comment #3
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedOK, yes that's fine. I started to look at it, as those were the two new tests I wrote. I was concerned that I had introduced some deprecated code, but could not discover where I went wrong. It is also odd that the Actions and Conditions tests behave differently, so maybe that is an indication that the problem was further down in Core and not me adding new deprecated code.
Comment #4
TR CreditAttribution: TR commentedYou could still roll a patch for this, so it's ready to go for June. But we can't commit it until then.
Comment #5
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedAfter posting, I realised that the deprecations were nothing to do with how I had written then tests, but that these tests are now showing the use of the deprecated code in the four actions that involve aliases:
and the two conditions:
I may work on a patch, but not just yet as it is not top priotity. So anyone else is welcome to pick this up if they want to, just assign the issue to yourself when doing so, to avoid us duplicating effort.
Comment #6
TR CreditAttribution: TR commentedI removed the AliasStorage changes from this issue because that's really part of #3088489: Path aliases have been converted to revisionable entities, fix when Drupal 8.8 becomes the lowest supported version and the change record cited there.
This issue should just be about the change record The Path Alias core subsystem has been moved to the "path_alias" module
Comment #7
TR CreditAttribution: TR commentedHere's a patch that will only work in D8.8+. It's pretty simple.
Comment #8
TR CreditAttribution: TR commentedThat worked, but it's hard to tell if those are all the changes necessary because the testbot doesn't show the deprecations.
Comment #9
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedI have tested patch #7 locally and on Travis and can confirm that you have sucessfully removed
2x: The \Drupal\Core\Path\AliasManager class is deprecated in drupal:8.8.0
and as expected, we still have the
4x: \Drupal\Core\Path\AliasStorage is deprecated in drupal:8.8.0
If you want to run tests on d.o. and show deprecations you can add this change from #3089502-24: [meta] Rules deprecated code into your patch file. The output is long and not especially readable (it is summarised when I run tests locally and on Travis) but if you know what deprecation message you are looking for it can be searched for easily. It will cause the test to fail though, so need to run again without it to get a green.
Comment #10
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedWe can now start planning on dropping core 8.7 support so un-postponing this. Let's start with an easy one. Patch in #7 still applies, but re-testing just to make sure all is OK.
Comment #11
TR CreditAttribution: TR commentedSee my comment in #3137977-4: Replace assertInternalType() calls with dedicated methods when Drupal 8.8 becomes the lowest supported version
Yes, un-postponing is fine but I need to make a new release before committing this.
Comment #12
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedThanks for pointing me to that issue. Good plan for final 8.7 release before any more of this deprecation work.
I'll help with anything I can do, but also I will hold of un-postponing these issues, as you have already said you are not working on this module first. It would have been so helpful if DA had given us some separation between 8.7 being unsupported and D9 being released.
Comment #13
TR CreditAttribution: TR commentedAgree 100%. Even a week would have made a huge difference.
Comment #15
TR CreditAttribution: TR commentedRetested and committed.
Comment #16
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedThanks. I will update my Travis repo and check the deprecation count and messages. Will probably have to adjust the allowed count upwards, now that we have lots of new tests :-)