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

installation conflict with "vlucas/phpdotenv":"^3.0.0" #38

Open
boodcode opened this issue Feb 12, 2019 · 7 comments
Open

installation conflict with "vlucas/phpdotenv":"^3.0.0" #38

boodcode opened this issue Feb 12, 2019 · 7 comments

Comments

@boodcode
Copy link

if you have "vlucas/phpdotenv":"^3.0.0", there is conflict
Problem :
philippbaschke/acf-pro-installer v1.0.2 requires vlucas/phpdotenv ^2.2 -> satisfiable by vlucas/phpdotenv[2.2.x-dev, 2.3.x-dev, 2.4.x-dev, 2.5.x-dev, 2.6.x-dev, v2.2.0, v2.2.1, v2.3.0, v2.4.0, v2.5.0, v2.5.1, v2.5.2, v2.6.0, v2.6.1] but these conflict with your requirements or minimum-stability.
How to avoid that ?

@schliflo
Copy link

There is a PR to fix this exact issue: #35
@PhilippBaschke just needs to merge it...

@ffraenz
Copy link

ffraenz commented Feb 18, 2019

This package seems to be abandoned since the last code change occurred mid 2017.

I maintain an alternative package ffraenz/private-composer-installer that can be used to install arbitrary private packages including commercial WordPress plugins like ACF Pro and WPML. From version ^2.0.0 it can be used in conjunction with vlucas/phpdotenv ^3.0.0 (ffraenz/private-composer-installer#4).

@siriusnottin
Copy link

I found your repo yesterday @ffraenz! Thanks to you you saved my life x)

@Qrious
Copy link

Qrious commented Feb 28, 2019

For anyone interested, we've decided to open source our solution:

Tl;dr;

  • We created a fork/packagist package that allows you to install/update advanced-custom-fields/advanced-custom-fields-pro as any normal composer package (you no longer need to specify version manually) using an open-source composer repository
  • It allows beta/RC releases (fixes issue 26)
  • Used internally at our company, so we have a commercial interest in maintaining it for the foreseeable future.
  • Modernized code, up-to-date dependencies.
  • You can use tools like Dependabot to automatically update ACF :)

I'm interested in hearing your opinion, or any concerns you have with our approach (see below).

Solution explanation

Unfortunately, due to a composer issue (see composer/composer#3082), we could not solve this entirely in a composer plugin. As a workaround we created an open-source composer repository that fetches all available package versions from ACF periodically. As with this installer, you still need to provide your own ACF_PRO_KEY, because we do only provide an index that tells composer where it can download the zips. I'd like to stress that your ACF license key is never submitted to the composer repository (we already have a developer license :-) ).

The flow when you require advanced-custom-fields/advanced-custom-fields-pro after adding our repository:

  1. Composer connects to the repository and fetches the index with all available packages.
  2. Composer determines which package to download based on your version constraints.
  3. Composer installs our installer as this is required for every advanced-custom-fields package provided.
  4. Our installer detects that you want to download an advanced-custom-fields package directly from ACF's servers, and appends the license key you've provided in the ACF_PRO_KEY environment variable to the URL.
  5. Enjoy!

@imstanleyyeo
Copy link

Thanks @ffraenz for this installer. Works on all my new install site.

Problem arise when I'm trying to upgrade ACP PRO moving from philippbaschke/acf-pro-installer to yours. Did a composer update by changing the value of "vlucas/phpdotenv": "^2.0.1", to "vlucas/phpdotenv": "^3.0.0", and got a white screen of death.

"require": { "php": ">=5.6", "composer/installers": "^1.4", "vlucas/phpdotenv": "^3.0.0", "johnpbloch/wordpress": "4.9.8", "oscarotero/env": "^1.1.0", "roots/wp-password-bcrypt": "1.0.0", "advanced-custom-fields/advanced-custom-fields-pro": "*" }

Any idea why is it so? Thanks

@ffraenz
Copy link

ffraenz commented Jul 18, 2019

@imstanleyyeo Please open a new issue over at https://github.com/ffraenz/private-composer-installer/issues to discuss your problem as it is not related to this repository. Thank you!

@imstanleyyeo
Copy link

Sorry. Opened a new issue.

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

6 participants