Open alexisferat opened 6 years ago
+1, just tried to install 5.7.0.
Edit: It works now: Apparently this was a separate issue with
global hirak/presistissimo
package for composer: https://github.com/PhilippBaschke/acf-pro-installer/pull/20
same problem here - trying to install the 5.8.0 beta1. editing/commenting the code in the validateVersion
method in the Plugin.php
does the trick.
Still not working for 5.8.0-beta2
:
[UnexpectedValueException]
The version constraint of advanced-custom-fields/advanced-custom-fields-pro should be exact (with 3 or 4 digits). Invalid version string "5.8.0-beta2"
same problem here - trying to install the 5.8.0 beta1. editing/commenting the code in the
validateVersion
method in thePlugin.php
does the trick.
Could you go into detail how you got this working @gaambo? I think I commented the right code, but I get the following error message:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package advanced-custom-fields/advanced-custom-fields-pro could not be found in any version, there may be a typo in the package name.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
- It's a private package and you forgot to add a custom repository to find it
I add the repository like this:
{
"type": "package",
"package": {
"name": "advanced-custom-fields/advanced-custom-fields-pro",
"version": "5.8.10-beta2",
"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"
}
}
}
Could you go into detail how you got this working @gaambo? I think I commented the right code, but I get the following error message @stefthoen
sure and also for anyone else reading this:
in vendor/philippbaschke/acf-pro-installer/src/ACFProInstaller/Plugin.php
i commented line 185-195
out. this method checks the version to be a proper semantic version (with 3 or 4 digits). it would need a pull request to update this method to also allow beta
version strings. by commenting it out you bypass the version check - so that's not a future-proof solution.
after that i added the repository in composer.json like this:
{
"type": "package",
"package": {
"name": "advanced-custom-fields/advanced-custom-fields-pro",
"version": "5.8.0-beta1",
"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"
}
}
}
and the dependency as advanced-custom-fields/advanced-custom-fields-pro": "5.8.0-beta1
this works for me - but i only got it set up in one project, so no extensive testing right now.
im pretty busy the next few weeks but maybe i'll come around to do a pull request for this method soon. we'd also need to check the minimum stability options and deny beta/alpha versions then.
Just to add that it worked for me after doing all of the above, but using this as the dependency:
"advanced-custom-fields/advanced-custom-fields-pro": "*@beta"
The only problem is making sure that my edits to acf-pro-installer don't get overwritten!
As there is a PR waiting I use something like this:
{
"type": "package",
"package": {
"name": "advanced-custom-fields/advanced-custom-fields-pro",
"version": "5.8.0-beta3",
"type": "wordpress-plugin",
"dist": {
"type": "zip",
"url": "https://connect.advancedcustomfields.com/index.php?p=pro&a=download"
},
"require": {
"philippbaschke/acf-pro-installer": "dev-master#9cac3d3ed8217eb2c49aecd0941ab82bf0374f58",
"composer/installers": "^1.0"
}
}
},
the specific commit ID of the @jezemery PR. You don't have to edit any file.
Steps to reproduce:
repositories
field, set the ACF package version to5.7.0-RC4
require
field, set constraint to^5.7
composer update advanced-custom-fields/advanced-custom-fields-pro
Result:
Same problem when doing
composer require advanced-custom-fields/advanced-custom-fields-pro
: