GithubHelp home page GithubHelp logo

fixtures-bundle's Introduction

FixturesBundle

Build Status Scrutinizer Code Quality

Symfony2 bundle for propel fixtures. Т.к. обычный таск propel:fixtures:load выдаёт ошибку Attempted to call method "getPeerClassname" on class "Propel\Runtime\Map\TableMap"., чтобы его поправить пришлось переопределить таск и файлы папки DataFixtures/Loader. Всё это вынесено в отдельный бандл FixturesBundle.

Installation

Добавьте ItBlasterFixturesBundle в composer.json:

{
    "require": {
        "it-blaster/fixtures-bundle": "dev-master"
	},
}

Теперь запустите композер, чтобы скачать бандл командой:

$ php composer.phar update it-blaster/fixtures-bundle

Композер установит бандл в папку проекта vendor/it-blaster/fixtures-bundle.

Далее подключите бандл в ядре AppKernel.php:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new ItBlaster\FixturesBundle\ItBlasterFixturesBundle(),
    );
}

Dump - Создание фикстур

Таск создания fixtures запускается командой php app/console it-blaster:fixtures:dump. Файл с фикстурами будет создан в app/propel/fixtures.

Load - Загрузка из фикстур в базу

Таск загрузки fixtures запускается командой php app/console it-blaster:fixtures:load @AppMainBundle, где @AppMainBundle имя бандла, где у вас лежат файлы-fixtures. По умолчанию файлы-fixtures будут браться из папки app/propel/fixtures.

Credits

It-Blaster [email protected]

fixtures-bundle's People

Contributors

0x2f8f avatar

Watchers

Evgeny Anoikin avatar James Cloos avatar  avatar John Doe avatar Andrey avatar Iaroslav Gashuk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.