2017 © Pedro Peláez
 

library zf2-doctrine-skeleton

Skeleton Application for ZF2 with Doctrine ORM

image

driehle/zf2-doctrine-skeleton

Skeleton Application for ZF2 with Doctrine ORM

  • Wednesday, April 26, 2017
  • by driehle
  • Repository
  • 2 Watchers
  • 2 Stars
  • 57 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

ZF2 Doctrine Skeleton

Introduction

This is a simple, skeleton application using the ZF2 MVC layer and module systems. This application is meant to be used as a starting place for those looking to get their feet wet with ZF2. The Doctrine ORM Module has been added and can easily be configured to use a SQLite database. Your project is set up in just a few minutes!, (*1)

Installation

Installation using Composer

The easiest way to create a new ZF2 project is to use Composer. If you don't have it already installed, then please install as per the documentation., (*2)

Create your new ZF2 project:, (*3)

composer create-project -n -sdev driehle/zf2-doctrine-skeleton path/to/install

Installation using a tarball with a local Composer

If you don't have composer installed globally then another way to create a new ZF2 project is to download the tarball and install it:, (*4)

  1. Download the tarball, extract it and then install the dependencies with a locally installed Composer:, (*5)

    cd my/project/dir
    curl -#L https://github.com/driehle/zf2-doctrine-skeleton/tarball/master | tar xz --strip-components=1
  2. Use the composer.phar contained in the project to install the dependencies:, (*6)

    php composer.phar self-update
    php composer.phar install

If you don't have access to curl, then install Composer into your project as per the documentation., (*7)

Configuration

Before you start, you need to tell Doctrine which database to use. You can simply do so by copying the file config/autoload/doctrine.local.php.dist to config/autoload/doctrine.local.php. Open that file, you will see sample configurations for both MySQL and SQLite. Simply enable one of them by commenting out the other one and you're ready to start., (*8)

Web server setup

PHP CLI server

The simplest way to get started if you are using PHP 5.4 or above is to start the internal PHP cli-server in the root directory:, (*9)

php -S 127.0.0.1:8080 -t public/ public/index.php

This will start the cli-server on port 8080, and bind it the loop-back address, so the server will be available only from your machine. Simply point your browser to http://localhost:8080., (*10)

Note: The built-in CLI server is for development only., (*11)

Vagrant server

This project supports a basic Vagrant configuration with an inline shell provisioner to run the Skeleton Application in a VirtualBox., (*12)

  1. Run vagrant up command, (*13)

    vagrant up, (*14)

  2. Visit http://localhost:8085 in your browser, (*15)

Look in Vagrantfile for configuration details., (*16)

The Versions

26/04 2017

dev-master

9999999-dev

Skeleton Application for ZF2 with Doctrine ORM

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires