Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rakesh.gectcr created an issue. See original summary.

DamienMcKenna’s picture

Please provide a link to some documentation on what we should add. Thanks.

DamienMcKenna’s picture

Category: Support request » Feature request
rakesh.gectcr’s picture

rakesh.gectcr’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 4: composer.json_.patch, failed testing.

DamienMcKenna’s picture

@rakesh.gectcr: The patch is empty - did you need to do "git diff HEAD" instead of "git diff"?

rakesh.gectcr’s picture

Assigned: Unassigned » rakesh.gectcr
rakesh.gectcr’s picture

rakesh.gectcr’s picture

Assigned: rakesh.gectcr » Unassigned
Status: Needs work » Needs review

The last submitted patch, 4: composer.json_.patch, failed testing.

DamienMcKenna’s picture

DamienMcKenna’s picture

I just need someone to confirm the accuracy of the file, then I'll commit it.

jaxxed’s picture

@DamienMcKenna : A good place to look at for the accuracy question is here: https://packagist.drupal-composer.org/

There you can see some requirements for contents of the file in order to get "drupal builds by composer" to work with the module.

For a complete file schema breakdown look here: https://getcomposer.org/doc/04-schema.md

----------------------------------------------------------

As you can see, the patch provided has a starting base. Take a look at the layout plugin for a comparison:

{
      "name": "drupal/layout_plugin",
      "description": "An API module to hold the Drupal 8 plugin manager for layouts.",
      "type": "drupal-module",
      "license": "GPL-2.0+",
      "keywords": ["php", "layout"],
      "homepage": "https://www.drupal.org/project/layout_plugin",
      "minimum-stability": "dev",
      "authors": [
        {
          "name": "David Snopek"
        },
        {
          "name": "Bram Goffings"
        },
        {
          "name": "Fredrik Lassen"
        }
      ],
      "require": { }
    }

I recommend that you also include in this file:

- homepage
- authors
- the minimum stability : dev (while it is not in a stable release) : this has a functional impact on composer!

[edit: removed recommendation for "type:" which I realized is in the existing patch]

jaxxed’s picture

Issue summary: View changes
jaxxed’s picture

Status: Needs review » Reviewed & tested by the community

this patch meets the minimum requirements for being usefull. It could use some additional optional stuff.

The last submitted patch, 4: composer.json_.patch, failed testing.

The last submitted patch, 4: composer.json_.patch, failed testing.

The last submitted patch, 4: composer.json_.patch, failed testing.

The last submitted patch, 4: composer.json_.patch, failed testing.

The last submitted patch, 4: composer.json_.patch, failed testing.

  • DamienMcKenna committed 50b8c92 on 8.x-1.x
    Issue #2572469 by rakesh.gectcr, DamienMcKenna, jaxxed, timmillwood:...
DamienMcKenna’s picture

Status: Reviewed & tested by the community » Fixed

@jaxxed: Thanks for the tips!

Committed.

rakesh.gectcr’s picture

Berdir’s picture

Category: Feature request » Bug report
Priority: Normal » Major
Status: Fixed » Active

Re-opening this, the json is not valid and breaks composer_manager and therefore http://d8status.md-systems.ch.

There must not be a , after the second author.

platinum1’s picture

@Berdir is correct. The json file indeed breaks composer_manager and therefore brings down the site when composer drupal-update is run again to update the dependencies.

The following composer.json file does work:

{
    "name": "drupal/metatag",
    "type": "drupal-module",
    "description": "Manage meta tags for all entities.",
    "homepage": "http://drupal.org/project/metatag",
    "license": "GPL-2.0",
    "authors": [
        {
            "name": "See contributors",
            "homepage": "https://www.drupal.org/node/640498/committers",
            "role": "Developer"
        }
    ],
    "support": {
        "issues": "http://drupal.org/project/issues/metatag"
    }
}
rakesh.gectcr’s picture

@Berdir and platinum1,

I have updated the changes according to the above comments

platinum1’s picture

@rakesh.gectcr,

I would suggest adding "metatag" and "meta tag" to the keywords, but functionally it won't make a difference.

DamienMcKenna’s picture

Berdir’s picture

I don't really know about the other changes, as a minimal fix, you'd just need to remove the trailing , after the second author. Can't comment on the other changes.

Btw, I've updated my d8status script for now to kill the metatag composer.json until this is fixed.

  • DamienMcKenna committed 50ca543 on 8.x-1.x authored by Berdir
    Issue #2572469 by Berdir, platinum1, rakesh.gectcr, DamienMcKenna: Fixed...
DamienMcKenna’s picture

Status: Needs review » Fixed

Committed.

Would it be worth doing a beta2 release to fix this?

platinum1’s picture

As Beta1 breaks composer_manager, I would say yes. Otherwise users new to metatag, who pick the recommended Beta1 release, end up with a broken site.

DamienMcKenna’s picture

Ok, going to do this and another issue in a new beta2.

DamienMcKenna’s picture

I've just released 1.0-beta2, give it a few minutes and it'll be ready.

DamienMcKenna’s picture

I added a new issue to write some tests to help make sure we (cough) don't break the file again: #2621520: Add a test to confirm the composer file is in the correct format

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.