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

Installing using composer install #41

Open
davemcnally opened this issue Mar 6, 2019 · 1 comment
Open

Installing using composer install #41

davemcnally opened this issue Mar 6, 2019 · 1 comment

Comments

@davemcnally
Copy link

Not sure if I'm missing something but I cannot get ACF to install to wp-content/plugins/ directory just using composer install (after making sure I have it set to require) yet manually requiring it as per step 3, works fine. Here's an edited example of my composer.json for the relevant parts:

{
  "repositories": [
      {
          "type": "composer",
          "url": "https://wpackagist.org"
      },
      {
        "type": "package",
        "package": {
          "name": "advanced-custom-fields/advanced-custom-fields-pro",
          "version": "5.7.13",
          "type": "wordpress-plugin",
          "dist": {
            "type": "zip",
            "url": "https://connect.advancedcustomfields.com/index.php?p=pro&a=download"
          },
          "require": {
            "philippbaschke/acf-pro-installer": "^1.0",
            "composer/installers": "^1.0"
          }
        }
      }
  ],
  "config": {
      "vendor-dir": "vendor",
      "secure-http": false
  },
  "require": {
      "johnpbloch/wordpress": ">=5.0",
      "advanced-custom-fields/advanced-custom-fields-pro": "*"
  },
  "extra": {
      "installer-paths": {
          "build/wp-content/plugins/{$name}/": [
              "advanced-custom-fields/advanced-custom-fields-pro",
              "type:wordpress-plugin"
          ],
          "build/wp-content/themes/{$name}/": [
              "type:wordpress-theme"
          ]
      },
      "wordpress-install-dir": "build"
  }
}

Should running composer install not be installing ACF into the plugins directory like this? I'd rather not have to run composer install followed by composer require advanced-custom-fields/advanced-custom-fields-pro:*

@davemcnally
Copy link
Author

Strangely, if I run composer install twice, the second command installs ACF into expected directory but still not sure why it needs running twice 🤔

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

1 participant