PHPackages                             psamatt/yaml-export-bundle - 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. [Database &amp; ORM](/categories/database)
4. /
5. psamatt/yaml-export-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

psamatt/yaml-export-bundle
==========================

Yaml Exporter for use with Symfony2

v1(13y ago)11.3k1[1 PRs](https://github.com/psamatt/YamlExportBundle/pulls)MITPHPPHP &gt;=5.3.2

Since Jun 7Pushed 12y ago1 watchersCompare

[ Source](https://github.com/psamatt/YamlExportBundle)[ Packagist](https://packagist.org/packages/psamatt/yaml-export-bundle)[ Docs](http://github.com/psamatt/YamlExportBundle)[ RSS](/packages/psamatt-yaml-export-bundle/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (10)Versions (2)Used By (0)

YamlExportBundle
================

[](#yamlexportbundle)

[![Build Status](https://camo.githubusercontent.com/0ca46c24d1bc73d7228da9ebc8282237e9dc9bc10adab4ab800db4419df25d93/68747470733a2f2f6170692e7472617669732d63692e6f72672f7073616d6174742f59616d6c4578706f727442756e646c652e706e673f6272616e63683d6d6173746572)](https://api.travis-ci.org/psamatt/YamlExportBundle)

Symfony2 bundle to export database records into YAML format using a Symfony2 Command.

This bundle allows you to export specific database records into YAML format enabling DBUnit testing on your repositories functions. This can be used as a very generic export of all rows such as `SELECT * FROM table` or you can create a very specific use case using powerful DQL (or native SQL) to export those rows that enable you to have a full test suite for your repository functions.

What you need
-------------

[](#what-you-need)

This bundle requires Symfony 2 (or greater) including Doctrine 2

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

[](#installation)

### Step 1: Download the YamlExportBundle using composer

[](#step-1-download-the-yamlexportbundle-using-composer)

Add YamlExportBundle in your composer.json:

```
{
    "require": {
        "psamatt/yaml-export-bundle": "dev-master"
    }
}
```

Now tell \*composer to download the bundle by running the command:

`$ php composer.phar update psamatt/yaml-export-bundle`

Composer will install the bundle to your project's `vendor/psamatt` directory.

- Note: If you don't have Composer yet, download it following the instructions on  or just run the following command:

`curl -s https://getcomposer.org/installer | php`

### Step 2: Enable the bundle

[](#step-2-enable-the-bundle)

Enable the bundle in the kernel:

```
