2017 © Pedro Peláez
 

symfony-bundle connection-bundle

Midgard2 repository connection for Symfony2

image

midgard/connection-bundle

Midgard2 repository connection for Symfony2

  • Friday, June 22, 2012
  • by bergie
  • Repository
  • 0 Watchers
  • 3 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The 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., (*1)

Installation

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

$ sudo apt-get install php5-midgard2

Install this bundle by adding the following to the deps file and running php bin/vendors install:, (*3)

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

Then add the Midgard namespace to the app/autoload.php:, (*4)

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

And enable this bundle in your Kernel:, (*5)

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:, (*6)

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

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:, (*7)

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., (*8)

Database initialization

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

$ php app/console midgard:connection:init 

The Versions

22/06 2012

dev-master

9999999-dev

Midgard2 repository connection for Symfony2

  Sources   Download

LGPL

The Requires

 

database persistence midgard