全部#[\ returnTypewillChange]
我正在使用旧库,这些库会丢下以下错误,
Return type of ... should either be compatible with ..., or #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
我的代码当然仍然有效,因为这并不是一个错误,只是一个折旧通知(读: https://php.watch/versions/8.1/returntypewillchange )
我放置了##[\ returntypewillchange]
在我的代码中,并将其置于错误中。来自我的代码。但是,我正在使用的旧库仍然会引发此错误,我找不到一种抑制它的好方法。我可以将#[\ returnTypewillChange]放在库中的代码中的所有必要位置,但是库是通过作曲家在很多计算机中,我找不到一种快速的方法来将
#[\ returnTypewillChange]放置在所有计算机中!!!
有什么方法可以强迫PHP关闭returnTypewillChange
来自特定库的错误?
I am using old library that throw the following error
Return type of ... should either be compatible with ..., or #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
My code still works of course, because it isn't really an error and is just a depreciation notice (read: https://php.watch/versions/8.1/ReturnTypeWillChange)
I placed #[\ReturnTypeWillChange]
in my code and it supressed the error coming from my code. However, the old library i am using still throws this error and i cant find a good way to suppress it. I could place the #[\ReturnTypeWillChange]
in all necessary place in the code in the library, however the library is mass installed through composer in a lot of computer, i just cant find a fast way to place #[\ReturnTypeWillChange]
in all computer !!!
Is there any way to force php to shut up about the ReturnTypeWillChange
error coming from a specific library ??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论