无法使用 "php artisan october:update" 命令或后端功能更新 October CMS

Can't update October CMS with "php artisan october:update" command or with Backend Function

我无法更新我 10 月份的所有 CMS 网站,因为我遇到了这个错误。

当我使用“composer install”时它工作正常,在“php artisan october:update”之后网站又坏了,我收到这个错误消息。

因为这个问题,插件也没有更新。

root@1aa8a5669855:/var/www/html# php artisan october:update

Warning: require(/var/www/html/vendor/composer/../symfony/polyfill-php70/bootstrap.php): failed to open stream: No such file or directory in /var/www/html/vendor/composer/autoload_real.php on line 66

Call Stack:
    0.0002     392416   1. {main}() /var/www/html/artisan:0
    0.0024     394392   2. require('/var/www/html/bootstrap/autoload.php') /var/www/html/artisan:16
    0.0094     474816   3. require('/var/www/html/vendor/autoload.php') /var/www/html/bootstrap/autoload.php:37
    0.0115     488520   4. ComposerAutoloaderInitce290a037d2cbd6fc6b8d537449d0ac2::getLoader() /var/www/html/vendor/autoload.php:7
    0.0194     640720   5. composerRequirece290a037d2cbd6fc6b8d537449d0ac2($fileIdentifier = '023d27dca8066ef29e6739335ea73bad', $file = '/var/www/html/vendor/composer/../symfony/polyfill-php70/bootstrap.php') /var/www/html/vendor/composer/autoload_real.php:56


Fatal error: require(): Failed opening required '/var/www/html/vendor/composer/../symfony/polyfill-php70/bootstrap.php' (include_path='.:/usr/local/lib/php') in /var/www/html/vendor/composer/autoload_real.php on line 66

Call Stack:
    0.0002     392416   1. {main}() /var/www/html/artisan:0
    0.0024     394392   2. require('/var/www/html/bootstrap/autoload.php') /var/www/html/artisan:16
    0.0094     474816   3. require('/var/www/html/vendor/autoload.php') /var/www/html/bootstrap/autoload.php:37
    0.0115     488520   4. ComposerAutoloaderInitce290a037d2cbd6fc6b8d537449d0ac2::getLoader() /var/www/html/vendor/autoload.php:7
    0.0194     640720   5. composerRequirece290a037d2cbd6fc6b8d537449d0ac2($fileIdentifier = '023d27dca8066ef29e6739335ea73bad', $file = '/var/www/html/vendor/composer/../symfony/polyfill-php70/bootstrap.php') /var/www/html/vendor/composer/autoload_real.php:56

root@1aa8a5669855:/var/www/html# composer dump-autoload
The "wikimedia/composer-merge-plugin" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
Generating autoload files

Warning: Uncaught ErrorException: require(/var/www/html/vendor/composer/../october/rain/src/Parse/Assetic/Less/lessc.inc.php): failed to open stream: No such file or directory in /var/www/html/vendor/composer/autoload_real.php:71
Stack trace:
#0 /var/www/html/vendor/composer/autoload_real.php(71): Composer\Util\ErrorHandler::handle(2, 'require(/var/ww...', '/var/www/html/v...', 71, Array)
#1 /var/www/html/vendor/composer/autoload_real.php(71): require()
#2 /var/www/html/vendor/composer/autoload_real.php(61): composerRequirece290a037d2cbd6fc6b8d537449d0ac2('cd649ce7b2ed09f...', '/var/www/html/v...')
#3 /var/www/html/vendor/autoload.php(7): ComposerAutoloaderInitce290a037d2cbd6fc6b8d537449d0ac2::getLoader()
#4 /var/www/html/vendor/kylekatarnls/update-helper/src/UpdateHelper/UpdateHelper.php(143): include_once('/var/www/html/v...')
#5 /var/www/html/vendor/kylekatarnls/update-helper/src/UpdateHelper/ComposerPlugin.php(45): UpdateHelper\UpdateHelper::check(Object(Composer\Script\Event))
#6 [internal function]: UpdateHelper in /var/www/html/vendor/composer/autoload_real.php on line 71

Fatal error: composerRequirece290a037d2cbd6fc6b8d537449d0ac2(): Failed opening required '/var/www/html/vendor/composer/../october/rain/src/Parse/Assetic/Less/lessc.inc.php' (include_path='.:/usr/local/lib/php') in /var/www/html/vendor/composer/autoload_real.php on line 71

composer.json

"repositories": [
        {
            "type":"vcs",
            "url":"https://github.com/octoberrain/composer-merge-plugin"
        }
    ],
    "require": {
        "php": ">=7.3",
        "october/rain": "1.1.*",
        "october/system": "1.1.*",
        "october/backend": "1.1.*",
        "october/cms": "1.1.*",
        "laravel/framework": "~6.0",
        "friendsofphp/php-cs-fixer": "^2.16",
        "wikimedia/composer-merge-plugin": "dev-feature/composer-v2 as 1.5.0"
    },
    "require-dev": {
        "phpunit/phpunit": "^8.4|^9.3.3",
        "mockery/mockery": "~1.3.3|^1.4.2",
        "fzaninotto/faker": "~1.9",
        "squizlabs/php_codesniffer": "3.*",
        "php-parallel-lint/php-parallel-lint": "^1.0",
        "meyfa/phpunit-assert-gd": "^2.0.0",
        "dms/phpunit-arraysubset-asserts": "^0.1.0"
    },
    "autoload-dev": {
        "classmap": [
            "tests/concerns/InteractsWithAuthentication.php",
            "tests/fixtures/backend/models/UserFixture.php",
            "tests/TestCase.php",
            "tests/PluginTestCase.php"
        ]
    },

我使用“composer update”更新了 October CMS 系统,但使用“php artisan october:update”命令更新了插件。

我在文档中找到了解决方案:

IMPORTANT: If you are using using composer do NOT run this command without first making sure that cms.disableCoreUpdates is set to true. Doing so will cause conflicts between the marketplace version of October and the version available through composer. In order to update the core October installation when using composer run composer update instead.

所以我在 cms 配置文件上设置了 "disableCoreUpdates = true" 并且工作正常。 我可以更新所有插件而不更新系统。