Problem/Motivation
8.8.0 moved path aliases to entities in #2336597: Convert path aliases to full featured entities
However pathauto module requires updates accordingly - see #3012050: Prepare for the conversion of path aliases to entities
We should try to prevent people updating to 8.8.0 if they don't also update pathauto. We can do this for composer users. Not sure we can do anything for drush/tarball users - short of a hook_requirements - but I don't think we want to put a contrib module specific hook_requirements in core.
Proposed resolution
Add a conflict entry to composer.json on pathauto versions 8.x-1.4 and below
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Drupal 8.8 requires pathauto versions of 8.x-1.6 or higher (if installed). You should upgrade pathauto first, then update to Drupal 8.8
Comment | File | Size | Author |
---|---|---|---|
#27 | 3085062-27-9.0.x.patch | 2.1 KB | amateescu |
#27 | 3085062-27-8.9.x.patch | 2.1 KB | amateescu |
#27 | 3085062-27-8.8.x.patch | 2.1 KB | amateescu |
#26 | 3085062-26-8.9.x.patch | 1.99 KB | jibran |
#26 | 3085062-26-8.8.x.patch | 1.99 KB | jibran |
Comments
Comment #2
larowlanComment #3
jibranSee #3012050-15: Prepare for the conversion of path aliases to entities
Path auto might support both core versions at the same time.
Comment #4
larowlanRight, but it can't do that retrospectively, you won't get those features without updating to the newer version of pathauto, which is what this patch makes you do. e.g. with this patch you can't update to 8.8.0 unless you update to pathauto 1.5+ at the same time.
Comment #5
jibranThis makes sense to me so setting it to RTBC.
Comment #6
xjmI think we should actually add
hook_requirements()
; we've done this in the past when contrib modules have a conflict with a particular version of core, e.g. when we were first adding Media to core and there were conflicts with the contrib Media Entity API. In that situation we addedhook_requirements()
to both core and the contrib module that prevented you from installing or updating them together.Comment #7
xjmThis should also go in the release notes (or be added to the existing release note about the data model change and pathauto).
Comment #8
catch+1 on adding the hook_requirements(). We can have a 9.x follow-up to remove it again (probably need to keep it in for the remaining lifetime of 8.x though).
Comment #9
jibranWorking on it.
Comment #10
jibranI'm not sure that we need to update composer.lock file for this or not. I ran
composer update --lock
and it did nothing.Comment #11
alexpott@jibran if you do
$ composer update drupal/core
then the lock file gets updated properly. There has been a few core/composer.json updates where the lock file has not been updated correctly.Comment #12
jibranThanks, @alexpott. Here is the new patch. Any suggestion to improve the Englizh in
hook_requirements
?Comment #13
BerdirNote: I just discussed with @amateescu that I plan to do another release *before* we make it 8.8 compatible.
I had planned to then in that release make it incompatible with 8.8, so people who update to that until 8.8.0 comes out are covered (assuming that works in .info.yml, will check).
The problem is that this hardcodes 1.5 and would need to be updated then, and we might even need to do another release until then.
I would suggest to hold off on this until I've done the 1.5 release at least and then decide if this is really necessary. This is not an alpha blocker IMHO.
Comment #14
BerdirAFAIK, the public testing program starts with beta, correct? Because it obviously wouldn't be that useful then before a compatible pathauto release is out, because which site doesn't use that? ;)
Comment #15
larowlanMakes sense, thanks @Berdir
Comment #17
xjmOK I was wondering how it was I didn't have the release note for this -- now I see why.
Despite that alphas are only recommended for developers, we generally want to mitigate any data loss issue in any tagged release, insofar as it is possible.
What's the status of pathauto releases this week?
Comment #18
jibran#3012050: Prepare for the conversion of path aliases to entities is still failing one test.
Comment #19
amateescu CreditAttribution: amateescu for Pfizer, Inc. commented@xjm, we're waiting with the patch that prepares Pathauto for 8.8 to see if #2233595: Deprecate the custom path alias storage can land before the next alpha or beta :)
Comment #20
BerdirI've now released 8.x-1.6-alpha1 that is compatible with Drupal 8.8-alpha1 *and* Drupal 8.7. And I'll probably release that for beta or so. Not sure if you still want to do this, no strong opinion. version description imho says pretty clearly what is supported for 1.5 and 1.6
Comment #21
catchThere's some minor composer.lock cruft in the patch, but also based on Berdir's comment we should declare the conflict on < 1.6
I think this is still worth doing even though sites can update to 1.6 within Drupal 8.7 since they still might not do that before updating core.
Comment #22
jibranUpdated the patch.
Comment #23
catchThis is missing the system_requirements() hunk from #12, but otherwise looks good.
Added a release notes snippet.
Comment #24
jibranUploaded the interdiff instead of patch. :D Here we go again.
Comment #25
jibranAs per https://www.drupal.org/project/pathauto/releases/8.x-1.6-alpha1
is fine.
But we do need to update.
Comment #26
jibranFixed #25 as well.
Comment #27
amateescu CreditAttribution: amateescu for Pfizer, Inc. commentedversion_compare($info['version'], '8.x-1.5') < 0
doesn't catch the case when the Pathauto version is 8.x-1.5. These are all the cases that we need to take into account:So we need to change the comparison to
<=
. Also tweaked the wording a bit and changed the call to the deprecatedsystem_get_info()
function.Comment #28
jibranThanks, it seems legit to me. There is nothing technical in the patch other than what @amateescu explained so setting it RTBC also @catch gave 'looks good' in #23.
Comment #32
catchAdded a change record and committed/pushed to 9.0.x/8.9.x/8.8.x, thanks!
Comment #34
Krzysztof DomańskiI publised Drupal 8.8.0 requires pathauto version 8.x-1.6 or higher if installed and I added to CR:
"Pathauto 8.x-1.6 is compatible with Drupal 8.7 and 8.8. You must update to the latest version of Pathauto before you update to Drupal 8.8.0 or at the same time."
I think the release notes is confusing. It say "you must update to the latest version of Pathauto before you update to Drupal 8.8.0.". It is possible to update both together.