Skip to main content
added 355 characters in body
Source Link
Kubrt
  • 61
  • 5

I'm trying to manage a Drupal 8 site entirely with composer. However, I need a -dev version of one module (search_api_solr) with a patch. How do I tell composer to just leave this module on the dev version for the time being and not touch it during update ?

Relevant part of my composer.json looks like this

"require": {
        "composer/installers": "^1.0.21",
        "drupal-composer/drupal-scaffold": "dev-master",
        "drupal/admin_toolbar": "^1.18",
        "drupal/bootstrap": "^3.2",
        "drupal/coffee": "^1.0@beta",
        "drupal/config_tools": "^1.0@alpha",
        "drupal/console": "~1.0",
        "drupal/core": "~8.2",
        "drupal/delete_all": "^1.0@alpha",
        "drupal/devel": "^1.0@RC",
        "drupal/facets": "^1.0@alpha",
        "drupal/imce": "^1.5",
        "drupal/masquerade": "^2.0@beta",
        "drupal/migrate_manifest": "^1.4",
        "drupal/migrate_plus": "^3.0@beta",
        "drupal/migrate_tools": "^3.0@beta",
        "drupal/migrate_upgrade": "^2.0",
        "drupal/pathauto": "^1.0@RC",
        "drupal/search_api": "1.0@beta",
        "drupal/search_api_sorts": "^1.0@alpha",
        "wikimedia/composer-merge-plugin": "~1.3",
        "drupal/search_api_solr": "8.x-1.x-dev"
    },
    "minimum-stability": "dev",
    "prefer-stable": true, 

I've specified the search_api_solr version according to this advice. However, when I run composer update I get:

Your requirements could not be resolved to an installable set of packages. The requested package drupal/search_api_solr 8.x-1.x-dev exists as drupal/search_api_solr[...] but these are rejected by your constraint.

EDIT: Meanwhile I have worked around this by removing the drupal/search_api_solr requirement completely from the composer.json, explicitly listing solarium/solarium instead and installing the patched version of search_api_solr-8.x-1.x-dev manually into the modules/unstable directory. Now composer update works as it shold without overwriting the patch.

I'm trying to manage a Drupal 8 site entirely with composer. However, I need a -dev version of one module (search_api_solr) with a patch. How do I tell composer to just leave this module on the dev version for the time being and not touch it during update ?

Relevant part of my composer.json looks like this

"require": {
        "composer/installers": "^1.0.21",
        "drupal-composer/drupal-scaffold": "dev-master",
        "drupal/admin_toolbar": "^1.18",
        "drupal/bootstrap": "^3.2",
        "drupal/coffee": "^1.0@beta",
        "drupal/config_tools": "^1.0@alpha",
        "drupal/console": "~1.0",
        "drupal/core": "~8.2",
        "drupal/delete_all": "^1.0@alpha",
        "drupal/devel": "^1.0@RC",
        "drupal/facets": "^1.0@alpha",
        "drupal/imce": "^1.5",
        "drupal/masquerade": "^2.0@beta",
        "drupal/migrate_manifest": "^1.4",
        "drupal/migrate_plus": "^3.0@beta",
        "drupal/migrate_tools": "^3.0@beta",
        "drupal/migrate_upgrade": "^2.0",
        "drupal/pathauto": "^1.0@RC",
        "drupal/search_api": "1.0@beta",
        "drupal/search_api_sorts": "^1.0@alpha",
        "wikimedia/composer-merge-plugin": "~1.3",
        "drupal/search_api_solr": "8.x-1.x-dev"
    },
    "minimum-stability": "dev",
    "prefer-stable": true, 

I've specified the search_api_solr version according to this advice. However, when I run composer update I get:

Your requirements could not be resolved to an installable set of packages. The requested package drupal/search_api_solr 8.x-1.x-dev exists as drupal/search_api_solr[...] but these are rejected by your constraint.

I'm trying to manage a Drupal 8 site entirely with composer. However, I need a -dev version of one module (search_api_solr) with a patch. How do I tell composer to just leave this module on the dev version for the time being and not touch it during update ?

Relevant part of my composer.json looks like this

"require": {
        "composer/installers": "^1.0.21",
        "drupal-composer/drupal-scaffold": "dev-master",
        "drupal/admin_toolbar": "^1.18",
        "drupal/bootstrap": "^3.2",
        "drupal/coffee": "^1.0@beta",
        "drupal/config_tools": "^1.0@alpha",
        "drupal/console": "~1.0",
        "drupal/core": "~8.2",
        "drupal/delete_all": "^1.0@alpha",
        "drupal/devel": "^1.0@RC",
        "drupal/facets": "^1.0@alpha",
        "drupal/imce": "^1.5",
        "drupal/masquerade": "^2.0@beta",
        "drupal/migrate_manifest": "^1.4",
        "drupal/migrate_plus": "^3.0@beta",
        "drupal/migrate_tools": "^3.0@beta",
        "drupal/migrate_upgrade": "^2.0",
        "drupal/pathauto": "^1.0@RC",
        "drupal/search_api": "1.0@beta",
        "drupal/search_api_sorts": "^1.0@alpha",
        "wikimedia/composer-merge-plugin": "~1.3",
        "drupal/search_api_solr": "8.x-1.x-dev"
    },
    "minimum-stability": "dev",
    "prefer-stable": true, 

I've specified the search_api_solr version according to this advice. However, when I run composer update I get:

Your requirements could not be resolved to an installable set of packages. The requested package drupal/search_api_solr 8.x-1.x-dev exists as drupal/search_api_solr[...] but these are rejected by your constraint.

EDIT: Meanwhile I have worked around this by removing the drupal/search_api_solr requirement completely from the composer.json, explicitly listing solarium/solarium instead and installing the patched version of search_api_solr-8.x-1.x-dev manually into the modules/unstable directory. Now composer update works as it shold without overwriting the patch.

Source Link
Kubrt
  • 61
  • 5

How to keep a specific module on -dev version (with patches) on a Drupal8 site managed by composer?

I'm trying to manage a Drupal 8 site entirely with composer. However, I need a -dev version of one module (search_api_solr) with a patch. How do I tell composer to just leave this module on the dev version for the time being and not touch it during update ?

Relevant part of my composer.json looks like this

"require": {
        "composer/installers": "^1.0.21",
        "drupal-composer/drupal-scaffold": "dev-master",
        "drupal/admin_toolbar": "^1.18",
        "drupal/bootstrap": "^3.2",
        "drupal/coffee": "^1.0@beta",
        "drupal/config_tools": "^1.0@alpha",
        "drupal/console": "~1.0",
        "drupal/core": "~8.2",
        "drupal/delete_all": "^1.0@alpha",
        "drupal/devel": "^1.0@RC",
        "drupal/facets": "^1.0@alpha",
        "drupal/imce": "^1.5",
        "drupal/masquerade": "^2.0@beta",
        "drupal/migrate_manifest": "^1.4",
        "drupal/migrate_plus": "^3.0@beta",
        "drupal/migrate_tools": "^3.0@beta",
        "drupal/migrate_upgrade": "^2.0",
        "drupal/pathauto": "^1.0@RC",
        "drupal/search_api": "1.0@beta",
        "drupal/search_api_sorts": "^1.0@alpha",
        "wikimedia/composer-merge-plugin": "~1.3",
        "drupal/search_api_solr": "8.x-1.x-dev"
    },
    "minimum-stability": "dev",
    "prefer-stable": true, 

I've specified the search_api_solr version according to this advice. However, when I run composer update I get:

Your requirements could not be resolved to an installable set of packages. The requested package drupal/search_api_solr 8.x-1.x-dev exists as drupal/search_api_solr[...] but these are rejected by your constraint.