Skip to content
This repository has been archived by the owner on Jul 28, 2022. It is now read-only.

Commit

Permalink
Update README.md (#627)
Browse files Browse the repository at this point in the history
  • Loading branch information
wbloszyk authored Jul 4, 2020
1 parent 741e1f4 commit 584de8a
Showing 1 changed file with 34 additions and 46 deletions.
80 changes: 34 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,64 +9,51 @@ Sonata Standard Edition comes pre-configured with the following bundles:
* Bundles from Symfony Standard distribution
* Sonata Admin Bundles: Admin and Doctrine ORM Admin
* Sonata Ecommerce Bundles: Payment, Customer, Invoice, Order and Product
* Sonata Foundation Bundles: Core, Notification, Formatter, Intl, Cache, Seo and Easy Extends
* Sonata Foundation Bundles: Notification, Formatter, Intl, Cache, Seo and Easy Extends
* Sonata Feature Bundles: Page, Media, News, User, Block, Timeline
* Api Bundles: FOSRestBundle, BazingaHateoasBundle, NelmioApiDocBundle and JMSSerializerBundle

Quick Installation
------------------
Installation
------------

The Sonata Project provides a build of the current sandbox to quickly start with the projet.
### Download sandbox files by one of possible examples

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

Once, you have the file, you can either use
curl -L github https://github.com/sonata-project/sandbox-build/archive/master.tar.gz | tar xzv
cd sandbox

### Local Installation
Git:

* Configure default the ``parameters.yml`` file: ``cp app/config/parameters.yml.dist app/config/parameters.yml``
* load the data: ``php bin/load_data.php``
* You should should be ready to go ...
git clone https://github.com/sonata-project/sandbox.git
cd sandbox
git checkout master

### Prepare configuration

### Vagrant Installation
* Copy configuration file: ``cp .env .env.local``
* Edit ``.env.local`` to configure own environment

* vagrant up --provision --provider=virtualbox (Vagrant is going to get the environnement, install it for you and load sonata sample data)
* Configure your host ``sudo nano /etc/hosts`` and add this line ``192.168.33.99 sonata.local``
* Open your browser [here][link_sonata]


Composer Installation
---------------------

Get composer:

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

Run the following command for the 2.4 develop branch:

php composer.phar create-project sonata-project/sandbox:2.4.x-dev
### Load fixtures data

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:
vendor/bin/phing

* You should be ready to go ...

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

You might experience some timeout issues with composer, as the ``create-project`` start different scripts, you can increase the default composer value with the ``COMPOSER_PROCESS_TIMEOUT`` env variable:

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

Fixtures are automatically loaded on the ``composer create-project`` step. If you'd like to reset your sandbox to the default fixtures (or you had an issue while installing and want to fill in the fixtures manually), you may run:

php bin/load_data.php
* vagrant up --provision --provider=virtualbox (Vagrant is going to get the environnement, install it for you and load sonata sample data)
* Configure your host ``sudo nano /etc/hosts`` and add this line ``192.168.33.99 sonata.local``
* Open your browser [here][link_sonata]

This will completely reset your database.

Run
---

If you are running PHP5.4, you can use the built in server to start the demo:
If you are running PHP 7.2 or above, you can use symfony to start the demo:

app/console server:run localhost:9090
symfony server:start --port=9090

Now open your browser and go to http://localhost:9090/

Expand All @@ -77,13 +64,10 @@ Tests

To run the Behat tests, copy the default configuration file and adjust the base_url to your needs

# behat.yml
imports:
- behat.yml.dist
* Copy configuration file: ``cp behat.yml.dist behat.yml``
* Edit it ``behat.yml``

# Overwrite only the config you want to change here

You can now run the tests suite using the following command
You can now run the tests suite by using the following command:

bin/qa_behat.sh

Expand All @@ -92,7 +76,11 @@ To get more informations about Behat, feel free to check [the official documenta

### Unit testing

To run the Sonata test suites, you can run the command:
To run the sandbox test suites, you can run the command:

vendor/bin/simple-phpunit

You can also run the whole sonata-project bundles test suites by using the following command:

bin/qa_client_ci.sh

Expand Down

0 comments on commit 584de8a

Please sign in to comment.