Symfony - demo application

Install demo application

Symfony provide demo application as a learning resource.  To install it just enter “demo” as parameter to “symfony” command.

H:\Ampps\www>symfony demo

Start demo application

To start newly installed app, navigate to:


First page of application :

/images/2015-09-16-21_53_17-Symfony-Demo-application-300x173.pngIf demo application doesn’t work as expected and you get error like this :

An exception has been thrown during the rendering of a template (“The Symfony\Component\Intl\DateFormatter\IntlDateFormatter::__construct() method’s argument $locale value NULL behavior is not implemented.  Only the locale “en” is supported. Please install the “intl” extension for full localization capabilities.") in blog/post_show.html.twig at line 35.

Just repair one line of php code in “IntlDateFormatter.php” file, as described in details in this fix .

File is placed inside demo app source tree , in my case this is:


Open file and change first “if” statement in “__constructor” method to reflect second line :

- if (‘en’ != $locale) {

  •    if ('en' !== $locale && null !== $locale) {

Save file and navigate to application again, this time should work as expected.