PHPackages                             kagux/symfony2-silex-integration-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. kagux/symfony2-silex-integration-bundle

ActiveSymfony-bundle[Framework](/categories/framework)

kagux/symfony2-silex-integration-bundle
=======================================

Allows to drop in Silex project

7420[1 issues](https://github.com/kagux/KaguxSilexIntegrationBundle/issues)PHP

Since Mar 7Pushed 13y ago1 watchersCompare

[ Source](https://github.com/kagux/KaguxSilexIntegrationBundle)[ Packagist](https://packagist.org/packages/kagux/symfony2-silex-integration-bundle)[ RSS](/packages/kagux-symfony2-silex-integration-bundle/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

KaguxSilexIntegrationBundle
===========================

[](#kaguxsilexintegrationbundle)

Introduction
============

[](#introduction)

Silex is a great framework for small application. Overall simplicity, elegancy of routing and power of underlying symfony components are playing key roles here.

However, what if you started a project with a few features in mind, but it has grown a lot more since then? Services declarations now take a few hundred lines. Controllers are bloated even though you separate them into mounted controllers. You find yourself reimplementing providers for most symfony2 components and bundles. And now you wish you had started with symfony2 all along.

One of the possible solutions is to completely port application to symfony2. But if you don't want to put on hold development of your application, this route is rather difficult and time consuming.

This bundle solves the problem by seamlessly integrating Silex application into Symfony2.

Here's what you get:

- symfony 2.1 dev-master compatibility
- silex routes are now symfony2 routes
- symfony2 routes have prioroty over silex routes
- gradually migrate silex controllers to symfony2 by replacing routes
- silex services are now symfony2 services and are available via container
- use services defined within silex application in symfony2 bundles
- gradually migrate services to symfony2 container format
- silex services are replaced with corresponding symfony2 services (twig, doctrine dbal, doctrine orm, forms)
- configure common services through symfony2 config files
- silex and symfony2 share same db connection, twig templates, forms and so on
- easy integration of custom services
- access symfony2 service in silex simply by tagging it `silex.auto_integrator`
- write custom integration class for complex scenarios

Installation
============

[](#installation)

- Add Symfony 2.1 dependencies to Silex application `composer.json`
- Add `"kagux/symfony2-silex-integration-bundle": "dev-master"` to `composer.json`
- Working composer requirements list example

```
        "require": {
         "php": ">=5.3.3",
         "silex/silex": "1.0.*",
         "symfony/symfony": "2.1.*",
         "doctrine/orm": ">=2.2.3,
