Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add source reference information for merged packages #103

Merged
merged 1 commit into from Apr 22, 2016

Conversation

webflo
Copy link
Contributor

@webflo webflo commented Jan 22, 2016

Attempt to fix #101

@webflo webflo mentioned this pull request Jan 22, 2016
@mikkeschiren
Copy link

Real good work @webflo, seems to work very well, this is my composer.json:

{
    "name": "nodeone/wkse",
    "description": "Installation profile for wkse",
    "type": "drupal-profile",
    "minimum-stability": "dev",
    "repositories": [
      {
      "type": "package",
        "package":
          {
            "name": "md-systems/pathauto",
            "type": "drupal-module",
            "version": "8.1.0",
              "source": {
                "url": "https://github.com/md-systems/pathauto.git",
                "type": "git",
                "reference": "a38509d"
              }
          }
      },
      {
        "type": "composer",
        "url": "https://packagist.drupal-composer.org"
      }
    ],
    "require": {
        "drupal/devel": "dev-8.x-1.x#d913e1d",
        "drupal/config_devel": "dev-8.x-1.x#d4cdd21",
        "md-systems/pathauto": "^8.1",
        "drupal/token": "dev-8.x-1.x#d6cd94f19b053d8b6a411cb8fc5e75112d141d77",
        "drupal/memcache": "8.2.*@dev"
    }

And this was the result:

Updating dependencies (including require-dev)
  - Installing md-systems/pathauto (8.1.0)
    Cloning a38509d

  - Installing drupal/devel (dev-8.x-1.x d913e1d)
    Cloning d913e1d

  - Installing drupal/config_devel (dev-8.x-1.x d4cdd21)
    Cloning d4cdd21

  - Installing drupal/token (dev-8.x-1.x d6cd94f)
    Cloning d6cd94f19b053d8b6a411cb8fc5e75112d141d77

  - Installing drupal/memcache (dev-8.x-2.x 222f62f)
    Cloning 222f62f7c462f084d7d1852f747e0bf7e16909ca

}
$references = $this->extractReferences($links, $references);
}
$root->setReferences($references);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bd808 setReferences is not part of the RootPackageInteface. Should we use unwrapIfNeeded or should we try to fix it upstream?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say that both are wanted. At the very least unwrapIfNeeded will cast or provide access to the aliased RootPackage. Upstreaming interface additions and tests is always a good idea I think. See composer/composer@06c44ce for an example of us doing this previously.

@bd808
Copy link
Member

bd808 commented Mar 8, 2016

Commits should be squashed and rebased on current master.

@LionsAd
Copy link
Contributor

LionsAd commented Apr 22, 2016

FWIW, The patch looks great to me!

@bd808 bd808 added this to the 1.3.2 milestone Apr 22, 2016
@bd808 bd808 merged commit 46b3655 into wikimedia:master Apr 22, 2016
@bd808 bd808 modified the milestones: 1.3.2, 1.4.0 Jul 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Not using revisions
4 participants