Download the PHP package nnx/data-fixtures without Composer

On this page you can find all versions of the php package nnx/data-fixtures. 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 data-fixtures

Doctrine Data Fixtures Extension

Build Status

This extension aims to provide a simple way to manage and execute the loading of data fixtures for the Doctrine ORM or ODM. You can write fixture classes by implementing the Doctrine\Common\DataFixtures\FixtureInterface interface:

Now you can begin adding the fixtures to a loader instance:

You can load a set of fixtures from a directory as well:

Or you can load a set of fixtures from a file:

$loader->loadFromFile('/path/to/MyDataFixtures/MyFixture1.php');

You can get the added fixtures using the getFixtures() method:

Now you can easily execute the fixtures:

If you want to append the fixtures instead of purging before loading then pass true to the 2nd argument of execute:

Sharing objects between fixtures

In case if fixture objects have relations to other fixtures, it is now possible to easily add a reference to that object by name and later reference it to form a relation. Here is an example fixtures for Role and User relation

And the User data loading fixture:

Fixture ordering

Notice that the fixture loading order is important! To handle it manually implement one of the following interfaces:

OrderedFixtureInterface

Set the order manually:

DependentFixtureInterface

Provide an array of fixture class names:

Notice the ordering is relevant to Loader class.

Running the tests:

PHPUnit 3.5 or newer together with Mock_Object package is required. To setup and run tests follow these steps:


All versions of data-fixtures with dependencies

PHP Build Version
Package Version
Requires php Version ^5.6 || ^7.0
doctrine/common Version ~2.2
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 nnx/data-fixtures contains the following files

Loading the files please wait ....