[英]Symfony 3 - Assetic dump works on dev but doesn't work on prod
[英]Symfony 4 dump function doesn't work properly
我正在開發一些REST APIS並且轉儲功能在我的dev env中停止工作,它沒有顯示任何有關任何信息或返回通常的輸出
function (from the file) and the function with the same results: it doesn't show anything or throw a php exception. 我嘗試使用函數(來自文件)和函數進行結果:它沒有顯示任何內容或拋出php異常。
) and reinstall the debug-bundle 此外,我嘗試了兩種方法:使用常規調試命令(即 )並重新安裝debug-bundle
在這個例子中,我的程序返回一個通知:
$foo = array("asdads", "czxcxzc");
dump($foo);
在另一個示例中,響應為空
$foo = "bar";
dump($foo);
我只需要這個函數的常規輸出:對調試非常有用,看看我的程序是怎么回事
我想我已經弄明白了。
問題是我在主控制器類(App \\ Controller)上添加了__destruct()
方法
應用程序\\控制器
abstract class Controller implements ContainerAwareInterface
{
use ContainerAwareTrait;
use ControllerTrait;
...
public function __destruct()
{
//Some stuffs here
}
我不知道為什么,但這種方法避免加載一些這些調試方法(也許一些其他功能,但不確定)
解決方案(現在)將此__destruct()方法移動到我的應用程序主控制器。 現在一切都像魅力一樣
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.