Would like to integrate a legacy application with a Symfony 2 application - replacing more and more parts of the old application with Symfony components. The approach I would take is using the Symfony 2 container in the legacy application getting the services that are already configured for the Symfony 2 application. The first services I would like to use are the session and the security context.
Questions:
- Is this feasible?
- How do I get the configured service container?
More info in the legacy application: The typical PHP mess: Single PHP files, as "controllers" (checking $_GET and $_POST for different execution paths). Each page includes init.php
which sets up autoloading, database connection etc. The session management has its own class (which i would like to replace), the data is retrieved through calls to static methods (!) of database objects.