Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pivvenit/acf-pro-installer
A composer install helper for Advanced Custom Fields PRO
https://github.com/pivvenit/acf-pro-installer
advanced-custom-fields bedrock composer composer-plugin wordpress
Last synced: about 1 month ago
JSON representation
A composer install helper for Advanced Custom Fields PRO
- Host: GitHub
- URL: https://github.com/pivvenit/acf-pro-installer
- Owner: pivvenit
- License: mit
- Fork: true (PhilippBaschke/acf-pro-installer)
- Created: 2019-02-20T17:24:24.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-10T12:37:08.000Z (over 1 year ago)
- Last Synced: 2024-09-25T23:45:26.793Z (about 1 month ago)
- Topics: advanced-custom-fields, bedrock, composer, composer-plugin, wordpress
- Language: PHP
- Homepage:
- Size: 2.54 MB
- Stars: 50
- Watchers: 2
- Forks: 8
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ACF PRO Installer
[![Packagist](https://img.shields.io/packagist/v/pivvenit/acf-pro-installer.svg?maxAge=3600)](https://packagist.org/packages/pivvenit/acf-pro-installer)[![Packagist](https://img.shields.io/packagist/l/pivvenit/acf-pro-installer.svg?maxAge=2592000)](https://github.com/pivvenit/acf-pro-installer/blob/master/LICENSE)![](https://github.com/pivvenit/acf-pro-installer/workflows/Master%20Build/badge.svg)
[![Dependabot](https://badgen.net/badge/Dependabot/enabled/green?icon=dependabot)](https://dependabot.com/)
[![Coverage Status](https://coveralls.io/repos/github/pivvenit/acf-pro-installer/badge.svg?branch=master)](https://coveralls.io/github/pivvenit/acf-pro-installer?branch=master)A composer plugin that makes installing [ACF PRO] with [composer] easier.
It reads your :key: ACF PRO key from the **environment** or a **.env file**.
[ACF PRO]: https://www.advancedcustomfields.com/pro/
[composer]: https://github.com/composer/composer## :warning: Deprecated. Supported till 1st of June 2023 :warning:
This plugin is deprecated, since [Advanced Custom Fields has released native composer support](https://www.advancedcustomfields.com/resources/installing-acf-pro-with-composer/). We actively encourage users to switch to their solution. This composer plugin will be updated/maintained till 1st of June 2023. Afterwards we will mark this repository as archived, and shutdown the repositories mentioned below.
## Usage
> This plugin is compatible with Both Composer 2.x (latest) and 1.x
**1. Add our [Advanced Custom Fields Composer Bridge](https://github.com/pivvenit/acf-composer-bridge) repository to the [`repositories`][composer-repositories] field in `composer.json`**
> This repository simply provides a periodically updated [packages.json](https://pivvenit.github.io/acf-composer-bridge/composer/v2/packages.json), that redirects composer to the ACF provided downloads.
Note that this repository **does not** provide any Advanced Custom Fields Pro packages itself, it only tells Composer where it can find ACF Pro packages.
Secondly it is important to note that **your license key is not submitted to the repository**, since the installer downloads the Advanced Custom Fields Pro zip files directly from ACF's servers.**Why this repository?**
Since it enables you to use `advanced-custom-fields/advanced-custom-fields-pro` package with version constraints like any normal Packagist package.
You no longer have to update the version manually as you had to with `philippbaschke/acf-pro-installer` (and tools like dependabot will also work for ACF).```json
{
"type": "composer",
"url": "https://pivvenit.github.io/acf-composer-bridge/composer/v3/wordpress-plugin/"
}
```This installs the package as `wordpress-plugin` type, in case you want a different type, use the following URL:
wordpress-muplugin:
> `https://pivvenit.github.io/acf-composer-bridge/composer/v3/wordpress-muplugin/`wpackagist-plugin:
> `https://pivvenit.github.io/acf-composer-bridge/composer/v3/wpackagist-plugin/`library:
> `https://pivvenit.github.io/acf-composer-bridge/composer/v3/library/`**2. Make your ACF PRO key available**
There are 3 ways to make the ACF_PRO_KEY available:
- Using the ACF_PRO_KEY environment variable
- `.env` file
- Setting `acf-pro-key` in `$COMPOSER_HOME/config.json`Select the one that best matches your setup:
***2.a Using the ACF_PRO_KEY Environment variable***
Set the environment variable **`ACF_PRO_KEY`** to your [ACF PRO key][acf-account].
***2.b Use a .env file***
Alternatively you can add an entry to your **`.env`** file:
```ini
# .env (same directory as composer.json)
ACF_PRO_KEY=Your-Key-Here
```***2.c. Setting the key in `$COMPOSER_HOME/config.json`***
You specify the `acf-pro-key` in the `config` section of your `$COMPOSER_HOME/config.json`
```json
{
"config": {
"acf-pro-key": "Your-Key-Here"
}
}
```
> `$COMPOSER_HOME` is a hidden, global (per-user on the machine) directory that is shared between all projects.
> By default it points to `C:\Users\\AppData\Roaming\Composer` on Windows and `/Users/\/.composer` on macOS.
> On *nix systems that follow the XDG Base Directory Specifications, it points to `$XDG_CONFIG_HOME/composer`.
> On other *nix systems, it points to `/home/\/.composer`.**3. Require ACF PRO**
```sh
composer require advanced-custom-fields/advanced-custom-fields-pro
```[composer-repositories]: https://getcomposer.org/doc/04-schema.md#repositories
[package-gist]: https://gist.github.com/fThues/705da4c6574a4441b488
[acf-account]: https://www.advancedcustomfields.com/my-account/