PHPackages                             midgard/connection-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. [Database &amp; ORM](/categories/database)
4. /
5. midgard/connection-bundle

AbandonedArchivedSymfony-bundle[Database &amp; ORM](/categories/database)

midgard/connection-bundle
=========================

Midgard2 repository connection for Symfony2

301[1 issues](https://github.com/bergie/MidgardConnectionBundle/issues)PHP

Since Jun 22Pushed 14y agoCompare

[ Source](https://github.com/bergie/MidgardConnectionBundle)[ Packagist](https://packagist.org/packages/midgard/connection-bundle)[ RSS](/packages/midgard-connection-bundle/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Symfony2 Midgard2 connection bundle
===================================

[](#symfony2-midgard2-connection-bundle)

This bundle enables you to configure and open a Midgard2 repository connection as part of regular Symfony2 loading sequence.

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

[](#installation)

First of all, you need the `midgard2` PHP extension. On typical Linux distributions this can be installed with:

```
$ sudo apt-get install php5-midgard2

```

Install this bundle by adding the following to the `deps` file and running `php bin/vendors install`:

```
[MidgardConnectionBundle]
    git=git://github.com/bergie/MidgardConnectionBundle.git
    target=Midgard/ConnectionBundle

```

Then add the `Midgard` namespace to the `app/autoload.php`:

```
'Midgard' => __DIR__.'/../vendor'

```

And enable this bundle in your Kernel:

```
new Midgard\ConnectionBundle\MidgardConnectionBundle()

```

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

[](#configuration)

To have a working Midgard2 repository connection, you need to supply this bundle with a valid [Midgard configuration settings](http://www.midgard-project.org/documentation/unified-configuration/). You can do this in your Symfony2 config:

```
midgard_connection:
    type: SQLite
    name: midgard2
    databasedir: "%kernel.root_dir%"
    logfile: "%kernel.root_dir%/logs/midgard2.log"
    loglevel: debug
    blobdir: "%kernel.root_dir%/blobs"
    sharedir: "%kernel.root_dir%/share"

```

Using Midgard user database
---------------------------

[](#using-midgard-user-database)

The Midgard Connection Bundle provides the necessary services for using the Midgard database for users and authentication. To do this, you need to edit your `security.yml` configuration. You need at least the following:

```
security:
    encoders:
        Midgard\ConnectionBundle\Security\User\User: plaintext

    providers:
        midgard_provider:
            id: security.user.provider.midgard

```

Normal Symfony2 access control and firewall rules apply. Userlevels of Midgard user records will be mapped to `ROLE_USER` and `ROLE_ADMIN` accordingly.

Database initialization
-----------------------

[](#database-initialization)

If you need to initialize your Midgard2 database, there is a command for this. Just run:

```
$ php app/console midgard:connection:init

```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.3% of commits — single point of failure

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/3346?v=4)[Henri Bergius](/maintainers/bergie)[@bergie](https://github.com/bergie)

---

Top Contributors

[![bergie](https://avatars.githubusercontent.com/u/3346?v=4)](https://github.com/bergie "bergie (12 commits)")[![piotras](https://avatars.githubusercontent.com/u/232506?v=4)](https://github.com/piotras "piotras (1 commits)")

### Embed Badge

![Health badge](/badges/midgard-connection-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/midgard-connection-bundle/health.svg)](https://phpackages.com/packages/midgard-connection-bundle)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M117](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

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