- Merge request !19Issue #3210947: Remove dependency on jquery_ui_slider → (Closed) created by joegraduate
- 🇮🇳India libbna New Delhi, India
I have added this patch in my composer.json file and when I run this command `composer require 'drupal/jquery_ui_slider:^2.0'` it is still showing errors
Problem 1
- Root composer.json requires drupal/jquery_ui_slider ^2.0, found drupal/jquery_ui_slider[dev-2.x, 2.0.0, 2.x-dev] but these were not loaded, likely because it conflicts with another require.
Problem 2
- drupal/better_exposed_filters is locked to version 6.0.2 and an update of this package was not requested.
- drupal/better_exposed_filters 6.0.2 requires drupal/jquery_ui_slider ^1.1 -> found drupal/jquery_ui_slider[dev-1.x, 1.1.0, 1.x-dev (alias of dev-1.x)] but it conflicts with your root composer.json require (^2.0).The BEF module is d10 compatible but I am not able to update the jquery_ui_slider module.
- 🇬🇧United Kingdom pbattino Reading
Why has patch #14 this line:
"drupal/jquery_ui_slider": "*",
Isn't the aim to remove the dependency altogether? - 🇨🇭Switzerland berdir Switzerland
See my comment in #3210946-19: Remove dependency on jquery_ui_touch_punch →
- 🇬🇧United Kingdom pbattino Reading
Thanks for the explanation Bedrir.
At this point I don't understand what the reason is for using a tool like Composer. Shouldn't each package track its dependencies only?
If it's to avoid this:
" This might cause problems if other modules implicitly use without depending on it."
then I would argue we are defeating the purpose of tracking dependencies. It's the other module that is not doing its job.Not to mention that we may make the life harder to users who have a conflict with the no-longer-needed dependency. See the case of the BEF module above. Yes, the * allows for some flexibility but it's still an unnecessary packages added on a fresh install.
I'm not a Composer expert, perhaps I am missing something, please correct me if I'm wrong! Thanks!
- 🇨🇭Switzerland berdir Switzerland
The problem is that composer dependencies are stateless while Drupal is not.
I never talked about other *modules* in my comment. I said sites, that's something else entirely.
If you stop depending on another module with your module, then composer will remove that from sites when they update. However, if you just remove a module from Drupal that is currently installed, then Drupal gets very, very unhappy. and at the same time, you can't uninstall it before you update because then the module still depends on it. It's a chicken/egg problem. They would need to manually require that extra dependency after updating, then uninstall it, then remove it again.
This is a temporary backwards compatibility thing so that sites can update, safely uninstall the module and then it will just be in the filesystem and not hurt anyone. And a future version (e.g. version 7) of this module can then remove that dependency entirely. That's all.
- 🇬🇧United Kingdom pbattino Reading
The quote was from the explanation in https://www.drupal.org/project/pathauto/releases/8.x-1.11 → , linked from your comment.
AH Yes! Now I understand, it's because the no-longer-needed dependency is a Drupal module, if it were a non-drupal package we would not have this problem, I get it.
Thanks! - 🇨🇭Switzerland berdir Switzerland
Ah, right. The thinking there was that pathauto is de-facto installed on every drupal site, which also resulted ctools being installed everywhere, so (custom) modules might have relied on stuff provided by ctools without being aware and properly depending on it.
- First commit to issue fork.
- 🇧🇪Belgium tim-diels Belgium 🇧🇪
I added
connect: true,
to display colored bars between handles. - last update
over 1 year ago 30 pass, 5 fail - last update
over 1 year ago 37 pass - 🇺🇸United States caspervoogt
BEF requires jquery_ui_slider 1.1 which is not D10-compatible. When I try to require the D10-compatible v 2.0.0 of jquery_ui_slider it causeds Composer conflicts. I think BEF's composer.json should require jquery_ui_slider 2.0.0 instead of 1.1, or remove the requirement entirely, because it is preventing updating to D10.
Related issue at https://www.drupal.org/project/better_exposed_filters/issues/3317774#com... 🐛 Dependencies affecting upgrade to v6.0 Needs review
- 🇭🇰Hong Kong yookoala
Please remove the dependency.
drupal/better_exposed_filters 6.0.2 requires drupal/jquery_ui_slider ^1.1, that is not compatible with Drupal 10. This dependency is now blocking my site upgrade. If the dependency is not necessary in the first place, it is only sensible to remove it.
- Status changed to Postponed
8 months ago 11:28pm 10 April 2024 - 🇺🇸United States smustgrave
Going to start a 7.0.x branch for D11 and D10 support think that would be a good time for dropping any dependencies .
- Status changed to Needs work
8 months ago 2:47pm 19 April 2024 - Status changed to Needs review
7 months ago 3:04pm 1 May 2024 - 🇺🇸United States smustgrave
Updated for 6.0.x and added hook to use internal library if available
- 🇮🇳India siddharthjain
I have tested the functionality, there is one concern after switching to this Merge request !72 , the slider value changed to float, earlier with the jquery_ui_slider dependency it was taking the integer. I have added screenshots for reference. Other than this the functionality works fine.
- 🇮🇳India siddharthjain
The above changes looks good, the slider is also working fine. Attaching the screenshot for reference.
-
smustgrave →
committed 2e849a58 on 6.0.x
Resolve #3210947 "Remove slider attempt2"
-
smustgrave →
committed 2e849a58 on 6.0.x
- Status changed to Fixed
7 months ago 3:00pm 22 May 2024 -
smustgrave →
committed 2e849a58 on 7.0.x
Resolve #3210947 "Remove slider attempt2"
-
smustgrave →
committed 2e849a58 on 7.0.x
Automatically closed - issue fixed for 2 weeks with no activity.