composer / installers

A Multi-Framework Composer Library Installer
MIT License
1.43k stars 412 forks source link

Integration with custom directory installer #323

Closed Mte90 closed 8 years ago

Mte90 commented 8 years ago

Ref: https://github.com/ideaconnect/composer-custom-directory/issues/3 I see when I use that module with package that require this module all the packages that contains a type are ignored from the composer custom directory module.

A composer.json example?

{
  "require": {
    "php": ">=5.3",
    "idct/composer-custom-directory": "dev-master",
    "composer/installers": "1.0.6",
    "wpbp/pointerplus": "1.0.0",
    "wpbp/cronplus": "1.0.0",
    "wpbp/widgets-helper": "1.0.0",
    "wpbp/fakepage": "1.0.0",
    "wpbp/template": "1.0.0",
    "wpbp/debug": "1.0.0",
    "wpbp/cpt_columns": "1.0.0",
    "wpbp/requirements": "1.0.0",
    "wpbp/language": "1.0.0",
    "webdevstudios/cmb2": "2.2.2.1",
    "voceconnect/wp-contextual-help": "1.0.2",
    "nathanielks/wp-admin-notice": "dev-master",
    "origgami/cmb2-grid": "dev-master",
    "webdevstudios/cpt-core": "1.0.1",
    "webdevstudios/taxonomy_core": "0.2.4",
    "freemius/wordpress-sdk": "1.7.4",
    "julien731/wp-dismissible-notices-handler": "1.0.0",
    "julien731/wp-review-me": "2.0.0",
    "wpackagist-plugin/posts-to-posts": "*",
    "mozilla/wp-web-push": "dev-master",
    "athlan/custom-fields-permalink-plugin": "1.0.2"
  },
  "repositories": [
    {
      "url": "git@github.com:nathanielks/wordpress-admin-notice.git",
      "type": "git"
    },
    {
      "url": "git@github.com:origgami/CMB2-grid.git",
      "type": "git"
    },
    {
      "url": "https://github.com/Mte90/wp-web-push",
      "type": "vcs"
    },
    {
      "url": "git@github.com:mozilla/wp-sw-manager.git",
      "type": "git"
    },
    {
      "url": "git@github.com:marco-c/wp-web-app-manifest-generator.git",
      "type": "git"
    },
    {
      "type": "composer",
      "url": "https://wpackagist.org"
    }
  ],
  "config": {
    "vendor-dir": "composer/"
  },
  "minimum-stability": "dev",
  "extra": {
    "installer-paths": {
      "./includes/lib/{$name}": [
        "webdevstudios/cpt-core"
      ],
      "./includes/lib/{$name|F}": [
        "wpbp/language",
        "wpbp/cronplus",
        "wpbp/fakepage",
        "wpbp/template",
        "wpbp/requirements",
        "wpbp/debug",
        "webdevstudios/taxonomy_core",
        "athlan/custom-fields-permalink-plugin",
        "wpackagist-plugin/posts-to-posts",
        "mozilla/wp-web-push"
      ],
      "./includes/lib/composer-deps/{$name|F}": [
        "mozilla/wp-sw-manager",
        "lcobucci/jwt",
        "fgrosse/phpasn1",
        "mdanter/ecc",
        "spomky-labs/base64url",
        "paragonie/random_compat",
        "marco-c/wp_serve_file",
        "marco-c/wp-web-app-manifest-generator"
      ],
      "./includes/lib/Freemius": [
        "freemius/wordpress-sdk"
      ],
      "./public/includes/lib/{$name|F}": [
        "wpbp/widgets-helper"
      ],
      "./admin/includes/lib/{$name}": [
        "webdevstudios/cmb2"
      ],
      "./admin/includes/lib/{$name|F}": [
        "wpbp/pointerplus",
        "wpbp/cpt_columns",
        "origgami/cmb2-grid",
        "voceconnect/wp-contextual-help",
        "nathanielks/wp-admin-notice",
        "julien731/wp-dismissible-notices-handler",
        "julien731/wp-review-me"
      ]
    }
  },
  "autoload": {
    "files": [
      "./admin/includes/lib/cmb2/init.php",
      "./admin/includes/lib/Cmb2-grid/Cmb2GridPlugin.php",
      "./includes/lib/posts-to-posts/posts-to-posts.php"
    ]
  }
}

As you can see the package like posts-to-posts or review-me are not available in the folder chosen. Inspecting the composer custom directory as I written in a ticket of the module's repo the package with a type are not available. I really need a fix for that but I don't know the internal api of composer for change that that module. Also this problems happen only when I add the installers package and I have to add because there is a plugin that require as dependence.

Mte90 commented 8 years ago

As I can see the problem that is installers don't support the |F and |P flags of custom directories. Installers it's executed before the other module but cannot reconize the pattern and not rename the folder using the standard of the other module.

Mte90 commented 8 years ago

For fix it I created a fork of this module that contain the dynamic system of the other library. https://github.com/WPBP/installers