【发布时间】:2021-07-21 08:35:48
【问题描述】:
我应该从我的客户那里更新一个typo3 v9.5 网站。在我接触现场系统之前,我想用演示站点进行试运行,所以我启动了一个干净的 9.5 站点运行
composer create-project typo3/cms-base-distribution:^9.5 .
在那之后,我做了typo3 网络安装的东西并让网站正常工作。我现在想要实现的是将网站更新到至少 10.4。我一开始运行了数据库分析器,它告诉我一切都很好,正如你在这里看到的那样。
之后我运行了升级向导。它告诉我它必须更改数据库排序规则,因为它是 utf_8_general_ci。但没有其他事情要做。
在那之后我去了composer update --with-dependencies,这告诉我没有什么可以安装、更新或删除的。在这一点上我有点困惑,因为系统没有显示出重大更新的机会。在尝试了一些事情之后,我去更新 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"
]
}
}
在运行另一个composer update 后,更新本身得到了更新,但是数据库没有得到更新,导致我由于缺少表而无法登录。我显然没有正确更新网站,现在我做错了什么?我尝试按照官方的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
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"
]
}
}
【问题讨论】:
-
当
composer update没有产生要更新的包时,composer.json的外观如何? -
.....好吧,如果您的配置要求安装
"typo3/minimal": "^9.5",这不是很明显不会安装v10吗? -
是的,我知道,但就像我说的,我尝试安装 9.5 版本,然后将其升级到 10.4。不知道为什么最小的包应该是一个问题
-
您是如何尝试更新到 v10 的?没有将
composer.json中的版本约束编辑为允许安装 v10 软件包的任何内容? -
就像我写的那样,我只是将 composer.json 从 9.5 版本换成 10.4 版本之一
标签: composer-php typo3 typo3-9.x typo3-extensions typo3-10.x