craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.28k stars 634 forks source link

[5.x]: Uncaught Fatal Error in App helper when upgrading to 5.5.1 #16143

Closed chrispicyweb closed 3 days ago

chrispicyweb commented 3 days ago

What happened?

Description

Upgrading from 5.3 to 5.1 throws a fatal error.

Steps to reproduce

  1. Run ddev composer update to update to 5.5.1
  2. Open the site, or try to run any craft console command

Expected behavior

Normal update.

Actual behavior

The following fatal error is thrown in all modes, including console:

Uncaught Error: Class "Craft" not found in /var/www/html/vendor/craftcms/cms/src/helpers/App.php:287

Console error log:

PHP Fatal error:  Uncaught Error: Class "Craft" not found in /var/www/html/vendor/craftcms/cms/src/helpers/App.php:287
Stack trace:
#0 /var/www/html/vendor/craftcms/cms/bootstrap/bootstrap.php(31): craft\helpers\App::cliOption()
#1 /var/www/html/vendor/craftcms/cms/bootstrap/bootstrap.php(35): {closure}()
#2 /var/www/html/vendor/craftcms/cms/bootstrap/console.php(42): require('...')
#3 /var/www/html/craft(9): require('...')
#4 {main}
  thrown in /var/www/html/vendor/craftcms/cms/src/helpers/App.php on line 287
Fatal error: Uncaught Error: Class "Craft" not found in /var/www/html/vendor/craftcms/cms/src/helpers/App.php:287
Stack trace:
#0 /var/www/html/vendor/craftcms/cms/bootstrap/bootstrap.php(31): craft\helpers\App::cliOption()
#1 /var/www/html/vendor/craftcms/cms/bootstrap/bootstrap.php(35): {closure}()
#2 /var/www/html/vendor/craftcms/cms/bootstrap/console.php(42): require('...')
#3 /var/www/html/craft(9): require('...')
#4 {main}
  thrown in /var/www/html/vendor/craftcms/cms/src/helpers/App.php on line 287

Craft CMS version

5.5.1

PHP version

8.3

Operating system and version

MacOS 15.0.1 (24A348)

Database type and version

MySQL 8.0

Image driver and version

No response

Installed plugins and versions

Composer:

        "craftcms/cms": "^5.3.0",
        "craftcms/contact-form": "^3.1.0",
        "spicyweb/craft-neo": "^5.1.0",
        "spicyweb/craft-embedded-assets": "^5.1.0",
        "vlucas/phpdotenv": "^5.6.0",
        "ether/seo": "^5.0.0-rc4",
        "ttempleton/craft-nocache": "^3.0.2",
        "mwikala/linode-s3": "dev-main",
        "yiisoft/yii2-redis": "^2.0",
        "nystudio107/craft-code-field": "^5.0.0",
        "craftcms/shopify": "^5.0.0",
        "spicyweb/craft-tinymce": "^2.0.0"
brandonkelly commented 3 days ago

Doh, thanks for reporting. Fixed in 5.5.1.1.