PHPackages                             fakerino/symfony-fakerino - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. fakerino/symfony-fakerino

ActiveSymfony-bundle[Testing &amp; Quality](/categories/testing)

fakerino/symfony-fakerino
=========================

Fake data generator symfony bundle

0.1.1(11y ago)4531MITPHPPHP &gt;=5.3.0

Since May 22Pushed 11y ago1 watchersCompare

[ Source](https://github.com/fakerino/symfony-fakerino)[ Packagist](https://packagist.org/packages/fakerino/symfony-fakerino)[ Docs](http://github.com/niklongstone/symfony-fakerino)[ RSS](/packages/fakerino-symfony-fakerino/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (6)Versions (5)Used By (0)

\#FakerinoBundle

[![Latest Stable Version](https://camo.githubusercontent.com/64177edc5e3ab2310a7c8ab0468cbb652bd2eb47adb3a637d5c425dcbd89ff83/68747470733a2f2f706f7365722e707567782e6f72672f66616b6572696e6f2f73796d666f6e792d66616b6572696e6f2f762f737461626c652e737667)](https://packagist.org/packages/fakerino/symfony-fakerino)[![Travis Ci](https://camo.githubusercontent.com/6f7c54f3df8b969ccfedc0d908d9472c3eb4b2120adf7c541816dae42281ce98/68747470733a2f2f7472617669732d63692e6f72672f6e696b6c6f6e6773746f6e652f73796d666f6e792d66616b6572696e6f2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/niklongstone/symfony-fakerino)[![License](https://camo.githubusercontent.com/49e75f9d34605c720e58b0a5971a50e4f6bbc20f6e396bafd0921e433ab0478e/68747470733a2f2f706f7365722e707567782e6f72672f66616b6572696e6f2f73796d666f6e792d66616b6572696e6f2f6c6963656e73652e737667)](https://packagist.org/packages/fakerino/symfony-fakerino)

The FakerinoBundle provides integration of **[Fakerino](https://github.com/Fakerino/Fakerino)** into the **Symfony2** framework.
This bundle also include a Fakerino **Twig** extension.

More information in the [official documentation](http://www.fakerino.io).

Installation
------------

[](#installation)

\###1. Install symfony-fakerino Add the following dependency to your projects composer.json file:

```
    "require": {
        "fakerino/symfony-fakerino": "~0.1"
    }
```

\###2. Install the ODS data sample *(optional but suggested)*Install the ODS data sample using **one** of the below options:

##### 2.1 Install and update automatically adding a script to your composer.json *(suggested way)*:

[](#21-install-and-update-automatically-adding-a-script-to-your-composerjson-suggested-way)

```
  "scripts": {
        "post-install-cmd": "vendor/fakerino/fakerino/build/ods vendor/fakerino/fakerino/data",
        "post-update-cmd": "vendor/fakerino/fakerino/build/ods vendor/fakerino/fakerino/data"
    }
```

**NOTE:** add as first script to be executed. #####2.2 Run the command manually *(after the fakerino composer installation)*:

```
$ vendor/fakerino/fakerino/build/ods vendor/fakerino/fakerino/data
```

### 3. Initializing the bundle

[](#3-initializing-the-bundle)

To initialize the bundle, you'll need to add it in your `app/AppKernel.php`.

```
public function registerBundles()
{
    // ...
  $bundles = array(
           new Fakerino\Bundle\FakerinoBundle\FakerinoBundle(),
    // ...
}
```

### 4. Configuration *(optional)*

[](#4-configuration-optional)

If the configuration is not set, Fakerino will use the default values.
Configuration example `config.yml`:

```
fakerino:
    config:
        locale: en-GB
        fake:
            fakeMale:
              - titlemale
              - nameMale
              - surname
            fakeFemale:
              - titlefemale
              - namefemale
              - surname
        database:
            dbname: mydb
            user: username
            password: password
            host: localhost
            driver: pdo_mysql
```

Example
-------

[](#example)

#### Controller

[](#controller)

```
