我正在尝试将旧版扩展更新为 Typo3 V11。 目前我收到以下错误:
这里是 Services.yaml 文件:
# Configuration/Services.yaml
services:
_defaults:
autowire: true
autoconfigure: true
public: false
HGA\Simpleblog\:
resource: '../Classes/*'
exclude: '../Classes/Domain/Model/*'
HGA\Simpleblog\Utilities\SqlUtil:
public: true
这里是 BlogsController.php 文件的开头:
<?php
namespace HGA\Simpleblog\Controller;
use \Psr\Http\Message\ResponseInterface;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
use TYPO3\CMS\Extbase\Http\ForwardResponse;
use TYPO3\CMS\Core\Core\Environment as Environment;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use HGA\Simpleblog\Utilities;
use HGA\Simpleblog\Utilities\SqlUtil;
use HGA\Simpleblog\Domain\Model;
use HGA\Simpleblog\Domain\Repository;
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
use TYPO3\CMS\Extbase\Annotation\Inject;
/***
*
* This file is part of the "SimpleBlog" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
***/
/**
* BlogsController
*/
class BlogsController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
{
/**
* @var SqlUtil $sqlUtil
*/
protected $sqlUtil;
public function __construct(SqlUtil $sqlUtil)
{
$this->sqlUtil = $sqlUtil;
}
在我看来,BlogsController 类包含在上述文件中。 该扩展适用于旧版本的 Typo3。但我必须添加
Services.yaml
文件。
我没有使用作曲家! TYPO3 V11.5.8.
知道,可能是什么问题?
编辑
过了一段时间,问题就消失了!我在这期间所做的就是更新 Windows Server 2019 操作系统。
文件名真的是
BlogController.php
吗,但应该是BlogsController.php
。