Download the PHP package dansan/fixture-handler without Composer

On this page you can find all versions of the php package dansan/fixture-handler. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package fixture-handler

FixtureHandler

You can use FixtureHandler in your php test to compact your setup.

It is inspired by Doctrine Fixtures but FixtureHandler is not related only to the model or Doctrine entities.

It is inspired by the Symfony Dependency Injection Container but is not only a way to get services.

FixtureHandler allows you to save the references of data, models and services in a key-value registry.

It allows you to define some Fixtures and load them in a lazy way.

It allows you to define dependencies between Fixtures.

It allows you to define some Scenarios.

Getting started

Add FixtureHandler as dev requirement in your composer.json

Use it in a PHPUnit TestCase

How it works

The basic use is...

But it make sense to put the user instantiation into a Fixture...

...and add it to the FixtureHandler

You can define an item fixture depending on the users (not depending on the UserFixture)...

You don't need to add Fixture in the right order: FixtureHandler will load added fixture in the right order thanks to dependsOn() method.

dependsOn() method specifies the list of keys that load() method needs for the getRef() calls. Anyway if dependsOn() is not in sync with load() FixtureHandler will notify you the missing and exceeding keys so you can fix it.

You can create a Scenario, a special fixture depending on nothing, to add several fixtures or set some refs...

...so you can be ready in a few lines of code

About refs...

You can use the trait in your TestCase...

Fixture loading will happen when you ask for a ref for the first time...

...but you can force the fixture loading

Why I should force the fixture loading? For example...

That's all!

Development

Clone the project:

Run cp .env.dist .env and edit the .env file properly.

The dc script will copy your ssh keys from your ~/.ssh dir into the php container.

Start te project and run the tests:

Credits

Thanks to Matiux for the Docker images used in the project


All versions of fixture-handler with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dansan/fixture-handler contains the following files

Loading the files please wait ....