Get started

This getting started guide will help you start using Sonata. We’ve listed the main steps you’ll need to follow in order to get a project running.

Quick installation

The Sonata Project provides a build of the Sonata Project sandbox to quickly start with the projet.

Retrieve the code:

curl -L https://github.com/sonata-project/sandbox-build/archive/2.3.tar.gz | tar xzv

Copy the default parameters.yml file

cp app/config/parameters.yml.dist app/config/parameters.yml

Configure the database information

vim app/config/parameters.yml

Load the data

php bin/load_data.php

You should should be ready to go ...

Composer installation

Get composer:

curl -s http://getcomposer.org/installer | php

Run the following command for the 2.3 branch:

php composer.phar create-project sonata-project/sandbox:2.3.x-dev

Or to get the 2.4 develop branch:

php composer.phar create-project sonata-project/sandbox:dev-2.4-develop

The installation process used Incenteev's ParameterHandler to handle parameters.yml configuration. With the current installation, it is possible to use environment variables to configure this file:

DATABASE_NAME=sonata DATABASE_USER=root DATABASE_PASSWORD="" php composer.phar create-project sonata-project/sandbox:dev-2.4-develop

Let's play with Sonata!