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

Version constraint for Composer 1 does not allow ACF 5.10.x to update #43

Closed
srsimonson opened this issue Oct 27, 2021 · 3 comments
Closed

Comments

@srsimonson
Copy link

srsimonson commented Oct 27, 2021

This issue here:
PhilippBaschke/acf-pro-installer#47

also exists for ffraenz/private-composer-installer when using Composer 1. I got the same error message:

[UnexpectedValueException]
The version constraint of advanced-custom-fields/advanced-custom-fields-pro should be exact (with 3 or 4 digits). Invalid version string "5.10.1"

Updating to Composer 2 does not have this issue.

If using Composer 1, this solution works for philippbaschke, but since ffraenz's isn't acf-pro exclusive, the same solution doesn't look like it applies.
PhilippBaschke/acf-pro-installer@13ec41e

@szepeviktor
Copy link
Contributor

szepeviktor commented Oct 27, 2021

Please issue PLUGIN_ACF_KEY='ADD_YOUR_KEY_HERE' composer update with this simple content.

{
    "name": "private-composer-installer/issue-43",
    "description": "https://github.com/ffraenz/private-composer-installer/issues/43",
    "license": "proprietary",
    "require": {
        "advanced-custom-fields/advanced-custom-fields-pro": "^5.10"
    },
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "advanced-custom-fields/advanced-custom-fields-pro",
                "version": "5.10.1",
                "type": "wordpress-plugin",
                "dist": {
                    "type": "zip",
                    "url": "https://connect.advancedcustomfields.com/index.php?a=download&p=pro&k={%PLUGIN_ACF_KEY}&t={%VERSION}"
                },
                "require": {
                    "composer/installers": "^1.4",
                    "ffraenz/private-composer-installer": "^5.0"
                }
            }
        }
    ]
}

It works with Composer v1 (latest) on PHP 7.4.

@ffraenz
Copy link
Owner

ffraenz commented Oct 27, 2021

I'm not sure where the error message would originate from. I'm not aware of any version validation logic in this plugin similar to this function. As arbitrary packages may be used, any version gets accepted.

@srsimonson
Copy link
Author

srsimonson commented Oct 27, 2021

Thanks for the responses. I'll revisit the package updates and make sure I converted from philippbaschke properly.

... Composer 1 updates worked, my error! Powershell error stated something like philippbaschke was still being referenced in cache, so I hadn't fully removed it from my system.

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

3 participants