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

Install issue with roots.io Bedrook #20

Closed tim-field closed 4 years ago

tim-field commented 4 years ago

Anyone else seeing this issue?

$ composer require "advanced-custom-fields/advanced-custom-fields-pro:*"

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - Installation request for advanced-custom-fields/advanced-custom-fields-pro * -> satisfiable by advanced-custom-fields/advanced-custom-fields-pro[5.8.9].
    - advanced-custom-fields/advanced-custom-fields-pro 5.8.9 requires ffraenz/private-composer-installer ^2.0 -> satisfiable by ffraenz/private-composer-installer[v2.0.0] but these conflict with your requirements or minimum-stability.

composer.json

{
  "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": "advanced-custom-fields/advanced-custom-fields-pro",
        "version": "5.8.9",
        "type": "wordpress-muplugin",
        "dist": {
          "type": "zip",
          "url": "https://connect.advancedcustomfields.com/index.php?a=download&p=pro&k={%ACF_PRO_KEY}&t={%version}"
        },
        "require": {
          "composer/installers": "^1.4",
          "ffraenz/private-composer-installer": "^2.0"
        }
      }
    }
  ],
  "require": {
    "php": ">=7.1",
    "composer/installers": "^1.8",
    "vlucas/phpdotenv": "^4.1.0",
    "oscarotero/env": "^1.2.0",
    "roots/wordpress": "5.3.2",
    "roots/wp-config": "1.0.0",
    "roots/wp-password-bcrypt": "1.0.0",
    "roots/soil": "^3.9",
    "ffraenz/private-composer-installer": "^4.0"
  },
  "require-dev": {
    "squizlabs/php_codesniffer": "^3.5.4",
    "roave/security-advisories": "dev-master"
  },
  "config": {
    "optimize-autoloader": true,
    "preferred-install": "dist"
  },
  "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

You are requiring both ffraenz/private-composer-installer ^4.0 and ffraenz/private-composer-installer ^2.0 which results in a conflict. Replace the version in the first occurrence by ^4.0 and remove the second occurrence in the root require section. This should resolve the conflict.

tim-field commented 4 years ago

🤦 Thanks @ffraenz I didn't notice that other require block. It was late at night 🤷‍♂️

ffraenz commented 4 years ago

No worries! Take care.