Download the PHP package api-skeletons/laravel-doctrine-data-fixtures without Composer

On this page you can find all versions of the php package api-skeletons/laravel-doctrine-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 laravel-doctrine-data-fixtures

Laravel Doctrine Data Fixtures

Continuous Integration Code Coverage PHP Version Laravel Version

Laravel has built-in support for 'seed' data. In seed data, the classes are not namespaced and many developers treat seed data as a one-time import. Seed data often uses auto-increment primary keys. Perhaps these notes are what differentiates seed data from Fixtures.

In my fixtures I want static primary keys and I want to be able to re-run my fixtures at any time. I want the data my fixtures populate to be stored with my fixtures and I want to reference fixture values though class constants within my code.

For instance, to validate a user has an ACL role the code may read:

but this use of strings in the code does not read well and may be error-prone. Instead of the above, I want my code to read

This pattern is not possible with seed data because seed data does not have namespaces. So, this repository exists not only as an alternative to Laravel seed data, but as a namespaced-integrated tool for static database data.

Installation

Run the following to install this library using Composer:

A doctrine-data-fixtures.php configuration file is required. Publish the included config to your project:

Configuration

Doctrine MongoDB, ORM and PHPCR are supported. See the configuration file for details.

This example assumes laravel-doctrine/orm is installed and you'll be using fixtures for ORM data:

Fixture Groups

Modeled from api-skeletons/doctrine-data-fixture for Laminas, fixtures are organized into groups. This organization allows fixtures for specific modules, development faker data, different entity managers, and so on.

Use

List Fixtures

List all groups or list all fixtures for a group.

The <group> is optional.

Executing a Fixture Group through Artisan command

The <group> is required.

Append is the default option. This is inversed with --do-not-append

Options:

--purge-with-truncate if specified will purge the object manager's tables before running fixtures for the ORMPurger only.

--do-not-append will delete all data in the database before running fixtures.

Executing a Fixture Group from code

For unit testing or other times you must run your fixtures from within code, follow this example:

Doctrine data-fixtures

Be sure to read the documentation on the parent library doctrine/data-fixtures


All versions of laravel-doctrine-data-fixtures with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
doctrine/data-fixtures Version ^1.5
laravel/framework Version ^8.82 || ^9.0 || ^10.0 || ^11.0
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 api-skeletons/laravel-doctrine-data-fixtures contains the following files

Loading the files please wait ....