pivvenit / acf-composer-bridge

Provides a static composer repository that references all Advanced Custom Fields Pro versions
MIT License
47 stars 8 forks source link

404 - Broken #18

Closed nielsvr closed 2 years ago

nielsvr commented 2 years ago

The components seem to be broken. URLs throw a 404. Composer fails.

https://pivvenit.github.io/acf-composer-bridge/composer/v3/library/

andrewmumblebee commented 2 years ago

Same here, getting 404 when our pipeline trys to install acf-pro using this

Qrious commented 2 years ago

https://pivvenit.github.io/acf-composer-bridge/composer/v3/library/packages.json is working correctly for us. Can you let us know if it works correctly now?

In that case this was a Github Pages outage (not reported on their status page), since the latest change to this repo was 7 days ago.

nielsvr commented 2 years ago

No, still fails with the current setup. I've updated my setup now to use wpackagist-plugin/advanced-custom-fields-pro which seem to work.

"repositories": [
        {
            "type": "package",
            "package": {
                "name": "wpackagist-plugin/advanced-custom-fields-pro",
                "type": "wordpress-plugin",
                "version": "5.12",
                "dist": {
                    "url": "https://connect.advancedcustomfields.com/v2/plugins/download?p=pro&k=YOUR_KEY&t=5.12",
                    "type": "zip"
                }
            }
        }
    ]
"require": {
        "wpackagist-plugin/advanced-custom-fields-pro": "^5.9"
    }

Vendor folder changes so you need to update your include

Qrious commented 2 years ago

Hmm, that is strange, it works on my machine™ :(.

Could you please create a new folder with the following composer.json and run composer install --no-cache? Does this work correctly?

{
  "name": "example/test",
  "repositories": [
    {
      "type": "composer",
      "url": "https://pivvenit.github.io/acf-composer-bridge/composer/v3/library/"
    }
  ],
  "require": {
    "advanced-custom-fields/advanced-custom-fields-pro": "5.12"
  },
  "config": {
    "allow-plugins": {
      "pivvenit/acf-pro-installer": true,
      "composer/installers": true
    }
  }
}
ianleckey commented 2 years ago

Same here:

[Composer\Downloader\TransportException] The "https://connect.advancedcustomfields.com/v2/plugins/download?p=pro&t=5.12.2" file could not be downloaded (HTTP/1.1 404 Not Found): {"code":"api_error","message":"Sorry, something went wrong.","data":{"status":404}}

That endpoint seems to work again if &k=YOUR_ACF_KEY is supplied

mrmadhat commented 2 years ago

Having the same issue, when I run composer update --no-cache locally the download still works for me but when I try to deploy (using deployhq) I'm getting the same errors others have mentioned.

ianleckey commented 2 years ago

Having the same issue, when I run composer update --no-cache locally the download still works for me but when I try to deploy (using deployhq) I'm getting the same errors others have mentioned.

I was also using deployhq. Have a read through the build log and you'll see stuff like:

contains a Composer plugin which is blocked by your allow-plugins config

Then add all of the references plugins to allow-plugins in your composer.json:


"config": {
    "allow-plugins": {
      "pivvenit/acf-pro-installer": true,
      "composer/installers": true
    }
}
mrmadhat commented 2 years ago

Thanks @ianleckey everything's working again now 😄 It looks like my local version of composer is 2.1.5 whereas deployhq is using >=2.2 so allow-plugins is now required.

As of Composer 2.2. 0, the allow-plugins option adds a layer of security allowing you to restrict which Composer plugins are able to execute code during a Composer run. When a new plugin is first activated, which is not yet listed in the config option, Composer will print a warning.

https://getcomposer.org/doc/06-config.md#allow-plugins

In addition for anyone using bedrock you also need to ensure that you include roots/wordpress-core-installer otherwise composer will not be able to install wordpress. Your config should look like this:

"config": {
    "allow-plugins": {
        "pivvenit/acf-pro-installer": true,
        "composer/installers": true,
        "roots/wordpress-core-installer": true
    }
}