Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/piotrplenik/DoctrineDumpFixturesBundle
Bundle for Symfony 2, where you can dump database data into fixtures.
https://github.com/piotrplenik/DoctrineDumpFixturesBundle
Last synced: 2 months ago
JSON representation
Bundle for Symfony 2, where you can dump database data into fixtures.
- Host: GitHub
- URL: https://github.com/piotrplenik/DoctrineDumpFixturesBundle
- Owner: piotrplenik
- License: mit
- Created: 2013-07-09T20:44:40.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-01-26T13:57:42.000Z (almost 8 years ago)
- Last Synced: 2024-10-27T21:21:29.933Z (3 months ago)
- Language: PHP
- Homepage:
- Size: 16.6 KB
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
DoctrineDumpFixturesBundle
==========================Bundle for Symfony 3, with you can dump database data into fixtures.
Dump Fixtures are used to dump database data into fixtures file.
Setup and Configuration
-----------------------Doctrine Dump fixtures for Symfony are maintained in the `DoctrineDumpFixturesBundle`_.
The bundle uses external `Doctrine Data Fixtures`_ library.Follow these steps to install the bundle and the library in the Symfony
Standard edition. Run command in your project diretory:```bash
$ composer require jupeter/doctrine-dump-fixtures-bundle
```Finally, register the Bundle ``DoctrineDumpFixturesBundle`` in ``app/AppKernel.php``.
```php
// ...
public function registerBundles()
{
$bundles = array(
// ...
new TeamLab\Bundle\FixturesBundle\DoctrineDumpFixturesBundle(),
// ...
);
// ...
}
```Configuration
-------------To dump entity data, you need setup annotation for entity:
```php
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use TeamLab\Bundle\FixturesBundle\Mapping as Dump; # use Annotation/**
* @ORM\Entity
* @Dump\Entity # configure with entities should be dumped
*/
class Offers
{
// ...
/**
* @ORM\Column(type="string")
* @Dump\Column # configure with columns should be dumped
*/
private function $name;
// ...
}```
Dump existing data into fixtures
--------------------------------To dump all data from database to Fixtures, run command:
```bash
$ ./bin/console doctrine:fixtures:dump
```