This is a fork of the Symfony Demo Application, and adds event tracking using ThisData.
We explain what we've done on our blog, "Subscribing to Symfony's Security Events"
The most common way to listen to an event is to register either an event "listener", or an event "subscriber". We're going to use Subscribers. In this post we'll create a Subscriber which listens for successful and unsuccessful Log In events, and responds by sending information to ThisData.
Compare the differences to see what we've added: https://github.com/symfony/symfony-demo/compare/master...thisdata:master
The "Symfony Demo Application" is a reference application created to show how to develop Symfony applications following the recommended best practices.
- PHP 5.5.9 or higher;
- PDO-SQLite PHP extension enabled;
- and the usual Symfony application requirements.
If unsure about meeting these requirements, download the demo application and
browse the http://localhost:8000/config.php script to get more detailed
information.
First, install the Symfony Installer if you haven't already. Then, install the Symfony Demo Application executing this command anywhere in your system:
$ symfony demo
# if you're using Windows:
$ php symfony demoIf the demo command is not available, update your Symfony Installer to the
most recent version executing the symfony self-update command.
NOTE
If you can't use the Symfony Installer, download and install the demo application using Git and Composer:
$ git clone https://github.com/symfony/symfony-demo $ cd symfony-demo/ $ composer install --no-interaction
There is no need to configure a virtual host in your web server to access the application. Just use the built-in web server:
$ cd symfony-demo/
$ php bin/console server:runThis command will start a web server for the Symfony application. Now you can
access the application in your browser at http://localhost:8000. You can
stop the built-in web server by pressing Ctrl + C while you're in the
terminal.
NOTE
If you want to use a fully-featured web server (like Nginx or Apache) to run Symfony Demo application, configure it to point at the
web/directory of the project. For more details, see: http://symfony.com/doc/current/cookbook/configuration/web_server_configuration.html
The current Symfony Demo application uses Symfony 3.x version. If you want to
use the legacy Symfony 2.8 version, clone the Git repository and checkout the
v0.8.4 tag, which is the last one compatible with Symfony 2.8:
$ git clone https://github.com/symfony/symfony-demo
$ cd symfony-demo/
$ git checkout tags/v0.8.4 -b v0.8.4
$ composer install
