composer-drupal-lenient
                                
                                
                                
                                    composer-drupal-lenient copied to clipboard
                            
                            
                            
                        How can I bypass the module’s composer requirements?
Even after I added drupal/commerce_country_store to drupal-lenient allowed-list, it still gives,
Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - drupal/commerce_country_store dev-1.x requires drupal/geoip ~2.0 -> found drupal/geoip[dev-2.x, 2.0.0-beta1, 2.x-dev (alias of dev-2.x)] but it conflicts with your root composer.json require (3.0.x-dev@dev).
The module's composer.json
{
    "name": "drupal/commerce_country_store",
    "type": "drupal-module",
    "description": "Enable having one store per country in Drupal Commerce",
    "homepage": "http://drupal.org/project/commerce_country_store",
    "license": "GPL-2.0+",
    "authors": [
        {
            "name": "Florian Loretan",
            "email": "[email protected]"
        }
    ],
    "require": {
        "drupal/commerce": "~2.0",
        "drupal/geoip": "~2.0"
    }
}
I'll continue with the custom repo but if this lenient extension would be capable of bypassing these too, that would be great @mglaman but I still use yours because it just works fine and is great with the Drupal modules' version dependencies.
I am not sure if this will help in your case, but I was able to work around a similar sounding issue by using an inline alias
https://getcomposer.org/doc/articles/aliases.md#require-inline-alias
Specifically I used
"drupal/jquery_ui_accordion": "2.0 as 1.1"
which let me install drupal/accordion_menus
Yes that workaround fixes but it would be good without any workaround.
Look at your errors. Has nothing to do with this package.
Your root package requires geoip 3 and the other module requires 2.
This package is only for Drupal core.
I see @mglaman I just feature requested. Or do you know a similar package for that purpose to bypass composer requirements too?
Oh, sorry. I thought this was a bug report. I would be afraid to extend this package that way. Especially since Composer does have a workaround as commented.
I actually would like, if it's possible, to reconsider using such a plugin for modules as well.
My current situation:
- I have a site with https://www.drupal.org/project/ief_table_view_mode v2.3.0 which locks ief to 1.0
 - There's https://www.drupal.org/project/ief_table_view_mode/issues/3410575 which is not committed
 
I know I could make "drupal/inline_entity_form": "3.0.0-rc19 as 1.0", which I am doing, however this means that I have to manually edit the alias each time a new version for inline_entity_form appears and makes everything counterintuitive.
So such a feature would definitely be welcome for such cases and others.
I won't close this, but I won't set aside time to work on it. I'll welcome the idea if someone puts up a pull request. However, it's bending the purpose of this plugin. The purpose is for drupal/core leniency.