the .info files should have a line to list modules with which the module conflicts with. that way if you have two modules that perform the same function and step on one another, they could be marked that way. The module admin page could tell you that you are enabling conflicting modules, and of course tell you that they conflict before you enable them.

Comments

sime’s picture

Version:5.0-beta1» x.y.z

sorry, 5.0 is closed for feature requests

coreb’s picture

Version:x.y.z» 6.x-dev

moving from x.y.z to 6.x-dev version queue

fax8’s picture

+1 for this. I would use if available in my video module.

Fabio Varesano

suydam’s picture

What ever came of this? I'm working on a pricing level module that directly conflicts with Role Discounts. I'd love to be able to say that in my .info file.

ntroutman’s picture

I would like this functionality to, mainly to prevent namespace conflicts.

xolotl’s picture

+1 For example, the 5.x cck date field conflicts with the 5.x event module, with this feature, one could be prevented from installing the cck date module until the event module was disabled.

ugerhard’s picture

Version:6.x-dev» 7.x-dev
lilou’s picture

fgm’s picture

Marked #170424: .info file should support negative dependencies as a duplicate of this issue.

fgm’s picture

While we're at the "dependencies feature" stage, it would also be nice to have a way to indicate when a module does not actually "need" an other module, but has added features when it is present. This would remove a burden from contrib module devs who need to add specific code for this to their module, while a core mechanism could allow refactoring all this contrib-specific code to just one standard way of having such optional dependencies expressed.

babbage’s picture

Subscribing.

Dave Reid’s picture

doq’s picture

Subscribing.

voxpelli’s picture

Added a patch to the issue mentioned in #12, #328932-66: Modules and partial dependencies - enhances[] and enhancedby[] field in modules' .info.yml files, which could be built upon to solve this issue. If that issue develops in the direction of my patches then this issue perhaps should be postponed until that issue has been solved.

sun.core’s picture

Version:7.x-dev» 8.x-dev
arshadcn’s picture

subscribing

I think modules like admin_menu vs toolbar would benefit from this implementation

lpalgarvio’s picture

Title:Modules in conflict - conflicts[], breaks[], brokenby[] field in modules .info file» module .info files should have a field for conflicts
Component:system.module» base system
Issue tags:-conflict, -.info file, -.info, -conflicts

we need these:
* conflicts[] - module(s) that can NOT be enabled when enabling this module (ERROR)
* breaks[] - module(s) that will NOT work after enabling this module (WARNING)
* brokenby[] - module(s) that will make this module NOT work after being enabled (WARNING)

see:
#328932-153: Modules and partial dependencies - enhances[] and enhancedby[] field in modules' .info.yml files
#328932-139: Modules and partial dependencies - enhances[] and enhancedby[] field in modules' .info.yml files
#328932: Modules and partial dependencies - enhances[] and enhancedby[] field in modules' .info.yml files

lpalgarvio’s picture

Title:module .info files should have a field for conflicts» Modules in conflict - conflicts[] and breaks[] field in modules .info file
Component:base system» system.module
Issue tags:+conflict, +.info file, +.info, +conflicts
lpalgarvio’s picture

Title:Modules in conflict - conflicts[] and breaks[] field in modules .info file» Modules in conflict - conflicts[], breaks[], brokenby[] field in modules .info file

actually, we should use brokenby[] instead of breakedby[].

english lessons reminded me of broke/broken and simple past and past participle, so i read a bit to make sure:
http://en.wiktionary.org/wiki/break
http://en.wiktionary.org/wiki/breaks
http://en.wiktionary.org/wiki/broke
http://en.wiktionary.org/wiki/broken
http://en.wiktionary.org/wiki/enhance
http://en.wiktionary.org/wiki/replace

cafuego’s picture

Title:module .info files should have a field for conflicts» Modules in conflict - conflicts[], breaks[], brokenby[] field in modules .info file
Component:base system» system.module
Issue tags:+conflict, +.info file, +.info, +conflicts

This has been open for half a decade and seems very useful. Can we get this into D8?

Andre-B’s picture

maybe d9 it will be :(

DarrellDuane’s picture

Issue summary:View changes

I think this is a better solution, and it could be implemented for d7 now, maybe even d6:

https://www.drupal.org/node/2478351

I am thinking it would be a very nice feature for each project listed on Drupal.org to have the ability to add a list of other projects that the given project conflicts with. This is a new solution to the problem noted above.

By maintaining this information on Drupal.org, rather than in .info files we can better track issues and allow Drupal Core to get the latest updates about problems and fixes to problems related to conflicts with another project/module. I know that there could be some themes that have conflicts with modules.

One way to do this would be to add another field on the issue tracker for the listing of a conflicting project. From here, details about what the bug is and whether its something that can be fixed, and a level of severity would be good to have. Another way to do it is to have an entirely new field for the project to add conflicting projects, and at that time also add any issues that have more details about the conflict. I'd suggest the former. If we do the former, I expect we will have some issued as won't fix.

It would be nice to get a quick report of conflicts with other projects, such that we might quickly identify other modules with similar functionality.

It would be nice to make an API to read this data from Drupal.org so that when someone enables two modules that conflict, a message can appear on the module page or elsewhere notifying the administrator and allowing them to quickly research the concern.

Thanks for your consideration, let me know how I can help with this.

fgm’s picture

As an interesting side effect of maintaining the info on d.o. instead of within each project, the info could be included in releases packaged by the distribution system, like other extensions to the *.info[.yml] files.