I wonder how can I see syntax errors like this (missing semicolon):
<?php
var_dump($app)
?>
This will cause a WSOD (white screen of death).
I tried to include a debug config file which look like this:
use Symfony\Component\Debug\ErrorHandler;
use Symfony\Component\Debug\Debug;
// Include the prod configuration
require __DIR__.'/prod.php';
// Enable PHP Error level
error_reporting(E_ALL);
ini_set('display_errors','On');
// Enable debug mode
$app['debug'] = true;
// Handle fatal errors
ErrorHandler::register();
Debug::enable();
I included in composer json file:
"symfony/debug": "~2.3",
But still no change. What did I forgot?
Try this:
it's important to set the error handling before initialize the $app.
Install Symfony/debug using
composer require symfony/debug
and add these lines before Silex\Application instance