TYPO3 CMS 第 9 版安装因词法分析器缺失而失败
TYPO3 CMS Version 9 Installation fails due to lexer missing
TYPO3 安装在最后一步失败。日志中的错误消息显示:PHP Fatal error: Class 'Doctrine\Common\Lexer' not found
这是代码(实际上是该项目中存在的所有代码):
.ddev/config.yaml
APIVersion: v0.20.0
name: v9
type: typo3
docroot: public
php_version: "7.2"
router_http_port: "80"
router_https_port: "443"
xdebug_enabled: false
additional_hostnames: []
provider: default
composer.json
{
"name": "vendor/v9",
"require": {
"typo3/minimal": "~9.3"
}
}
public/typo3conf/AdditionalConfiguration.php
<?php
/** #ddev-generated: Automatically generated TYPO3 AdditionalConfiguration.php file.
ddev manages this file and may delete or overwrite the file unless this comment is removed.
*/
$GLOBALS['TYPO3_CONF_VARS']['SYS']['trustedHostsPattern'] = '.*';
$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default'] = array_merge($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default'], [
'dbname' => 'db',
'host' => 'db',
'password' => 'db',
'port' => '3306',
'user' => 'db',
]);
ddev start && ddev ssh
然后 composer install
并在准备好后用 Y
确认 我打开 http://v9.ddev.local/ and get redirected to http://v9.ddev.local/typo3/install.php
现在我必须创建 FIRST_INSTALL。完毕。 "No problems detected, continue with installation"。第 2 步和第 3 步被跳过,因为 AdditionalConfiguration.php(由 ddev 生成)已经知道数据库连接。设置用户名和密码以及站点名称。 "Continue"
现在我得到一个蓝色的进度条,但没有任何反应。输入 ddev logs
显示此错误:
==> /var/log/nginx/error.log <==
2018/07/19 11:45:22 [error] 223#223: *440 FastCGI sent in stderr: "PHP message: PHP Fatal error: Class 'Doctrine\Common\Lexer' not found in /var/www/html/public/typo3/sysext/core/Classes/Database/Schema/Parser/Lexer.php on line 22" while reading response header from upstream, client: REMOVED_IP_ADDRESS, server: _, request: "POST /typo3/install.php HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm.sock:", host: "v9.ddev.local", referrer: "http://v9.ddev.local/typo3/install.php"
==> /var/log/php-fpm.log <==
[19-Jul-2018 11:45:22] WARNING: [pool www] child 232 said into stderr: "NOTICE: PHP message: PHP Fatal error: Class 'Doctrine\Common\Lexer' not found in /var/www/html/public/typo3/sysext/core/Classes/Database/Schema/Parser/Lexer.php on line 22"
听起来像是自动加载问题。你试过了吗ddev exec composer dump -d /var/www/html
?
'lexer class not found' 问题已经在最新的 master 中得到修复,但我不完全确定如何告诉 ddev 使用它,或者如何手动应用补丁.或者,您可以使用较旧的学说版本(核心大师 composer.lock 中的版本应该可以)。
这是新 9 版本中的一个已知错误:
https://forge.typo3.org/issues/85552
如问题中所述,如果您在自己的 composer.json 中包含词法分析器,您应该能够修复它:
作曲家需要 doctrine/lexer:^1.0
TYPO3 安装在最后一步失败。日志中的错误消息显示:PHP Fatal error: Class 'Doctrine\Common\Lexer' not found
这是代码(实际上是该项目中存在的所有代码):
.ddev/config.yaml
APIVersion: v0.20.0
name: v9
type: typo3
docroot: public
php_version: "7.2"
router_http_port: "80"
router_https_port: "443"
xdebug_enabled: false
additional_hostnames: []
provider: default
composer.json
{
"name": "vendor/v9",
"require": {
"typo3/minimal": "~9.3"
}
}
public/typo3conf/AdditionalConfiguration.php
<?php
/** #ddev-generated: Automatically generated TYPO3 AdditionalConfiguration.php file.
ddev manages this file and may delete or overwrite the file unless this comment is removed.
*/
$GLOBALS['TYPO3_CONF_VARS']['SYS']['trustedHostsPattern'] = '.*';
$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default'] = array_merge($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default'], [
'dbname' => 'db',
'host' => 'db',
'password' => 'db',
'port' => '3306',
'user' => 'db',
]);
ddev start && ddev ssh
然后 composer install
并在准备好后用 Y
确认 我打开 http://v9.ddev.local/ and get redirected to http://v9.ddev.local/typo3/install.php
现在我必须创建 FIRST_INSTALL。完毕。 "No problems detected, continue with installation"。第 2 步和第 3 步被跳过,因为 AdditionalConfiguration.php(由 ddev 生成)已经知道数据库连接。设置用户名和密码以及站点名称。 "Continue"
现在我得到一个蓝色的进度条,但没有任何反应。输入 ddev logs
显示此错误:
==> /var/log/nginx/error.log <==
2018/07/19 11:45:22 [error] 223#223: *440 FastCGI sent in stderr: "PHP message: PHP Fatal error: Class 'Doctrine\Common\Lexer' not found in /var/www/html/public/typo3/sysext/core/Classes/Database/Schema/Parser/Lexer.php on line 22" while reading response header from upstream, client: REMOVED_IP_ADDRESS, server: _, request: "POST /typo3/install.php HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm.sock:", host: "v9.ddev.local", referrer: "http://v9.ddev.local/typo3/install.php"
==> /var/log/php-fpm.log <==
[19-Jul-2018 11:45:22] WARNING: [pool www] child 232 said into stderr: "NOTICE: PHP message: PHP Fatal error: Class 'Doctrine\Common\Lexer' not found in /var/www/html/public/typo3/sysext/core/Classes/Database/Schema/Parser/Lexer.php on line 22"
听起来像是自动加载问题。你试过了吗ddev exec composer dump -d /var/www/html
?
'lexer class not found' 问题已经在最新的 master 中得到修复,但我不完全确定如何告诉 ddev 使用它,或者如何手动应用补丁.或者,您可以使用较旧的学说版本(核心大师 composer.lock 中的版本应该可以)。
这是新 9 版本中的一个已知错误: https://forge.typo3.org/issues/85552
如问题中所述,如果您在自己的 composer.json 中包含词法分析器,您应该能够修复它: 作曲家需要 doctrine/lexer:^1.0