Skip to content

New editing features

Compare
Choose a tag to compare
@danon danon released this 08 Aug 18:33
· 18 commits to master since this release

In march this years, we started rewriting the library, inspired by one of our contributors pull requests: #54. As always, it appeared to be a weekend job, but took 5 months. We had 3 iterations of revamps of the library, swaping features, checking what works and what doesn't. The orginal gist of the library stays the same of course - seamless usage of PhpUnit data providers, but now with super powers.

This is what we came up with:

DataProvider::list()
DataProvider::join()
DataProvider::zip()
DataProvider::cross()
DataProvider::pairs()
DataProvider::of()
DataProvider::tuples()
DataProvider::dictionary()

Additionally: all DataProvider accepts iterable, properly names each row, always preserves duplicates, differentiates between types (int 4 and string "4") and uses helpful exception messages

The changes are released as 3.0.0 and can be used right away.

We're excited to see how the new library will be used!

Migration from previous version

To use version 3.0.0, migrating from 2.4.0 or earlier:

  • Library namespace changed from \TRegx\DataProvider\ to \TRegx\PhpUnit\DataProviders\ .
  • Change \TRegx\DataProvider\DataProviders::cross() to \TRegx\PhpUnit\DataProviders\DataProvider::cross().
  • Change \TRegx\DataProvider\CrossDataProviders::cross() to \TRegx\PhpUnit\DataProviders\DataProvider::cross().
  • Change your data providers return type from array to iterable or \TRegx\PhpUnit\DataProviders\DataProvider.
  • Removed \TRegx\DataProvider\CrossDataProviders::builder(), use \TRegx\PhpUnit\DataProviders\DataProvider::cross()
    instead.