Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Midgard2 repository connection for Symfony2
branch: master

This branch is 9 commits behind bergie:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
Command
DependencyInjection
Resources/config
Security
MidgardConnectionBundle.php
README.Authentication.md
README.md

README.md

Symfony2 Midgard2 connection bundle

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

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

To have a working Midgard2 repository connection, you need to supply this bundle with a valid Midgard configuration settings. 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"

Database initialization

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

$ php app/console midgard:connection:init 
Something went wrong with that request. Please try again.