aerni / statamic-snipcart

A Snipcart addon for Statamic
https://statamic.com/addons/aerni/snipcart
Other
4 stars 0 forks source link

Installation fail with php 8.0.3 #8

Closed fredbouin closed 3 years ago

fredbouin commented 3 years ago

With PHP 8.0.3 and composer 2.0.9 I get the error:

Package aerni/snipcart at version dev-master has a PHP requirement incompat
ible with your PHP version, PHP extensions and Composer version

fredbouin commented 3 years ago

I've switched to php 7.4 and I'm getting the same error, so it looks like php 8 isn't the issue.

aerni commented 3 years ago

Please provide more details about what's failing and the steps to reproduce the issue. Thanks.

fredbouin commented 3 years ago

I'm running composer require aerni/snipcart in the root folder of my project and instantly getting the message in my initial post.

Underneath the error message I also get all this:

require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--no-scripts] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] []...

If i run it with --ignore-platform-reqs I get further into the installation process, it fails here:

Screen Shot 2021-03-17 at 8 02 33 AM
aerni commented 3 years ago

Thanks. I will take a look at this.

aerni commented 3 years ago

Ok. It looks like the dependency jordanbrauer/unit-converter is not yet compatible with PHP 8. You'll have to settle with PHP 7.4 for now.

I tested a fresh install on PHP 7.4 and can't reproduce the error you're describing. Make sure to install from like this composer require aerni/snipcart:dev-master.

fredbouin commented 3 years ago

ok all is good, after installing php 7.4 I hadn't updated my composer.json file to reflect that change. It seems to have installed successfully.

aerni commented 3 years ago

Cool!