Monthly Archives: May 2013

Load bundle without composer.json in Symfony2.3

This is how I loaded a legacy budle without composer.json in a custom location for my Symfony2.3project with composer.

In one of my Symfony2.3 projects I needed to use an old external bundle. This legacy bundle (from Symfony2.0) hasn’t a composer.json file and in my case I can not add one.

Anyway, I wanted to use composer and its autoloader also for this bundle in order to keep things simple for me.

Let’s assume I wanted to add TwitterClientBundle and its namespace is: Razvan\TwitterClientBundle

For this I added in my composer.json the following:

After that I ran:

and the bundle was added in /path/to/yourproject/vendor/razvan/twitter-client-bundle/


After that I enabled the bundle in AppKernel.php

and this was all.


  • Maybe there are better solution, but I did not find them yet.
  • The bundle RazvanTwitterBundle doesn’t exist on Github.

P.S. Somebody else wrote a similar post in the past.