Problem/Motivation

There is no composer.json file found in module. Please see https://www.drupal.org/node/2514612

Proposed resolution

Add the composer.json file.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

rakesh.gectcr created an issue. See original summary.

rakesh.gectcr’s picture

Status: Active » Needs review
StatusFileSize
new1.17 KB
jmuzz’s picture

Status: Needs review » Needs work

This mostly looks good but I don't think the branch-alias is correct and I'm not sure it's needed. There's no 8.1.x branch of entity_reference_revisions . Version numbers like that are just for core as far as I know.

I could be wrong, but after reading https://getcomposer.org/doc/articles/aliases.md and looking for other examples of branch-alias being used in Drupal projects I'm thinking the extras part should be removed. If you are sure about it, could you please explain what "dev-8.x-1.x": "8.1.x-dev" will do?

rakesh.gectcr’s picture

Status: Needs work » Needs review
StatusFileSize
new1.11 KB
new218 bytes

@jmuzz

I am totally agreeing with you. Removed the extra part. Please review the attached patch and inter diff

jmuzz’s picture

Status: Needs review » Needs work

I'm glad we agree.

It would be cleaner if the require and extra lines are removed altogether. That would probably give it the best chance of being committed.

miro_dietiker’s picture

How can we test that this file does its job for composer without committing it?
I also already accidentally committed composer.json files that were invalid.

Similarly, please help complete the one for Paragraphs.
#2677436: Add composer.json to file module

harsha012’s picture

Assigned: rakesh.gectcr » Unassigned
Status: Needs work » Needs review
StatusFileSize
new1.1 KB

Added patch as per comment #5

rakesh.gectcr’s picture

@harsha012

Please provide the interdiff file also

harsha012’s picture

StatusFileSize
new654 bytes

hi @rakesh.gectcr,

added the interdiff #7 patch

idebr’s picture

Status: Needs review » Needs work

#6 There is currently no way to test composer.json files prior to commit.

  1. +++ b/composer.json
    @@ -0,0 +1,30 @@
    +      "homepage": "https://www.drupal.org/u/jeroen.b",
    ...
    +      "homepage": "https://www.drupal.org/u/miro_dietiker",
    ...
    +      "homepage": "https://www.drupal.org/node/2411903/committers",
    ...
    +    "issues": "http://drupal.org/project/issues/entity_reference_revisions",
    ...
    +    "source": "http://cgit.drupalcode.org/entity_reference_revisions"
    

    The URLs are currently a mixed bag of http and https. Let's consistently refer to https, since drupal.org redirects all traffic to these URLs.

  2. +++ b/composer.json
    @@ -0,0 +1,30 @@
    \ No newline at end of file
    

    Missing newline at end of file