Closed EgbertBleyenburg closed 5 years ago
This is my generated composer file
{
"type": "project",
"repositories": {
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/8"
},
"asset-packagist": {
"type": "composer",
"url": "https://asset-packagist.org"
}
},
"require": {
"composer/installers": "^1.2.0",
"cweagans/composer-patches": "^1.6.4",
"oomphinc/composer-installers-extender": "^1.1",
"wikimedia/composer-merge-plugin": "^1.4.1",
"drupal/captcha": "^1.0.0-alpha0",
"drupal/composer_manager": "^1.0.0-rc1",
"drupal/ctools": "^3.0.0-alpha26",
"drupal/devel": "^1.x-dev",
"drupal/ds": "^3.0.0",
"drupal/entity_print": "^1.1.0",
"drupal/entity_reference_revisions": "^1.0.0-rc6",
"drupal/examples": "^1.x-dev",
"drupal/field_group": "^1.0.0-rc4",
"drupal/google_analytics": "^2.1.0",
"drupal/honeypot": "^1.23.0",
"drupal/layout_plugin": "^1.0.0-alpha22",
"drupal/migrate_plus": "^1.0.0-beta1",
"drupal/migrate_tools": "^1.0.0-beta1",
"drupal/migrate_upgrade": "^1.0.0",
"drupal/mollom": "^1.1.0",
"drupal/paragraphs": "^1.0.0-rc4",
"drupal/pathauto": "^1.0.0-alpha3",
"drupal/pdf_api": "^1.x-dev",
"drupal/printable": "^1.x-dev",
"drupal/recaptcha": "^2.0.0",
"drupal/token": "^1.0.0-alpha2",
"drupal/core": "^8.3.2"
},
"require-dev": {},
"extra": {
"enable-patching": true,
"installer-types": [
"bower-asset",
"npm-asset"
],
"installer-paths": {
"drush/contrib/{$name}": [
"type:drupal-drush"
],
"core": [
"type:drupal-core"
],
"modules/contrib/{$name}": [
"type:drupal-module"
],
"modules/custom/{$name}": [
"type:drupal-custom-module"
],
"profiles/contrib/{$name}": [
"type:drupal-profile"
],
"profiles/custom/{$name}": [
"type:drupal-custom-profile"
],
"themes/contrib/{$name}": [
"type:drupal-theme"
],
"themes/custom/{$name}": [
"type:drupal-custom-theme"
],
"libraries/{$name}": [
"type:drupal-library",
"type:bower-asset",
"type:npm-asset"
]
},
"merge-plugin": {
"include": [
"modules/custom/*/composer.json"
],
"replace": false,
"ignore-duplicates": true
},
"patches": {}
},
"minimum-stability": "dev",
"prefer-stable": true
}
Same problem here.
And I get this error during the command:
**Created composer.json
[ErrorException]
Undefined index: version**
This is the gereated composer file:
{
"type": "project",
"repositories": {
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/8"
},
"asset-packagist": {
"type": "composer",
"url": "https://asset-packagist.org"
}
},
"require": {
"composer/installers": "^1.2.0",
"cweagans/composer-patches": "^1.6.4",
"oomphinc/composer-installers-extender": "^1.1",
"wikimedia/composer-merge-plugin": "^1.4.1"
},
"require-dev": {},
"extra": {
"enable-patching": true,
"installer-types": [
"bower-asset",
"npm-asset"
],
"installer-paths": {
"drush/contrib/{$name}": [
"type:drupal-drush"
],
"webroot/core": [
"type:drupal-core"
],
"webroot/modules/contrib/{$name}": [
"type:drupal-module"
],
"webroot/modules/custom/{$name}": [
"type:drupal-custom-module"
],
"webroot/profiles/contrib/{$name}": [
"type:drupal-profile"
],
"webroot/profiles/custom/{$name}": [
"type:drupal-custom-profile"
],
"webroot/themes/contrib/{$name}": [
"type:drupal-theme"
],
"webroot/themes/custom/{$name}": [
"type:drupal-custom-theme"
],
"webroot/libraries/{$name}": [
"type:drupal-library",
"type:bower-asset",
"type:npm-asset"
]
},
"merge-plugin": {
"include": [
"webroot/modules/custom/*/composer.json"
],
"replace": false,
"ignore-duplicates": true
},
"patches": {}
},
"minimum-stability": "dev",
"prefer-stable": true
}
@handkerchief333 that happened to me as well. In my case I had a module I was developing and on its .info.yml file I didn't have version entry. After I've added that, it worked. Be advised that if this module is on Drupal.org and you're working on code changes, you'll lost it because composerize will download the version from drupal.org.
@rfsbsb Ok thanks. I have now chosen another variant, has worked well: https://www.drupal.org/forum/support/installing-drupal/2018-04-08/how-switch-to-composer-installation#comment-12562576
It's not clear to me that this is actually an issue with https://github.com/grasmash/composerize-drupal. The generated composer.json looks correct. @handkerchief333 is this problem not present after using a different solution?
@grasmash No. After the other solution it works really well. But I had to "require" all projects that I had already installed.
I think this was resolved in https://github.com/grasmash/composerize-drupal/commit/0fdd38ffee99373ceb32df91c9c8f5e4106b1c68
After being able to create a composer.json from an installed d8 siet (using https://github.com/grasmash/composerize-drupal/issues/3 ) everything seems fine, but running
composer outdated 'drupal/*'
Which should give me the list of outdated projects, this gives me nothing, while the UI reports gives me a list of modules (and core) to upgrade.
composer outdated
gives me a large list but without any drupal modules