PHPackages                             basster/legacy-bridge-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. basster/legacy-bridge-bundle

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

basster/legacy-bridge-bundle
============================

Bridge Bundle for wrapping legacy php projects (e.g. without frontcontrollers) into a symfony application.

1.0.4(7y ago)71.6k5MITPHP

Since Jun 29Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Basster/legacy-bridge-bundle)[ Packagist](https://packagist.org/packages/basster/legacy-bridge-bundle)[ RSS](/packages/basster-legacy-bridge-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (3)Versions (6)Used By (0)

BassterLegacyBridgeBundle
=========================

[](#bassterlegacybridgebundle)

[![Build Status](https://camo.githubusercontent.com/8df4865e869a9ca8422ec8d9ade84d502b8a2c1a51ed28c9229f215b90faa3fd/68747470733a2f2f7472617669732d63692e6f72672f426173737465722f6c65676163792d6272696467652d62756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Basster/legacy-bridge-bundle)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/17e89d793a9cd290e720cc89e33f50e9635fcd4c34c95c670266368d4c55e4ef/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f426173737465722f6c65676163792d6272696467652d62756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Basster/legacy-bridge-bundle/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/47a8c073bb0e76961cbedf32e546be47104d19c92db304e2a5161191e9a8fc2e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f426173737465722f6c65676163792d6272696467652d62756e646c652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Basster/legacy-bridge-bundle/?branch=master)[![SensioLabsInsight](https://camo.githubusercontent.com/9c75e8d39a8c273683dd2c035cb7577af5059d03569e1e19c2b57e376fc54dc7/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f38613635373232392d363964632d343234342d393636392d6466636561346233326635392f6d696e692e706e67)](https://insight.sensiolabs.com/projects/8a657229-69dc-4244-9669-dfcea4b32f59)

What is this?
-------------

[](#what-is-this)

This bundle generates a symfony route from each .php file on the given `legacy_path` folder, so you can access your old scripts through the symfony frontcontroller as they where actually present. Additionally the wrapper injects the symfony DI-Container into `$_SERVER['SYMFONY_CONTAINER']`, so you can slowly refactor the legacy app, by extracting services into symfony services but use them in the legacy code, as well.

Inspired from [Modernizing with Symfony](https://slidr.io/derrabus/modernizing-with-symfony) given by [@derrabus](https://twitter.com/derrabus)

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

[](#installation)

```
composer require basster/legacy-bridge-bundle

```

Configuration
-------------

[](#configuration)

In your config.yml place:

```
basster_legacy_bridge:
    legacy_path:    '/full/path/to/my/legacy/project/files'
    # optional prepend script (see http://php.net/manual/en/ini.core.php#ini.auto-prepend-file)
    prepend_script: '/full/path/to/my/legacy/autoPrependFile.php' # can be ommited
    # optional append script (see http://php.net/manual/en/ini.core.php#ini.auto-append-file)
    append_script:  '/full/path/to/my/legacy/autoAppendFile.php' # can be ommited

```

On the legacy app
-----------------

[](#on-the-legacy-app)

```
