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

Cannot install beta or release candidate version #26

Open
alexisferat opened this issue Jul 8, 2018 · 7 comments
Open

Cannot install beta or release candidate version #26

alexisferat opened this issue Jul 8, 2018 · 7 comments

Comments

@alexisferat
Copy link

Steps to reproduce:

  1. In the repositories field, set the ACF package version to 5.7.0-RC4
  2. In the require field, set constraint to ^5.7
  3. Execute composer update advanced-custom-fields/advanced-custom-fields-pro

Result:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package advanced-custom-fields/advanced-custom-fields-pro ^5.7 exists as advanced-custom-fields/advanced-custom-fields-pro[5.6.10] but these are rejected by your constraint.

Same problem when doing composer require advanced-custom-fields/advanced-custom-fields-pro:

[InvalidArgumentException]
Could not find a version of package advanced-custom-fields/advanced-custom-fields-pro matching your minimum-stability (stable). Require it with an explicit version constraint allowing its desired stability.
@strarsis
Copy link

strarsis commented Jul 12, 2018

+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: #20

@gaambo
Copy link

gaambo commented Oct 17, 2018

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.

@tiwac100
Copy link

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"

@stefthoen
Copy link

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.

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"
        }
      }
    }

@gaambo
Copy link

gaambo commented Nov 13, 2018

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.

@robrecord
Copy link

robrecord commented Dec 13, 2018

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!

@palmiak
Copy link

palmiak commented Feb 3, 2019

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.

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

7 participants