自 Symfony 4.3 起不再支持在多行块中映射键,并将在 5.0 中抛出 ParseException

Support for mapping keys in multi-line blocks is deprecated since Symfony 4.3 and will throw a ParseException in 5.0

我有问题。更新到 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 的测试设置:

    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