Giter Club home page Giter Club logo

alicebundleextension's People

Contributors

akomm avatar caciobanu avatar gelolabs avatar simperfit avatar theofidry avatar

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

alicebundleextension's Issues

Load fixture parameters

It looks like you can do this:

    Given the following fixtures files are loaded:
      | parameters.yml  |
      | dummies_1.yml  |
      | dummies_2.yml  |

Having:

parameters:
  param1: 'param 1 value'
  param2: 'param 2 value'

Two tiny issues here:

  1. Default bahavior when using just AliceBundle is that the parameters are automatically checked and loaded from fixtures path. Would it not make sense so that it behaves same here?
  2. Ability to load parameters via context that tells that fixtures are loading is not obvious, maybe an entry in readme.md would be useful?

Can't use doctrine function when loading fixture through AliceBundle

Hello !

When I load my fixtures though the command line, it works well.
But when I load my fixtures from the fixtures with AliceBundleExtension, I have an error :

# Fidry\AliceBundleExtension\Context\Doctrine\AliceORMContext::thereAreFixtures()
      An exception occurred while executing 'INSERT INTO profile (first_name, last_name, birth_date, city, stable, gender, geoloc, deleted_at, created_at, updated_at, discipline_id, level_id, user_id, contact_id, preference_id, notification_id) VALUES (?, ?, ?, ?, ?, ?, PointFromText(?), ?, ?, ?, ?, ?, ?, ?, ?, ?)':
      
      SQLSTATE[HY000]: General error: 1 no such function: PointFromText (Doctrine\DBAL\Exception\DriverException)

My doctrine function "PointFromText" should work. Maybe it's because fixtures are loaded through test environment, but could not figure out the solution.

Any clue ?

[Question] use of blameable while loading fixtures

I am using blameable extension on some entities.
When I am loading my fixtures, it seems that there is no current user used for insertion. Until now, I forced the createdBy field manually for a dirty workaround. But today, one of my entities triggers another insertion on which I have no control over.
I am wondering if I can set a user when I am loading the fixtures.

Your requirements could not be resolved to an installable set of packages.

Hi, I am getting this error when doing composer require:

Problem 1
- Installation request for theofidry/alice-fixtures-extension ^0.1.0 -> satisfiable by theofidry/alice-fixtures-extension[v0.1].
- theofidry/alice-fixtures-extension v0.1 requires hautelook/alice-bundle dev-master -> no matching package found.

Can you please check? I don't think it is recommended to rely on dev-master. What do you think? Could be possible to use 0.2?

Clean db before running behat test

Not a bug but a question. How to clean the test db before running behat test with fixtures ? Fixtures loaded are still in db after the ending of tests, then if I re-run behat, I got duplicate insert db error.

Use PHP class that extends AbstractLoader

Hello,

Is it possible to load custom class that contain custom function, because I have on it the getFixtures function that load the .yml files.

The class

<?php

namespace Tests\Functionals\Fixtures\Test;

    use Hautelook\AliceBundle\Doctrine\DataFixtures\AbstractLoader;

    class Users extends AbstractLoader implements OrderedFixtureInterface
    {
        public function fooFunction() 
        {
                return new Bar();
        }

        /**
         * {@inheritDoc}
         */
        public function getFixtures()
        {
            return  [
                __DIR__ . '/users.yml'
            ];
        }

         /**
         * Get the order of this fixture
         *
         * @return integer
         */
        public function getOrder()
        {
            return 1;
        }
    }

And the users.yml

AcmeBundle\Entity\User:
    username: foo
    lastname: bar
    bar: <fooFunction()>

The main idea is to stay same logic with HautelookAliceBundle:

Something like this :

  Background: Re-init the database and load the fixtures
    Given the fixtures "\Tests\Functionals\Fixtures\Test\Users" are loaded

Or with the PHP file on fixture path:

  Background: Re-init the database and load the fixtures
    Given the fixtures "Users" are loaded

Which load the yml through getFixtures, really the same that HautelookAliceBundle logic.

Do you think it is possible ?

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.