nystudio107 / craft

nystudio107 Craft 3 CMS scaffolding project
BSD Zero Clause License
291 stars 84 forks source link

Trying to upgrade a fresh install to craft4 #84

Closed E2design closed 2 years ago

E2design commented 2 years ago

Describe the bug

I'm trying to upgrade a fresh install off craft/vite to craft 4. The update process results in the following error:

Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0". You are running 8.0.13. in /var/www/project/cms/vendor/composer/platform_check.php on line 24 make: *** [craft] Error 255

To reproduce

Steps to reproduce the behaviour: 1 composer create-project nystudio107/craft craft4 --no-install 2 make dev 3 login http://localhost:8000/admin/ check update utility and clear cache 4 change composer.json to:

{ "minimum-stability": "beta", "prefer-stable": true, "require": { "php": "^8.0.2", "craftcms/cms": "^4.0.0", "vlucas/phpdotenv": "^5.4.0", "yiisoft/yii2-redis": "^2.0.6", "nystudio107/craft-imageoptimize": "^4.0.0-beta.3", "nystudio107/craft-fastcgicachebust": "^4.0.0-beta.1", "nystudio107/craft-minify": "^4.0.0-beta.2", "nystudio107/craft-typogrify": "^4.0.0", "nystudio107/craft-retour": "^4.0.1", "nystudio107/craft-seomatic": "^4.0.1", "nystudio107/craft-templatecomments": "^4.0.0", "nystudio107/craft-webperf": "^4.0.0-beta.3", "nystudio107/craft-vite": "^4.0.0" },

5 cd cms run composer update 6 update executed correctly with these last 5 lines:

`> Composer\Config::disableProcessTimeout

@php craft install/check && php craft clear-caches/all --interactive=0 || exit 0 Craft is not installed yet. @php craft install/check && php craft up --interactive=0 || exit 0 Craft is not installed yet.`

7 cd to root and run make craft migrate/all:

Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0". You are running 8.0.13. in /var/www/project/cms/vendor/composer/platform_check.php on line 24 make: *** [craft] Error 255

Expected behaviour

Expected the upgrade to run, as Craft 4 supposed to need a PHP version from 8.0.2. While version 8.0.13 is active.

khalwat commented 2 years ago

Some version of something you're requiring is saying it needs PHP 8.1.0 or later. Craft CMS 4 only requires 8.0.2 or later, so it must be some other package.

This repo is based off of the same boilerplate, and works with Craft 4 without issue: https://github.com/nystudio107/devmode

In any event, I will update the boilerplate soon to use Craft 4 by default.

E2design commented 2 years ago

Clear. Looking forward to the update with Craft4.