Giter Site home page Giter Site logo

factory-girl-php's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

factory-girl-php's Issues

Get multiple Objects at once

To get a whole list of objects, a "get many" method would be super.

E.g.:

$items = $this->factory->getList('MyEntity', 10);
// items is an array with ten MyEntity instances

Named/Inherited Factories

Hi there,

how do you guys feel about named and inherited factories?

Say we have an entity MyEntity:

class MyEntity
{
    public $name;
    public $active = true;
}

And define the Factory:

$this->factory->defineEntity('MyEntity', [
    'name' => 'paul',
    'active' => true,
]);

I find myself wanting to extend given factories in more complex scenarios.

So how about some way to name different Factories of the same Entity e.g.:

$this->factory->defineEntity('MyEntity::inactive', [
    'name' => 'paul',
    'active' => false,
]);

// get a factory
$this->factory->get('MyEntity::inactive')

And to not have to repeat the 'name' => 'paul' it would be convenient to be able to have some form of inheritance.

Is anything like this in the works?

Factory does not work with entity class inheritance

For some reason I cannot figure out yet why the class metadata fetched by the \Doctrine\ORM\EntityManager::getClassMetadata() does not contain any of the properties defined in the superclass.
For example I'm unable to generate a \FOS\UserBundle\Model descendants factory due to required emailCanonical field being defined in the superclass, not in my implementation (which I'm building the factory against).

Submit package on packagist

In order to make it easier to use the library on any composer based project, could you please register the library on packagist.org?

Reference with many elements

Hi folks,

I'm trying to get SpaceShip factory build more than one Person. I only found Person -> SpaceShip test but no one SpaceShip -> ArrayCollection([Person, Person]).

There is any way to get FieldDef::sequence() build relations to a one2many relation?

Thanks

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.