我正在使用Symfony 3.4.12,找不到有关如何解决此弃用问题的任何信息:
body {
margin: 0;
}
.modal {
display: flex;
height: 100vh;
width: 100vw;
flex-direction: column;
background: green;
}
.projectHeadline,
.projectFooter {
background: yellow;
height: 100px;
}
.swiper-container {
display: flex;
flex: auto;
margin: auto;
background: red;
height: 100%;
}
.swiper-wrapper {
margin: auto;
height:100%; /*Added this*/
background: black;
}
.swiper-wrapper img {
display: block;
margin:auto;
max-height:100%; /*added this*/
max-width:100%; /*added this*/
}
有什么建议吗?
答案 0 :(得分:21)
Doctrine Common
软件包将被拆分为小软件包,而ClassLoader
组件将被删除,这就是弃用通知的原因。
参见https://github.com/doctrine/common/issues/826和https://www.doctrine-project.org/2018/07/12/common-2-9-and-dbal-2-8-and-orm-2-6-2.html。
如果您直接使用软件包doctrine/common
,那么解决方案将是删除该依赖性并添加单个软件包。
如果您使用的是Symfony,则已经有PR来更改它:https://github.com/symfony/symfony/pull/27609。因此,在任何新版本中,都应该弃用。
答案 1 :(得分:1)
在这种情况下(https://pasteboard.co/HJOKbzk.png),我们有2种方法:
-在控制台设置环境变量中运行phpunit时,如下所示:
$ SYMFONY_DEPRECATIONS_HELPER=weak ./vendor/bin/phpunit
在结果中显示简单通知:{{1}}(https://pasteboard.co/HJONdvJ.png)
此外,我们可以使用此选项:
Remaining deprecation notices (1)
我们将收到更严格的警告(https://pasteboard.co/HJOOZH9.png)
-我们还可以向phpunit配置中添加一个变量(phpunit.xml [.dist])
$ SYMFONY_DEPRECATIONS_HELPER=weak_vendors ./vendor/bin/phpunit