ffraenz / private-composer-installer

Composer install helper outsourcing sensitive keys from the package URL into environment variables
MIT License
226 stars 16 forks source link

Issue with WPML and Bedrock #11

Closed lucamamprin closed 4 years ago

lucamamprin commented 4 years ago

Hello, I was interested in this package to have a better way to manage WPML using Bedrock by Roots in conjunction of this package. However, instead of installing the plugin inside the web/app/plugins directory, it installs it inside vendor/wpml/wpml-multilingual-cms.

I tried searching inside the Bedrock documentation and forum, I couldn't find a solution.

My composer.json file:

{
  "name": "roots/bedrock",
  "type": "project",
  "license": "MIT",
  "description": "WordPress boilerplate with modern development tools, easier configuration, and an improved folder structure",
  "homepage": "https://roots.io/bedrock/",
  "authors": [
    {
      "name": "Scott Walkinshaw",
      "email": "scott.walkinshaw@gmail.com",
      "homepage": "https://github.com/swalkinshaw"
    },
    {
      "name": "Ben Word",
      "email": "ben@benword.com",
      "homepage": "https://github.com/retlehs"
    }
  ],
  "keywords": [
    "bedrock", "composer", "roots", "wordpress", "wp", "wp-config"
  ],
  "support": {
    "issues": "https://github.com/roots/bedrock/issues",
    "forum": "https://discourse.roots.io/category/bedrock"
  },
  "repositories": [
    {
      "type": "composer",
      "url": "https://wpackagist.org"
    },
    {
      "type": "package",
      "package": {
        "name": "wpml/wpml-multilingual-cms",
        "version": "4.2.9",
        "type": "wordpress-plugin",
        "dist": {
          "type": "zip",
          "url": "https://wpml.org/?download=6088&user_id={%PLUGIN_WPML_USER_ID}&subscription_key={%PLUGIN_WPML_SUBSCRIPTION_KEY}&version={%version}"
        },
        "require": {
          "composer/installers": "^1.7",
          "ffraenz/private-composer-installer": "^2.0"
        }
      }
    }
  ],
  "require": {
    "php": ">=7.1",
    "composer/installers": "^1.7",
    "oscarotero/env": "^1.2.0",
    "roots/wordpress": "5.2.3",
    "roots/wp-config": "1.0.0",
    "roots/wp-password-bcrypt": "1.0.0",
    "vlucas/phpdotenv": "^3.4.0",
    "wpackagist-plugin/wordpress-seo": "^12.2",
    "wpml/wpml-multilingual-cms": "*"
  },
  "require-dev": {
    "squizlabs/php_codesniffer": "^3.4.2",
    "roave/security-advisories": "dev-master"
  },
  "config": {
    "optimize-autoloader": true,
    "preferred-install": "dist",
    "sort-packages": true
  },
  "minimum-stability": "dev",
  "prefer-stable": true,
  "extra": {
    "installer-paths": {
      "web/app/mu-plugins/{$name}/": ["type:wordpress-muplugin"],
      "web/app/plugins/{$name}/": ["type:wordpress-plugin"],
      "web/app/themes/{$name}/": ["type:wordpress-theme"]
    },
    "wordpress-install-dir": "web/wp"
  },
  "scripts": {
    "post-root-package-install": [
      "php -r \"copy('.env.example', '.env');\""
    ],
    "test": [
      "phpcs"
    ]
  }
}
ffraenz commented 4 years ago

Hi @lucamamprin! As far as I can see there are no issues with your composer.json file. Did you run composer update to make sure the content of this file gets read? This composer plugin only alters the dist URL before downloading a package. It does not touch the install destination. This issue may be related to other packages / plugins.

ffraenz commented 4 years ago

I'll close this issue due to inactivity.