简体   繁体   English

使用 Composer 更新 Typo3 9.5

[英]Update Typo3 9.5 with Composer

i'm supposed to update a typo3 v9.5 site from a customer of mine.我应该从我的客户那里更新一个typo3 v9.5 站点。 before im going to touch the live system i wanted to make a dry run with demo sites, so i spun up a clean 9.5 site running在我接触实时系统之前,我想对演示站点进行试运行,所以我启动了一个干净的 9.5 站点运行

composer create-project typo3/cms-base-distribution:^9.5 .

after that i did the typo3 web install stuff and got the site working.之后我做了typo3 web install的东西,让网站正常工作。 What i want to achieve now is to update the site to atleast 10.4.我现在想要实现的是将站点更新到至少 10.4。 i ran the database analyzer at first and it told me that everything is fine as you can see here.我一开始运行了数据库分析器,它告诉我一切都很好,正如你在这里看到的。

在此处输入图片说明

after that i ran the upgrade wizard.之后我运行了升级向导。 it told me that it had to change the database collation due to it being utf_8_general_ci.它告诉我它必须更改数据库排序规则,因为它是 utf_8_general_ci。 but nothing else had to be done.但没有其他事情要做。

在此处输入图片说明

after that i went to make a composer update --with-dependencies and this told me that there is nothing to install, update or to remove.在那之后,我去进行composer update --with-dependencies这告诉我没有什么可以安装、更新或删除的。 im kinda confused at this point because there are no points where the system showed the opportunity for a major update.在这一点上我有点困惑,因为系统没有显示出重大更新机会的点。 after trying a few things i went to update the composer.json itself and replaced it with a composer.json from a clean 10.4 version looking like that:在尝试了几件事之后,我去更新 composer.json 本身,并用一个干净的 10.4 版本的 composer.json 替换它,看起来像这样:

{
    "repositories": [
        { "type": "composer", "url": "https://composer.typo3.org/" }
    ],
    "name": "typo3/cms-base-distribution",
    "description" : "TYPO3 CMS Base Distribution",
    "license": "GPL-2.0-or-later",
    "config": {
        "platform": {
            "php": "7.2"
        }
    },
    "require": {
        "helhum/typo3-console": "^6.0.0@beta",
        "typo3/cms-about": "^10.4",
        "typo3/cms-backend": "^10.4",
        "typo3/cms-belog": "^10.4",
        "typo3/cms-beuser": "^10.4",
        "typo3/cms-core": "^10.4",
        "typo3/cms-dashboard": "^10.4",
        "typo3/cms-extbase": "^10.4",
        "typo3/cms-extensionmanager": "^10.4",
        "typo3/cms-felogin": "^10.4",
        "typo3/cms-filelist": "^10.4",
        "typo3/cms-fluid": "^10.4",
        "typo3/cms-fluid-styled-content": "^10.4",
        "typo3/cms-form": "^10.4",
        "typo3/cms-frontend": "^10.4",
        "typo3/cms-impexp": "^10.4",
        "typo3/cms-info": "^10.4",
        "typo3/cms-install": "^10.4",
        "typo3/cms-recordlist": "^10.4",
        "typo3/cms-rte-ckeditor": "^10.4",
        "typo3/cms-seo": "^10.4",
        "typo3/cms-setup": "^10.4",
        "typo3/cms-sys-note": "^10.4",
        "typo3/cms-t3editor": "^10.4",
        "typo3/cms-tstemplate": "^10.4",
        "typo3/cms-viewpage": "^10.4"
        
    },
    "scripts":{
        "typo3-cms-scripts": [
            "typo3cms install:fixfolderstructure",
            "typo3cms install:generatepackagestates"
        ],
        "post-autoload-dump": [
            "@typo3-cms-scripts"
        ]
    }
}

after running another composer update the update itself gets made, however the database doesnt get updated leading to me not being able to loging because of missing tables.在运行另一个composer update ,更新本身得到了更新,但是数据库没有得到更新,导致我由于缺少表而无法登录。 i obviously didnt update the site right, now what did i do wrong?我显然没有正确更新网站,现在我做错了什么? i tried following the official typo3 documentation.我尝试按照官方的typo3 文档进行操作。

Oops, an error occurred! An exception occurred while executing 'SELECT content FROM cache_hash WHERE (identifier = ?) AND (expires >= ?)' with params ["d07b003d9fce07cd551ada22027bf881", 1626341203]: Table 'complan4.cache_hash' doesn't exist

the composer.json looked like that before: composer.json 之前看起来像这样:

{
    "repositories": [
        { "type": "composer", "url": "https://composer.typo3.org/" }
    ],
    "name": "typo3/cms-base-distribution",
    "description" : "TYPO3 CMS Base Distribution",
    "license": "GPL-2.0-or-later",
    "config": {
        "platform": {
            "php": "7.2"
        }
    },
    "require": {
        "helhum/typo3-console": "^5.5.5",
        "typo3/minimal": "^9.5",
        "typo3/cms-about": "^9.5",
        "typo3/cms-adminpanel": "^9.5",
        "typo3/cms-belog": "^9.5",
        "typo3/cms-beuser": "^9.5",
        "typo3/cms-felogin": "^9.5",
        "typo3/cms-fluid-styled-content": "^9.5",
        "typo3/cms-form": "^9.5",
        "typo3/cms-impexp": "^9.5",
        "typo3/cms-info": "^9.5",
        "typo3/cms-redirects": "^9.5",
        "typo3/cms-reports": "^9.5",
        "typo3/cms-rte-ckeditor": "^9.5",
        "typo3/cms-setup": "^9.5",
        "typo3/cms-seo": "^9.5",
        "typo3/cms-sys-note": "^9.5",
        "typo3/cms-t3editor": "^9.5",
        "typo3/cms-tstemplate": "^9.5",
        "typo3/cms-viewpage": "^9.5"
    },
    "scripts":{
        "typo3-cms-scripts": [
            "typo3cms install:fixfolderstructure",
            "typo3cms install:generatepackagestates"
        ],
        "post-autoload-dump": [
            "@typo3-cms-scripts"
        ]
    }
}

After running the composer update you can't login to the full backend anymore, but you still can login to the install tool containing the necessary upgrade and maintenance modules.运行 composer update 后,您无法再登录完整后端,但您仍然可以登录包含必要升级和维护模块的安装工具。

Just use https://your.domain.tld/typo3/install.php只需使用https://your.domain.tld/typo3/install.php

and login with the given install tool password, which should be the same as the admin password if you just did a quick and dirty default install.并使用给定的安装工具密码登录,如果您只是进行了快速而肮脏的默认安装,则该密码应该与管理员密码相同。

Then you can run all the necessary DB updates and upgrade wizards.然后您可以运行所有必要的数据库更新和升级向导。

If you still run into problems you might want to consider booking a professional upgrade service.如果您仍然遇到问题,您可能需要考虑预订专业的升级服务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM