自Symfony 4.3起,不支持在多行块中映射键,并且将在5.0中引发ParseException

问题描述 投票:0回答:1

我有问题。更新到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/');
}

提前感谢!

symfony deprecated multiline deprecation-warning
1个回答
0
投票

这意味着您可能在Yaml文件中的某个位置有一个多行键,而symfony不支持它,而在symfony 5.0中,它将抛出异常而不是警告!

类似的东西:

 this
 is
 multi
 key:  test
© www.soinside.com 2019 - 2024. All rights reserved.