Code Monkey home page Code Monkey logo

phabric's People

Contributors

benwaine avatar cordoval avatar davedevelopment avatar glenjamin avatar jakzal avatar orthographic-pedant avatar woledzki 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  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

phabric's Issues

Decouple from Gherkin

It occurred to me that this could fairly easily be simplified to support usage in non-behat scenarios - such as PHPUnit.

Required steps:

Add Phabric->insert and ->update methods which take the entity and an array of associative arrays.

Replace Entity->insertFromTable and updateFromTable with insert/update on pure arrays

Modify Phabric->insertFromTable and Phabric->updateFromTable to extract arrays from the TableNode and call insert/update

You could either remove the TableNode typehint and replace it with a runtime check on the full namespaced TableNode to avoid having the reference to Gherkin hard coded, or attempt to figure out how to only define the function if Gherkin is available. This part I'm not sure about yet.

DB Value escaping

Currently no escaping.

Have to think how to implement this / also is it necessary.

Not a customer facing?

Create Phabric extension for Behat

I think Phabric extension for Behat would make it easier to install and configure since:

  • Phabric and related objects (like datasource) would be automatically initialized (via DIC)
  • configuration would be validated (DIC again)
  • Phabric could be injected to any context implementing our interface

Extension could be implemented either in current Phabric project or a new one (PhabricExtension?).

I'm eager to work on this.

method name consistency

Use set and add for name and data transformations.

Remove register.

also change translation to transform

Tests fail if Phabric is installed with composer

To reproduce the bug:

  • Get phabric

  • Install dependencies with composer

    curl -s http://getcomposer.org/installer | php
    php composer.phar --dev install
  • Run tests

    phpunit

Result: lots of "ReflectionException: Class Behat\Gherkin\Node\TableNode does not exist" errors due to missing Gherkin

Expected result: tests pass

For some reason Gherkin was removed from the dependency list in ae07848.

Where is Phabric going

Having had a chance to play with Phabric I think there are some great ideas here but the project feels very half-baked, is lacking integration and functionality and doesn't seem to have had much progress over the last year or so.

So where is the project going? Are people still interested? Are there still ideas people are working on and is anyone dedicating much time to the project? Has an alternative come along which surpasses it?

Add licencing

Find out what licence to use and put it in the code.

Exception throwing policy

Throwing an exception in the constructor for bad values being passed in.

Especially necessary in the config path as potential for elements to be left out etc.

Impliment @everzet's recommendations on create() method

getHash() as $row) { $columns = array(); foreach ($row as $name => $value) { $colName = GET_COL_NAME_OUT_OF_NAME($name); $colValue = GET_COL_VALUE_OUT_OF_COL_NAME_AND_VALUE($colName, $value); ``` $columns[$colName] = $colValue; } $rows[] = $columns; ``` } DO_SOMETHING_WITH($rows);

Refactor the Factory

Remove the factory and place it's functionality in the Bus.

Rename Bus > Phabric

Rename Phabric\Phabric -> Entity

entity::clean()

As we already have insert...() and update...() methods, i think it would be useful to have a simple method to clean test entity. Like

<?php

$phabric->clean('event');

$phabric->getEntity('event')->clean();

Support deletion

Would work roughly the same as update, only it would allow you to delete entities from steps.

Support updates on data not managed by Phabric

Currently only updating values that were inserted by Phabric Is supported. Add ability to update other elements of the fixture.

My personal opinion here is that only structure should be added in the initial sql fixture and perhaps some boiler plate data (like an admin user). However after talking with a few others it seems this functionality is in demand.

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.