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

Composer plugin doesn't load / work :/ #10

Closed
zenopopovici opened this issue Sep 18, 2019 · 2 comments
Closed

Composer plugin doesn't load / work :/ #10

zenopopovici opened this issue Sep 18, 2019 · 2 comments

Comments

@zenopopovici
Copy link

Here's the error

# composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 8 installs, 0 updates, 0 removals
  - Installing advanced-custom-fields/advanced-custom-fields-pro (5.8.4): Downloading (failed)       
                                                                                                                 
  [Composer\Downloader\TransportException]                                                                       
  The "https://connect.advancedcustomfields.com/index.php?p=pro&a=download&k={%PLUGIN_ACF_KEY}&t={%version}" fi  
  le could not be downloaded (HTTP/1.1 404 Not Found)                                                            
                                                                                                                 

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...

composer.json

{
  "name": "xxx",
  "type": "project",
  "repositories": [{
      "type": "composer",
      "url": "https://wpackagist.org"
    },
    {
      "type": "package",
      "package": {
        "name": "advanced-custom-fields/advanced-custom-fields-pro",
        "version": "5.8.4",
        "type": "wordpress-plugin",
        "dist": {
          "type": "zip",
          "url": "https://connect.advancedcustomfields.com/index.php?p=pro&a=download&k={%PLUGIN_ACF_KEY}&t={%version}"
        }
      },
      "require": {
        "composer/installers": "^1.4",
        "ffraenz/private-composer-installer": "^2.0"
      }
    }
  ],
  "config": {
    "vendor-dir": "composer/vendor"
  },
  "require": {
    "johnpbloch/wordpress-core-installer": ">=1.0.2",
    "johnpbloch/wordpress": ">=5.2.3",
    "vlucas/phpdotenv": "^3.5",
    "advanced-custom-fields/advanced-custom-fields-pro": "^5.8"
  }
  "require-dev": {
    "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
    "wp-coding-standards/wpcs": "^2.1",
    "squizlabs/php_codesniffer": "^3.4",
    "phpcompatibility/phpcompatibility-wp": "^2.1",
    "composer/installers": "~1.0"
  }
}
@ffraenz
Copy link
Owner

ffraenz commented Sep 18, 2019

Hi @zenopopovici, I just reviewed your composer.json. Make sure the require field is set on the package object. At the moment it is set on the repository object and thus this installer does not kick into action leaving the placeholders untouched. I hope this solves your issue.

@zenopopovici
Copy link
Author

Yes, that's it. Sorry for the trouble, great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants