Closed multiwebinc closed 2 years ago
You're trying to install 1.1.X branch which does not run on PHP 8.1 (Laravel 6 requires PHP 8.0 or older)
@mjauvin Would it be possible to display a more meaningful error?
Here's a quick bootstrap thing I whipped up:
<?php namespace Winter\Storm\Foundation\Bootstrap;
class VerifyPHPCompatibility
{
private $php_version_minimum = '7.2';
private $php_version_less_than = '8.1';
/**
* Make sure PHP is compatible with WinterCMS
*
* @return void
*/
public function bootstrap()
{
if (version_compare(phpversion(), $this->php_version_minimum, '<')
|| version_compare(phpversion(), $this->php_version_less_than, '>=')
) {
trigger_error("PHP >= {$this->php_version_minimum} and < {$this->php_version_less_than} is required", E_USER_ERROR);
}
}
}
Let me know if you're interested in a PR.
@multiwebinc the solution would actually be to fix the PHP version requirement in composer.json:
https://github.com/wintercms/winter/blob/v1.1.8/composer.json#L32
Should be |^8.0.1
@LukeTowers I think that should be ~8.0.0
, since ^8.0.1
matches versions >=8.0.1 <9.0.0-0
.
Winter CMS Build
Other (please specify below)
PHP Version
8.1
Database engine
Other (please specify below)
Plugins installed
No response
Issue description
Installation fails via Composer:
Steps to replicate
I created a fresh Linode server and executed the following commands (as per https://wintercms.com/docs/setup/installation and https://wintercms.com/docs/help/using-composer).
Workaround
No response