Closed (works as designed)
Project:
Ban
Version:
1.0.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Mar 2026 at 11:48 UTC
Updated:
17 Mar 2026 at 10:26 UTC
Jump to comment: Most recent
Existing modules that require Drupal core ban (Drupal 10) now will find Drupal ban 1.0 as a Drupal 11 module thus failing on composer.
Comments
Comment #2
pcambraWorkaround for sites rn would be to add this to their composer.json replace, I think:
Comment #3
pcambraComment #4
mstrelan commentedWhat version constraint do these modules have?
Comment #5
anybodyFYI: Tugboat would need a composer.json to work as expected: #3578788: Add composer.json & tugboat support for easier manual review and testing in issues (Slightly off-topic but related, if we introduce one)
Comment #6
mstrelan commentedI think this works as designed. If you want to support 10 and 11 in the same release then use core ban. Otherwise bump the minimum to 11 and use contrib. If the other maintainers want to provide 10.x support they could do that in 1.1.0 but since the subtree split was from 11 that is untested.
Comment #7
sardis commentedWe have the same problem with https://www.drupal.org/project/suspect_blocker module. It requires core ban module:
But the problem is that packagist applies dependency on contrib drupal/ban and if you run
composer show drupal/suspect_blocker -a, you can see it:This basically prevents us from installing the module on D10 or D11 for that matter:
I'm not sure if this is the issue for Ban module or Packagist. The fix, suggested by @pcambra, does help out.
Comment #8
grevil commented@sardis that's on https://www.drupal.org/project/suspect_blocker.
You should create a dedicated Drupal 10 release which doesn't require the ban module in the composer.json and only requires the ban (core) module in the info.yml.
Then create another D11 release, which requires ban (contrib) in the composer and info file.
"replace" won't do aynthing here, since ban (contrib) only supports D11.
Comment #10
mstrelan commentedI don't think #8 is accurate, there is no composer dependency on drupal/ban in the source of suspect_blocker. Most likely the composer facade is adding the dependency. I think the outcome is still the same though unfortunately.
Comment #11
pcambraComment #12
grevil commented@mstrelan, seems I missread the composer.json, but yea same outcome. Explicit dependency on "drupal/ban" for the D11 version and explicitly removing the "replace" section and NOT requiring "drupal/ban" for the D10 version should fix the issue.
Unsure why this was reopened? Not much we can do here.
Comment #13
sardis commentedThanks for your suggestions, guys! Will try it out and come back if they don't work.