The core: 8.x key in the .info.yml file in this module and all its dependents does not allow installing on Drupal 9.0.x.

Is it possible/foreseen to allow installing on that version too adding a core_version_requirement: ^8.8 || ^9 key?

Comments

mondrake created an issue. See original summary.

gnanagowthaman sankar’s picture

Hi @mondrake,

Here by i attached the patch file. Please let me know for any changes.

Thanks & Regards,
Gnanagowthaman Sankar

gnanagowthaman sankar’s picture

Here is the patch.

Thanks & Regards,
Gnanagowthaman Sankar

gnanagowthaman sankar’s picture

Status: Active » Needs review
StatusFileSize
new320 bytes

Please ignore the previous.

gnanagowthaman sankar’s picture

StatusFileSize
new303 bytes

Please ignore the previous

andypost’s picture

\ No newline at end of file
Please add nl after this line

berdir’s picture

Status: Needs review » Needs work

A version requirement that requires 8.8 or above can only be added in combination with removing core: 8.x.

mondrake’s picture

@Berdir are you sure? That’s not what the CR says https://www.drupal.org/node/3070687

edit: ah or will just core_version_requirement: ^8 || ^9 do?

berdir’s picture

Yes, that allows to install in on any D8 version. You can see that the example that requires 8.8 has no core key. The lowest version you can require with this is 8.7.7, if you want to e.g. require 8.6, then you need to use^8 + core: 8.x + drupal:system(>8.6) as a dependency.

mondrake’s picture

#9 thanks.

Actually thinking a bit over: what would be the sense of installing this module and its dependents before Drupal 8.8.0? JQuery UI is still fully un-deprecated in D 8.7.

So maybe the patch in #4 is the one in the right direction (just missing the \n at the end)?

mmjvb’s picture

Just for the record: will just core_version_requirement: ^8 || ^9 do?
No, that doesn't allow to install on any D8 version. It would need the core key for that. Without the core key it only allows for 8.7.7 and up to anything 9.

@imclean in #12: Trying to put the answer in #9 in the right context. Just core_version_requirement will do for versions since its introduction, provided they implement the new way. The core key is required for versions that implement the old way.
So, yes just core_version_requirement will do. Which means removing the the core key. No, it won't be allowed on any D8 version, only those implementing the new way. Assuming ^8 || ^9 or more properly in my opinion ^8.7.7 || ^9. Consider ^8 bad because it is introduced in 8.7.7.

imclean’s picture

@mmjvb, isn't that the point though? The jquery_ui contrib module isn't needed in early 8 versions, only in transitioning to Drupal 9. Core jquery.ui is deprecated from 8.8.

Or are you talking about contrib modules in general? This is trickier, perhaps later versions of D8 could ignore "core" if "core_version_requirement" is present.

gnanagowthaman sankar’s picture

Status: Needs work » Needs review
StatusFileSize
new229 bytes
new292 bytes

Hi @All,

Here by i attached the new patch. Please let me know for any changes.

Thanks & Regards,
Gnanagowthaman sankar

berdir’s picture

> Actually thinking a bit over: what would be the sense of installing this module and its dependents before Drupal 8.8.0? JQuery UI is still fully un-deprecated in D 8.7.

One reason could be to make it easier for another module to depend on it without already requiring 8.8 itself. But then IMHO ^8.7.7 as lowest supported version would be enough I think.

The patch is technically correct, now the maintainer needs to decide what to support I'd say.

mondrake’s picture

Status: Needs review » Reviewed & tested by the community

Let’s bring it to the right eyes then, thanks @all

imclean’s picture

@mmjvb I nearly missed your edit, please add a new comment instead of updating an old one with new information or clarification This keeps the flow of the discussion.

So essentially you're agreeing with this approach in this case, I think.

mmjvb’s picture

@imclean Was trying to explain to you what went on. As that is unrelated to the flow od discussion I decided to edit. Sorry to hear you almost missed that.

Haven't got an opinion on the approach taken for this particular project. Just provided an explanation about the core compatibility methods.

zrpnr’s picture

Thanks @mondrake for opening this issue and @Gnanagowthaman sankar for the patch, and everyone else for the discussion around core_version_requirement.

what would be the sense of installing this module and its dependents before Drupal 8.8.0?

I can imagine someone making changes to custom code as part of a larger upgrade that started on an older core version but I agree that replacing jQuery UI libraries won't be a problem to until core is already at 8.8.

With the patch in #13
Below 8.7.7 trying to install gives the error: Missing required keys (core) in modules/jquery_ui/jquery_ui.info.yml
Above 8.7.7 but below 8.8 returns Unable to install modules: module 'jquery_ui' is incompatible with this version of Drupal core.

Both of these messages point a user to the right conclusion, which is to upgrade core first. There wouldn't be any harm in having this module installed before 8.8 but no reason to, either.

Thanks again everyone, I'll get this committed.

zrpnr’s picture

Status: Reviewed & tested by the community » Fixed
mondrake’s picture

Thank you - so we 'only' need to have the same on all the related modules and a new point release for each one to be able to use in D9 supporting contrib/custom modules that require jQueryUI components as dependencies... :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.