PHP 8.1.0 is required?

I tried to install the latest cockpit version and received this error on /install
**Fatal error** : Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0". You are running 8.0.8

Is it true we must have PHP 8.1 to install and use the CMS? This wouldn’t work for us on so many current projects.

PHP 8.1 already reached EOL, there will be also no security updates after 11.2023. So no, Cockpit won’t support 8.0. Why is it that hard for you to update to PHP 8.1 or 8.2?

I’m pretty certain php 8.1 isn’t eol but frankly a lot of sites need time to upgrade to the latest versions. Why only support the absolute latest php version only or a minor version of the language.

@artur PHP 8.0 has security support until Nov 26, 2023, but active support has passed.

Agree though, its not a difficult upgrade, especially if you’re using containers (my preference). With 8.1 being released Nov 25, 2021, it is 1 yr and 3 months into stability and ample time to upgrade.

@oboogy Its never fun finding out these things by surprise, I appreciate your frustration there. You can view the current Requirements here: Requirements

Hope updating isn’t a big headache for ya, good luck.

1 Like

Honestly it’s very common for applications to remain on older versions of a language due to many restrictions, but 8.0 is definitely not old. You can be sure there are thousands of applications NOT on PHP 8.1 today. Seems strange to require a minor version of a language. We’ll revisit this at a later time.

if you really need cockpit on PHP lower then 8.2 download cockpit v1 from the legacy repo: GitHub - agentejo/cockpit: Add content management functionality to any site - plug & play / headless / api-first CMS - it’s still a reasonable choice.

V1 requires at least PHP 7.3.0 and should also work with PHP 8.1 (I think I tested it the other day): cockpit/composer.json at next · agentejo/cockpit · GitHub / cockpit/platform_check.php at next · agentejo/cockpit · GitHub

You can lower the requirement in some file, which will allow Cockpit to work on PHP 8.0, but it’s not recommended, as certain functions may not work and you can get unexpected results. Wouldn’t advise to use this if you’re doing something ‘serious’.

It’s this file: lib/vendor/composer/platform_check.php. Change 80100 to 80000.

Another thing you could try is to download an earlier version of Cockpit, which actually runs fine on v8.0.

Obviously the real solution is to upgrade to v8.1 or later. Some hosting providers are a bit slow with upgrading though :frowning:.