Download the PHP package clabonte/faker-config without Composer

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

faker-config

FakerConfig is a Faker extension to populate entities via a simple JSON configuration file.

FakerConfig provides an easy way to configure the format to use when generating data for a given entity/property combination.

Build Status

With this extension, one can create a simple JSON configuration file to describe how to format various Entities and their properties. FakerConfig will parse Faker's Generator PHPDoc used to identify the list of valid formats that can be used by the configuration file and will validate the configuration file against to to reject any format that won't be understood by Faker

Table of Contents

Configuration File

The configuration is done via a very simply JSON file that lists out entities to populate as JSON objects ('*' = wildcard). For each entity, you simply list out the properties you want to populate along with the format to use.

Here is a sample configuration file:

Sample configuration files are available in the project:

Step 1. Create the ConfigGuesser

The first step consists in creating a ConfigGuesser object with the generator to use:

Step 2. Load the Configuration File

Then, you need to tell the guesser the list of entities/properties that need to be formatted when populating data.

The easiest way to do so is by loading your JSON configuration file:

Alternate Solution: Configure the Guesser Programmatically

Alternatively, you can also configure the guesser programmatically using the FormatParser:

Step 3. Populate Your Entity

Once the ConfigGuesser has been properly configured, you can use it with a populator to fill your entity. FakeConfig provides 2 populators to do so:

Populate an Object Entity

The ObjectPopulator can be used to populate any object automatically based on its class hierarchy. The populator will scan the object class and all of its ancestor to identify the list of properties that must be populated and apply the format defined in your configuration.

Populate an Array Entity

You can also populate any associative array using a similar approach:


All versions of faker-config with dependencies

PHP Build Version
Package Version
Requires fzaninotto/faker Version ^1.7
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 clabonte/faker-config contains the following files

Loading the files please wait ....