wp2static icon indicating copy to clipboard operation
wp2static copied to clipboard

wp2static bug: require a PHP version ">= 8.1.0" when it should be 7.3

Open pixeline opened this issue 3 years ago • 4 comments

When installing via composer, it install without complaining. But then, when visiting the wp admin, I get this error :

Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0".

Removing WP2static from package.json then composer update removes the issue. I am on PHP 8.0.

According to the plugin packagist page, it requires php7.3, not 8.1 image

pixeline avatar Jul 13 '22 15:07 pixeline

Thanks for raising this issue, @pixeline!

I would suggest in your composer.json, to reference the latest development branch, as there's quite a lot of updates in it.

Per Packagist, that requires >= 7.4

You may see this guide on targeting a development branch with Composer:

https://getcomposer.org/doc/05-repositories.md#loading-a-package-from-a-vcs-repository

Something like this:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/leonstafford/wp2static"
        }
    ],
    "require": {
        "leonstafford/wp2static": "dev-develop"
    }
}

Please note: main repo is moved to WP2Static/wp2static from leonstafford/wp2static, but it should still handle either reference fine.

leonstafford avatar Jul 13 '22 23:07 leonstafford

I'll keep this open to look into the issue about PHP 8.1 requirement

leonstafford avatar Jul 13 '22 23:07 leonstafford

I tried:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/leonstafford/wp2static"
        }
    ],
    "require": {
        "leonstafford/wp2static": "dev-develop"
    }
}

I tried with both leonstafford and wp2static owners, leonstafford got me the furthest, to this error:


 Problem 1
    - Root composer.json requires leonstafford/wp2static dev-develop -> satisfiable by leonstafford/wp2static[dev-develop].
    - roave/security-advisories dev-master conflicts with guzzlehttp/psr7 <1.8.4|>=2,<2.1.1 (leonstafford/wp2static dev-develop replaces guzzlehttp/psr7 *).
    - Root composer.json requires roave/security-advisories dev-master -> satisfiable by roave/security-advisories[dev-master].

alex

pixeline avatar Jul 15 '22 09:07 pixeline

If you're running this on your local computer, I'd remove the roave/security-advisories dependency which is having a conflict with guzzle. If this is on a publicly accessible server, then it would be more for you to decide the security risk in removing that checker. I'll need to update my guzzle fork to overcome that type of warning being triggered.

WP2Static is best run on a non-public development server, so such security issues aren't usually a concern.

leonstafford avatar Jul 15 '22 10:07 leonstafford

This should not be an issue anymore, since PHP 7 is end-of-life.

john-shaffer avatar Jan 08 '23 00:01 john-shaffer