wintercms / winter

Free, open-source, self-hosted CMS platform based on the Laravel PHP Framework.
https://wintercms.com
MIT License
1.37k stars 194 forks source link

v1.1 should be prevented from installing on PHP 8.1 #601

Closed multiwebinc closed 2 years ago

multiwebinc commented 2 years ago

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:

mike@localhost:/var/www/html$ composer create-project wintercms/winter winter
Creating a "wintercms/winter" project at "./winter"
Info from https://repo.packagist.org: #StandWithUkraine
Installing wintercms/winter (v1.1.8)
  - Downloading wintercms/winter (v1.1.8)
  - Installing wintercms/winter (v1.1.8): Extracting archive
Created project in /var/www/html/winter
Loading composer repositories with package information
Updating dependencies
Lock file operations: 106 installs, 0 updates, 0 removals
  - Locking composer/installers (v1.12.0)
  - Locking composer/semver (3.3.2)
  - Locking dms/phpunit-arraysubset-asserts (v0.2.1)
  - Locking doctrine/cache (2.2.0)
  - Locking doctrine/dbal (2.13.9)
  - Locking doctrine/deprecations (v1.0.0)
  - Locking doctrine/event-manager (1.1.1)
  - Locking doctrine/inflector (2.0.4)
  - Locking doctrine/instantiator (1.4.1)
  - Locking doctrine/lexer (1.2.3)
  - Locking dragonmantank/cron-expression (v2.3.1)
  - Locking egulias/email-validator (2.1.25)
  - Locking erusev/parsedown (1.7.4)
  - Locking erusev/parsedown-extra (0.8.1)
  - Locking fakerphp/faker (v1.19.0)
  - Locking hamcrest/hamcrest-php (v2.0.1)
  - Locking laravel/framework (v6.20.44)
  - Locking laravel/tinker (v2.7.2)
  - Locking league/commonmark (1.6.7)
  - Locking league/csv (9.8.0)
  - Locking league/flysystem (1.1.9)
  - Locking league/mime-type-detection (1.11.0)
  - Locking linkorb/jsmin-php (1.0.0)
  - Locking mockery/mockery (1.5.0)
  - Locking monolog/monolog (2.7.0)
  - Locking myclabs/deep-copy (1.11.0)
  - Locking nesbot/carbon (2.59.1)
  - Locking nikic/php-parser (v4.14.0)
  - Locking opis/closure (3.6.3)
  - Locking paragonie/random_compat (v9.99.100)
  - Locking phar-io/manifest (2.0.3)
  - Locking phar-io/version (3.2.1)
  - Locking php-parallel-lint/php-parallel-lint (v1.3.2)
  - Locking phpdocumentor/reflection-common (2.2.0)
  - Locking phpdocumentor/reflection-docblock (5.3.0)
  - Locking phpdocumentor/type-resolver (1.6.1)
  - Locking phpoption/phpoption (1.8.1)
  - Locking phpspec/prophecy (v1.15.0)
  - Locking phpunit/php-code-coverage (9.2.15)
  - Locking phpunit/php-file-iterator (3.0.6)
  - Locking phpunit/php-invoker (3.1.1)
  - Locking phpunit/php-text-template (2.0.4)
  - Locking phpunit/php-timer (5.0.3)
  - Locking phpunit/phpunit (9.5.21)
  - Locking psr/container (1.1.2)
  - Locking psr/log (2.0.0)
  - Locking psr/simple-cache (1.0.1)
  - Locking psy/psysh (v0.11.7)
  - Locking ramsey/uuid (3.9.6)
  - Locking scssphp/scssphp (v1.10.3)
  - Locking sebastian/cli-parser (1.0.1)
  - Locking sebastian/code-unit (1.0.8)
  - Locking sebastian/code-unit-reverse-lookup (2.0.3)
  - Locking sebastian/comparator (4.0.6)
  - Locking sebastian/complexity (2.0.2)
  - Locking sebastian/diff (4.0.4)
  - Locking sebastian/environment (5.1.4)
  - Locking sebastian/exporter (4.0.4)
  - Locking sebastian/global-state (5.0.5)
  - Locking sebastian/lines-of-code (1.0.3)
  - Locking sebastian/object-enumerator (4.0.4)
  - Locking sebastian/object-reflector (2.0.4)
  - Locking sebastian/recursion-context (4.0.4)
  - Locking sebastian/resource-operations (3.0.3)
  - Locking sebastian/type (3.0.0)
  - Locking sebastian/version (3.0.2)
  - Locking squizlabs/php_codesniffer (3.7.1)
  - Locking swiftmailer/swiftmailer (v6.3.0)
  - Locking symfony/console (v4.4.43)
  - Locking symfony/css-selector (v6.1.0)
  - Locking symfony/debug (v4.4.41)
  - Locking symfony/deprecation-contracts (v3.1.1)
  - Locking symfony/error-handler (v4.4.41)
  - Locking symfony/event-dispatcher (v4.4.42)
  - Locking symfony/event-dispatcher-contracts (v1.1.13)
  - Locking symfony/finder (v4.4.41)
  - Locking symfony/http-client-contracts (v2.5.2)
  - Locking symfony/http-foundation (v4.4.43)
  - Locking symfony/http-kernel (v4.4.43)
  - Locking symfony/mime (v5.4.10)
  - Locking symfony/polyfill-ctype (v1.26.0)
  - Locking symfony/polyfill-iconv (v1.26.0)
  - Locking symfony/polyfill-intl-idn (v1.26.0)
  - Locking symfony/polyfill-intl-normalizer (v1.26.0)
  - Locking symfony/polyfill-mbstring (v1.26.0)
  - Locking symfony/polyfill-php72 (v1.26.0)
  - Locking symfony/polyfill-php73 (v1.26.0)
  - Locking symfony/polyfill-php80 (v1.26.0)
  - Locking symfony/process (v4.4.41)
  - Locking symfony/routing (v4.4.41)
  - Locking symfony/service-contracts (v2.5.2)
  - Locking symfony/translation (v4.4.41)
  - Locking symfony/translation-contracts (v2.5.2)
  - Locking symfony/var-dumper (v4.4.42)
  - Locking symfony/yaml (v3.4.47)
  - Locking theseer/tokenizer (1.2.1)
  - Locking tijsverkoyen/css-to-inline-styles (2.2.4)
  - Locking twig/twig (v2.15.1)
  - Locking vlucas/phpdotenv (v3.6.10)
  - Locking webmozart/assert (1.11.0)
  - Locking wikimedia/composer-merge-plugin (v2.0.1)
  - Locking wikimedia/less.php (v3.1.0)
  - Locking winter/storm (v1.1.8)
  - Locking winter/wn-backend-module (v1.1.8)
  - Locking winter/wn-cms-module (v1.1.8)
  - Locking winter/wn-system-module (v1.1.8)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 106 installs, 0 updates, 0 removals
  - Downloading wikimedia/composer-merge-plugin (v2.0.1)
  - Downloading composer/installers (v1.12.0)
  - Downloading sebastian/version (3.0.2)
  - Downloading sebastian/type (3.0.0)
  - Downloading sebastian/resource-operations (3.0.3)
  - Downloading sebastian/recursion-context (4.0.4)
  - Downloading sebastian/object-reflector (2.0.4)
  - Downloading sebastian/object-enumerator (4.0.4)
  - Downloading sebastian/global-state (5.0.5)
  - Downloading sebastian/exporter (4.0.4)
  - Downloading sebastian/environment (5.1.4)
  - Downloading sebastian/diff (4.0.4)
  - Downloading sebastian/comparator (4.0.6)
  - Downloading sebastian/code-unit (1.0.8)
  - Downloading sebastian/cli-parser (1.0.1)
  - Downloading phpunit/php-timer (5.0.3)
  - Downloading phpunit/php-text-template (2.0.4)
  - Downloading phpunit/php-invoker (3.1.1)
  - Downloading phpunit/php-file-iterator (3.0.6)
  - Downloading theseer/tokenizer (1.2.1)
  - Downloading nikic/php-parser (v4.14.0)
  - Downloading sebastian/lines-of-code (1.0.3)
  - Downloading sebastian/complexity (2.0.2)
  - Downloading sebastian/code-unit-reverse-lookup (2.0.3)
  - Downloading phpunit/php-code-coverage (9.2.15)
  - Downloading symfony/polyfill-ctype (v1.26.0)
  - Downloading webmozart/assert (1.11.0)
  - Downloading phpdocumentor/reflection-common (2.2.0)
  - Downloading phpdocumentor/type-resolver (1.6.1)
  - Downloading phpdocumentor/reflection-docblock (5.3.0)
  - Downloading doctrine/instantiator (1.4.1)
  - Downloading phpspec/prophecy (v1.15.0)
  - Downloading phar-io/version (3.2.1)
  - Downloading phar-io/manifest (2.0.3)
  - Downloading myclabs/deep-copy (1.11.0)
  - Downloading symfony/polyfill-mbstring (v1.26.0)
  - Downloading phpunit/phpunit (9.5.21)
  - Downloading dms/phpunit-arraysubset-asserts (v0.2.1)
  - Downloading doctrine/cache (2.2.0)
  - Downloading doctrine/deprecations (v1.0.0)
  - Downloading doctrine/event-manager (1.1.1)
  - Downloading doctrine/inflector (2.0.4)
  - Downloading doctrine/lexer (1.2.3)
  - Downloading dragonmantank/cron-expression (v2.3.1)
  - Downloading erusev/parsedown (1.7.4)
  - Downloading symfony/deprecation-contracts (v3.1.1)
  - Downloading psr/container (1.1.2)
  - Downloading fakerphp/faker (v1.19.0)
  - Downloading league/commonmark (1.6.7)
  - Downloading league/mime-type-detection (1.11.0)
  - Downloading league/flysystem (1.1.9)
  - Downloading hamcrest/hamcrest-php (v2.0.1)
  - Downloading mockery/mockery (1.5.0)
  - Downloading psr/log (2.0.0)
  - Downloading monolog/monolog (2.7.0)
  - Downloading opis/closure (3.6.3)
  - Downloading php-parallel-lint/php-parallel-lint (v1.3.2)
  - Downloading psr/simple-cache (1.0.1)
  - Downloading symfony/polyfill-php80 (v1.26.0)
  - Downloading symfony/polyfill-php72 (v1.26.0)
  - Downloading symfony/var-dumper (v4.4.42)
  - Downloading symfony/service-contracts (v2.5.2)
  - Downloading symfony/polyfill-php73 (v1.26.0)
  - Downloading symfony/console (v4.4.43)
  - Downloading psy/psysh (v0.11.7)
  - Downloading paragonie/random_compat (v9.99.100)
  - Downloading ramsey/uuid (3.9.6)
  - Downloading squizlabs/php_codesniffer (3.7.1)
  - Downloading symfony/polyfill-intl-normalizer (v1.26.0)
  - Downloading symfony/polyfill-intl-idn (v1.26.0)
  - Downloading symfony/polyfill-iconv (v1.26.0)
  - Downloading egulias/email-validator (2.1.25)
  - Downloading swiftmailer/swiftmailer (v6.3.0)
  - Downloading symfony/debug (v4.4.41)
  - Downloading symfony/event-dispatcher-contracts (v1.1.13)
  - Downloading symfony/finder (v4.4.41)
  - Downloading symfony/mime (v5.4.10)
  - Downloading symfony/http-foundation (v4.4.43)
  - Downloading symfony/http-client-contracts (v2.5.2)
  - Downloading symfony/event-dispatcher (v4.4.42)
  - Downloading symfony/error-handler (v4.4.41)
  - Downloading symfony/http-kernel (v4.4.43)
  - Downloading symfony/process (v4.4.41)
  - Downloading symfony/routing (v4.4.41)
  - Downloading symfony/translation-contracts (v2.5.2)
  - Downloading symfony/translation (v4.4.41)
  - Downloading symfony/css-selector (v6.1.0)
  - Downloading tijsverkoyen/css-to-inline-styles (2.2.4)
  - Downloading phpoption/phpoption (1.8.1)
  - Downloading vlucas/phpdotenv (v3.6.10)
  - Downloading wikimedia/less.php (v3.1.0)
  - Downloading twig/twig (v2.15.1)
  - Downloading symfony/yaml (v3.4.47)
  - Downloading scssphp/scssphp (v1.10.3)
  - Downloading nesbot/carbon (2.59.1)
  - Downloading linkorb/jsmin-php (1.0.0)
  - Downloading league/csv (9.8.0)
  - Downloading laravel/framework (v6.20.44)
  - Downloading laravel/tinker (v2.7.2)
  - Downloading erusev/parsedown-extra (0.8.1)
  - Downloading doctrine/dbal (2.13.9)
  - Downloading winter/storm (v1.1.8)
  - Downloading winter/wn-backend-module (v1.1.8)
  - Downloading winter/wn-cms-module (v1.1.8)
  - Downloading composer/semver (3.3.2)
  - Downloading winter/wn-system-module (v1.1.8)
  - Installing wikimedia/composer-merge-plugin (v2.0.1): Extracting archive
  - Installing composer/installers (v1.12.0): Extracting archive
  - Installing sebastian/version (3.0.2): Extracting archive
  - Installing sebastian/type (3.0.0): Extracting archive
  - Installing sebastian/resource-operations (3.0.3): Extracting archive
  - Installing sebastian/recursion-context (4.0.4): Extracting archive
  - Installing sebastian/object-reflector (2.0.4): Extracting archive
  - Installing sebastian/object-enumerator (4.0.4): Extracting archive
  - Installing sebastian/global-state (5.0.5): Extracting archive
  - Installing sebastian/exporter (4.0.4): Extracting archive
  - Installing sebastian/environment (5.1.4): Extracting archive
  - Installing sebastian/diff (4.0.4): Extracting archive
  - Installing sebastian/comparator (4.0.6): Extracting archive
  - Installing sebastian/code-unit (1.0.8): Extracting archive
  - Installing sebastian/cli-parser (1.0.1): Extracting archive
  - Installing phpunit/php-timer (5.0.3): Extracting archive
  - Installing phpunit/php-text-template (2.0.4): Extracting archive
  - Installing phpunit/php-invoker (3.1.1): Extracting archive
  - Installing phpunit/php-file-iterator (3.0.6): Extracting archive
  - Installing theseer/tokenizer (1.2.1): Extracting archive
  - Installing nikic/php-parser (v4.14.0): Extracting archive
  - Installing sebastian/lines-of-code (1.0.3): Extracting archive
  - Installing sebastian/complexity (2.0.2): Extracting archive
  - Installing sebastian/code-unit-reverse-lookup (2.0.3): Extracting archive
  - Installing phpunit/php-code-coverage (9.2.15): Extracting archive
  - Installing symfony/polyfill-ctype (v1.26.0): Extracting archive
  - Installing webmozart/assert (1.11.0): Extracting archive
  - Installing phpdocumentor/reflection-common (2.2.0): Extracting archive
  - Installing phpdocumentor/type-resolver (1.6.1): Extracting archive
  - Installing phpdocumentor/reflection-docblock (5.3.0): Extracting archive
  - Installing doctrine/instantiator (1.4.1): Extracting archive
  - Installing phpspec/prophecy (v1.15.0): Extracting archive
  - Installing phar-io/version (3.2.1): Extracting archive
  - Installing phar-io/manifest (2.0.3): Extracting archive
  - Installing myclabs/deep-copy (1.11.0): Extracting archive
  - Installing symfony/polyfill-mbstring (v1.26.0): Extracting archive
  - Installing phpunit/phpunit (9.5.21): Extracting archive
  - Installing dms/phpunit-arraysubset-asserts (v0.2.1): Extracting archive
  - Installing doctrine/cache (2.2.0): Extracting archive
  - Installing doctrine/deprecations (v1.0.0): Extracting archive
  - Installing doctrine/event-manager (1.1.1): Extracting archive
  - Installing doctrine/inflector (2.0.4): Extracting archive
  - Installing doctrine/lexer (1.2.3): Extracting archive
  - Installing dragonmantank/cron-expression (v2.3.1): Extracting archive
  - Installing erusev/parsedown (1.7.4): Extracting archive
  - Installing symfony/deprecation-contracts (v3.1.1): Extracting archive
  - Installing psr/container (1.1.2): Extracting archive
  - Installing fakerphp/faker (v1.19.0): Extracting archive
  - Installing league/commonmark (1.6.7): Extracting archive
  - Installing league/mime-type-detection (1.11.0): Extracting archive
  - Installing league/flysystem (1.1.9): Extracting archive
  - Installing hamcrest/hamcrest-php (v2.0.1): Extracting archive
  - Installing mockery/mockery (1.5.0): Extracting archive
  - Installing psr/log (2.0.0): Extracting archive
  - Installing monolog/monolog (2.7.0): Extracting archive
  - Installing opis/closure (3.6.3): Extracting archive
  - Installing php-parallel-lint/php-parallel-lint (v1.3.2): Extracting archive
  - Installing psr/simple-cache (1.0.1): Extracting archive
  - Installing symfony/polyfill-php80 (v1.26.0): Extracting archive
  - Installing symfony/polyfill-php72 (v1.26.0): Extracting archive
  - Installing symfony/var-dumper (v4.4.42): Extracting archive
  - Installing symfony/service-contracts (v2.5.2): Extracting archive
  - Installing symfony/polyfill-php73 (v1.26.0): Extracting archive
  - Installing symfony/console (v4.4.43): Extracting archive
  - Installing psy/psysh (v0.11.7): Extracting archive
  - Installing paragonie/random_compat (v9.99.100): Extracting archive
  - Installing ramsey/uuid (3.9.6): Extracting archive
  - Installing squizlabs/php_codesniffer (3.7.1): Extracting archive
  - Installing symfony/polyfill-intl-normalizer (v1.26.0): Extracting archive
  - Installing symfony/polyfill-intl-idn (v1.26.0): Extracting archive
  - Installing symfony/polyfill-iconv (v1.26.0): Extracting archive
  - Installing egulias/email-validator (2.1.25): Extracting archive
  - Installing swiftmailer/swiftmailer (v6.3.0): Extracting archive
  - Installing symfony/debug (v4.4.41): Extracting archive
  - Installing symfony/event-dispatcher-contracts (v1.1.13): Extracting archive
  - Installing symfony/finder (v4.4.41): Extracting archive
  - Installing symfony/mime (v5.4.10): Extracting archive
  - Installing symfony/http-foundation (v4.4.43): Extracting archive
  - Installing symfony/http-client-contracts (v2.5.2): Extracting archive
  - Installing symfony/event-dispatcher (v4.4.42): Extracting archive
  - Installing symfony/error-handler (v4.4.41): Extracting archive
  - Installing symfony/http-kernel (v4.4.43): Extracting archive
  - Installing symfony/process (v4.4.41): Extracting archive
  - Installing symfony/routing (v4.4.41): Extracting archive
  - Installing symfony/translation-contracts (v2.5.2): Extracting archive
  - Installing symfony/translation (v4.4.41): Extracting archive
  - Installing symfony/css-selector (v6.1.0): Extracting archive
  - Installing tijsverkoyen/css-to-inline-styles (2.2.4): Extracting archive
  - Installing phpoption/phpoption (1.8.1): Extracting archive
  - Installing vlucas/phpdotenv (v3.6.10): Extracting archive
  - Installing wikimedia/less.php (v3.1.0): Extracting archive
  - Installing twig/twig (v2.15.1): Extracting archive
  - Installing symfony/yaml (v3.4.47): Extracting archive
  - Installing scssphp/scssphp (v1.10.3): Extracting archive
  - Installing nesbot/carbon (2.59.1): Extracting archive
  - Installing linkorb/jsmin-php (1.0.0): Extracting archive
  - Installing league/csv (9.8.0): Extracting archive
  - Installing laravel/framework (v6.20.44): Extracting archive
  - Installing laravel/tinker (v2.7.2): Extracting archive
  - Installing erusev/parsedown-extra (0.8.1): Extracting archive
  - Installing doctrine/dbal (2.13.9): Extracting archive
  - Installing winter/storm (v1.1.8): Extracting archive
  - Installing winter/wn-backend-module (v1.1.8): Extracting archive
  - Installing winter/wn-cms-module (v1.1.8): Extracting archive
  - Installing composer/semver (3.3.2): Extracting archive
  - Installing winter/wn-system-module (v1.1.8): Extracting archive
69 package suggestions were added by new dependencies, use `composer suggest` to see details.
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.
Generating autoload files
76 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

Running composer update to apply merge settings
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.
Generating autoload files
76 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> php artisan winter:version
PHP Fatal error:  During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Http\Request::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/winter/vendor/laravel/framework/src/Illuminate/Http/Request.php:641
Stack trace:
#0 /var/www/html/winter/vendor/laravel/framework/src/Illuminate/Http/Request.php(20): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
#1 /var/www/html/winter/vendor/composer/ClassLoader.php(571): include('...')
#2 /var/www/html/winter/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile()
#3 /var/www/html/winter/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/SetRequestForConsole.php(31): Composer\Autoload\ClassLoader->loadClass()
#4 /var/www/html/winter/vendor/winter/storm/src/Foundation/Application.php(127): Illuminate\Foundation\Bootstrap\SetRequestForConsole->bootstrap()
#5 /var/www/html/winter/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(320): Winter\Storm\Foundation\Application->bootstrapWith()
#6 /var/www/html/winter/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\Foundation\Console\Kernel->bootstrap()
#7 /var/www/html/winter/artisan(35): Illuminate\Foundation\Console\Kernel->handle()
#8 {main} in /var/www/html/winter/vendor/laravel/framework/src/Illuminate/Http/Request.php on line 20

In Request.php line 20:

  During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Http\Request::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChang  
  e] attribute should be used to temporarily suppress the notice in /var/www/html/winter/vendor/laravel/framework/src/Illuminate/Http/Request.php:641                                                                                       
  Stack trace:                                                                                                                                                                                                                              
  #0 /var/www/html/winter/vendor/laravel/framework/src/Illuminate/Http/Request.php(20): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()                                                                                     
  #1 /var/www/html/winter/vendor/composer/ClassLoader.php(571): include('...')                                                                                                                                                              
  #2 /var/www/html/winter/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile()                                                                                                                                             
  #3 /var/www/html/winter/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/SetRequestForConsole.php(31): Composer\Autoload\ClassLoader->loadClass()                                                                             
  #4 /var/www/html/winter/vendor/winter/storm/src/Foundation/Application.php(127): Illuminate\Foundation\Bootstrap\SetRequestForConsole->bootstrap()                                                                                        
  #5 /var/www/html/winter/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(320): Winter\Storm\Foundation\Application->bootstrapWith()                                                                                  
  #6 /var/www/html/winter/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\Foundation\Console\Kernel->bootstrap()                                                                                     
  #7 /var/www/html/winter/artisan(35): Illuminate\Foundation\Console\Kernel->handle()                                                                                                                                                       
  #8 {main}                                                                                                                                                                                                                                 

Script php artisan winter:version handling the post-update-cmd event returned with error code 255

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).

sudo apt-get update &&
sudo apt-get install php php-ctype php-curl php-xml php-fileinfo php-gd php-json php-mbstring php-mysql php-sqlite3 php-zip
composer create-project wintercms/winter

Workaround

No response

mjauvin commented 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)

multiwebinc commented 2 years ago

@mjauvin Would it be possible to display a more meaningful error?

multiwebinc commented 2 years ago

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.

LukeTowers commented 2 years ago

@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

multiwebinc commented 2 years ago

@LukeTowers I think that should be ~8.0.0, since ^8.0.1 matches versions >=8.0.1 <9.0.0-0.