Download the PHP package kununu/data-fixtures without Composer

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

kununu data-fixtures

At kununu we rely on data fixtures in our tests as well in our development and testing environments. A good definition of what fixtures are is the one from the documentation of DoctrineFixturesBundle in which the design and implementation of this package was heavily based on.

Fixtures are used to load a “fake” set of data into a database that can then be used for testing or to help give you some interesting data while you’re developing your application.

What is kununu/data-fixtures?

This package provides a simple way to manage and execute the loading of data fixtures for any storage mechanism. It's design and implementation was heavily based on the Doctrine data-fixtures package. If you are interested in why we created this package check out Why kununu/data-fixtures?.

Fixtures types

Currently, this package supports the following types of fixtures:

Also check Directory Loader to check how to load fixtures from files in a directory.

If you are interested in knowing more about the concepts of the package, or you need to create a new fixture type check out How to create a new Fixture Type.


Install

1. Add kununu/data-fixtures to your project

Before installing this package be aware:

  • You own the fixtures you load
  • This package should not be used in production mode!

2. Enable any fixture type

In order to enable the fixture types that you are interested, check out their documentation:

  • Doctrine DBAL Connection Fixtures
  • Cache Pool Fixtures
  • Elasticsearch Fixtures
  • Symfony Http Client Fixtures

Append Fixtures

By default, when loading fixtures the data storage is purged. If you want to change this behavior and instead append the fixtures you can pass false as second argument to any executor.


Load Fixtures

In order to load fixtures the default Loader provides a couple of options:

1) loadFromDirectory(string $dir) 2) loadFromFile(string $fileName) 3) loadFromClassName(string $className) 4) addFixture(FixtureInterface $fixture)


Initializable Fixtures

If you want your Fixture classes to be initialized you can implement the InitializableFixtureInterface

Then before loading the fixtures you need to register them in the Loader:


Contribute

If you are interested in contributing read our contributing guidelines.


Tests

If not yet, first install composer dependencies:

Run the tests by doing:

To run tests without coverage report:

To run tests with coverage report:


Continuous Integration Quality Gate Status


All versions of data-fixtures with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-json Version *
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 kununu/data-fixtures contains the following files

Loading the files please wait ....