symfony - 从 Symfony 4.3 开始不支持在多行块中映射键,并将在 5.0 中抛出 ParseException
问题描述
我有个问题。更新到 Symfony 4.4 后,我收到以下弃用警告
Support for mapping keys in multi-line blocks is deprecated since Symfony 4.3 and will throw a ParseException in 5.0.
2x in AccountControllerTest::testSettings from App\Tests\Controller
1x in AccountControllerTest::testPageUser from App\Tests\Controller
我完全不知道这意味着什么。
来自 App\Tests\Controller 的 testSettings:
public function testSettings() {
$crawler = self::$userClient->request('GET', '/nl/account/settings.html');
$this->assertSuccesfulResponse(self::$userClient->getResponse());
$crawler = $this->form(self::$userClient, $crawler, 'submit', array(), '/\/nl\/account/');
}
提前致谢!
解决方案
这意味着您可能在 Yaml 文件的某处有一个多行键,并且 symfony 不支持它,在 symfony 5.0 中它会抛出异常而不是警告!
像这样的东西:
this
is
multi
key: test
推荐阅读
- rest - 如何确定 REST url 在 Delphi REST 服务器中是否包含 HTTPS?
- maximo-anywhere - IBM Maximo Anywhere 中的路由工作流
- python - Pandas,Geopandas.- 空间连接操作
- typo3 - TYPO3 9.5 LTS - 使用 routeEnhancers 配置自定义 PAGE 类型
- mysql - 为什么 MySQL 在没有 group by 语句的情况下给我一些聚合函数的结果
- python - 如何在python中有效地运行并行进程,而每个进程都应该从一个大文件中读取
- python - 使用 CMake 在 Windows 10 上简单地安装 ITK Elastix 以在 Python 中运行
- azure - Azure 指标观察到的指标值与 Auto Scaling 的实际指标值
- django - 'ForwardManyToOneDescriptor' 对象没有属性 'all
- typescript - 让 TypeScript 推断类型别名