PHPackages                             ingewikkeld/wrapperbundle - 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. ingewikkeld/wrapperbundle

ActiveLibrary

ingewikkeld/wrapperbundle
=========================

A Symfony2 Bundle for wrapping legacy symfony 1 projects into your Symfony2 project

618598[1 issues](https://github.com/Ingewikkeld/IngewikkeldWrapperBundle/issues)PHP

Since Aug 15Pushed 9y ago4 watchersCompare

[ Source](https://github.com/Ingewikkeld/IngewikkeldWrapperBundle)[ Packagist](https://packagist.org/packages/ingewikkeld/wrapperbundle)[ RSS](/packages/ingewikkeld-wrapperbundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

IngewikkeldWrapperBundle
========================

[](#ingewikkeldwrapperbundle)

What is it?
-----------

[](#what-is-it)

IngewikkeldWrapperBundle is a simple Symfony2 bundle to wrap your old legacy symfony 1 application. This allows you to gradually refactor your old symfony 1 code with spankin' new Symfony2 code.

IngewikkeldWrapperBundle works with a fallback route. All routes that are not caught by your Symfony2 code are routed into the IngewikkeldWrapperBundle, which in turn bootstraps your symfony 1 project.

**Note**: While this bundle can be very useful, it is not recommended to use it for too long. You *are* running two different frameworks for each request that goes through this bundle, meaning there's two frameworks adding an overhead to each request. If you have the possibility, look into caching the output of your legacy code in Symfony2.

Installation
------------

[](#installation)

Installation is done in just a couple of steps:

1. Using composer
2. Download the bundle
3. Configure the autoloader
4. Enable the bundle
5. Configure your legacy project
6. Copy your assets to the document root
7. Configure your routing
8. Refactor your project

### 1. Using composer

[](#1-using-composer)

Require the bundle

```
$ composer require Ingewikkeld/WrapperBundle:dev-master

```

### 2. Download the bundle (if not using composer)

[](#2-download-the-bundle-if-not-using-composer)

Make sure the bundle is being placed in vendor/bundles/Ingewikkeld/IngewikkeldWrapperBundle. You can do this by using the vendors script, using submodules or downloading the zip file.

#### vendors script

[](#vendors-script)

Open the *deps* file in your Symfony2 project, and add the following:

```
[IngewikkeldWrapperBundle]
    git=git://github.com/Ingewikkeld/IngewikkeldWrapperBundle.git
	target=bundles/Ingewikkeld/WrapperBundle

```

Now, install the vendors by running:

```
$ bin/vendors install

```

#### submodules

[](#submodules)

If you are using Git, you can also use submodules to install the bundle into your project. Execute the following commands in your project root:

```
$ git submodule add git://github.com/Ingewikkeld/IngewikkeldWrapperBundle.git vendor/bundles/Ingewikkeld/WrapperBundle
$ git submodule update --init

```

#### zip file

[](#zip-file)

Of course, you can just download the zip file from [Github](https://github.com/Ingewikkeld/IngewikkeldWrapperBundle). Unzip the file and copy the contents of the zip-file into the *vendor/bundles/Ingewikkeld/WrapperBundle* directory of your Symfony2 project.

### 3. Configure the autoloader (if not using composer)

[](#3-configure-the-autoloader-if-not-using-composer)

Before the Ingewikkeld namespace can be loaded, we need to set up the autoloader to actually load the namespace. For this to work, you need to edit the *app/autoload.php* file. In the $loader-&gt;registerNamespaces() call, you need to add the Ingewikkeld namespace, like this:

```
$loader->registerNamespaces(array(
	// ...
    'Ingewikkeld'      => __DIR__.'/../vendor/bundles',
));

```

### 4. Enable the bundle

[](#4-enable-the-bundle)

Enable the bundle in the AppKernel (*app/AppKernel.php*). In the registerBundles() method, add the WrapperBundle to the $bundles array:

```
   $bundles = array(
		// ...
        new Ingewikkeld\WrapperBundle\IngewikkeldWrapperBundle(),
    );

```

### 5. Configure your legacy project

[](#5-configure-your-legacy-project)

Put your legacy project in your *app/* directory. For my first project, I put my whole project into the *app/legacy/* directory. Now, add some configuration values to *app/config/config.yml* to set up the WrapperBundle to serve pages from your legacy symfony 1 project:

```
parameters:
    wrapper_legacypath: legacy # directory inside app/ where your project is located
    wrapper_app: frontend # app to load
    wrapper_env: prod # environment to load
    wrapper_debug: false # whether debug is on or not
    wrapper_version: 1.4 # Symfony version of the legacy project you are wrapping in this bundle

```

### 6. Copy your assets to the document root

[](#6-copy-your-assets-to-the-document-root)

All files that need to be available in the document root need to be copied there from your legacy project. Right now, those are not yet automatically loaded (see "Known issues"), so they have to be copied over to the *web/* directory of your Symfony2 project. Usually, you copy over the images/, css/, js/ and uploads/ directories.

### 7. Configure your routing

[](#7-configure-your-routing)

At the bottom of your *app/config/routing.yml* file, add the following:

IngewikkeldWrapperBundle: resource: "@IngewikkeldWrapperBundle/Controller/" type: annotation prefix: /

This will ensure the wrapper route will catch all requests that are not caught by any other route.

### 8. Refactor your project

[](#8-refactor-your-project)

Now, start refactoring and porting your legacy project into Symfony2 code.

Current state of the project
----------------------------

[](#current-state-of-the-project)

The current state of the project is: **Proof of Concept**

It is working for me right now for one of my legacy projects using this approach. This is with a symfony 1.0 project. It might not (yet) work for you. I greatly welcome pull requests to add features or ensure compatibility with other versions of symfony 1. If you've confirmed this bundle to work with another version of symfony 1, please also let me know!

Known issues / TODO
-------------------

[](#known-issues--todo)

1. Assets are not automatically loaded but have to be copied over to the Symfony2 documentroot
2. Compatibility is so far only confirmed with symfony 1.0
3. It is currently only possible to load one symfony 1-app
4. No session sharing at the moment

Addendum:
---------

[](#addendum)

1. Symfony 1.4 support is confirmed but with Swiftmailer conflicts. Either remove the Swiftmailer line from composer.json and update deps (easier method) or remove the legacy version.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/90003?v=4)[Stefan Koopmanschap](/maintainers/skoop)[@skoop](https://github.com/skoop)

---

Top Contributors

[![pulse00](https://avatars.githubusercontent.com/u/185278?v=4)](https://github.com/pulse00 "pulse00 (4 commits)")[![gzankevich](https://avatars.githubusercontent.com/u/294969?v=4)](https://github.com/gzankevich "gzankevich (3 commits)")[![DainisGorbunovs](https://avatars.githubusercontent.com/u/9624041?v=4)](https://github.com/DainisGorbunovs "DainisGorbunovs (1 commits)")[![nealio82](https://avatars.githubusercontent.com/u/1086726?v=4)](https://github.com/nealio82 "nealio82 (1 commits)")[![skoop](https://avatars.githubusercontent.com/u/90003?v=4)](https://github.com/skoop "skoop (1 commits)")

### Embed Badge

![Health badge](/badges/ingewikkeld-wrapperbundle/health.svg)

```
[![Health](https://phpackages.com/badges/ingewikkeld-wrapperbundle/health.svg)](https://phpackages.com/packages/ingewikkeld-wrapperbundle)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
