Download the PHP package feffel/felfactory without Composer

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

felfactory

Latest Version on Packagist Build Status Coverage Status Quality Score Total Downloads

felfactory is a library that generates objects full of fake data for you. Whether you need to randomize test data, bootstrap your database, fill-in your persistence to stress test it, or anonymize data taken from a production service.

Powered by Faker's data generators.

Table of Contents

Installation

via composer

Basic Usage

Pass a class name to your factory instance, it will create and fill properties with the appropriate type of data.

Configuration

Configuration uses enviornment variables, add these to your environment or add a .env file to your root project dir.

Variable Default Description
FACTORY_MAX_NEST_LEVEL 3 The maximum allowed level of object nesting, any objects found after this level will be ignored and set to null
FACTORY_CIRCLE_TOLERANCE 1 Circular references tolerance, default 1 does not allow the generation of any circular or self refrencing objects
FACTORY_PHP_FILE null Php file path for model definitions
FACTORY_YAML_FILE null Yaml file path for model definitions

Model Definitions

You can provide model definitions to customize the generation of a model, the definition does not have to contain all of the properties, the factory will still guess the missing properties.

Annotation definition

Php defintion

How it works

The factory does not use the class's original constructor, nor the provided setters if any. All of the initiation process is handled by reflections.

The factory looks for the @var annotation on a property to determine it's type, if a definition is found for the property it will be used, otherwise it will be guessed based on type and name of the property.

Objects

If a property is found to be an object it will trigger another factory call to generate it, and the name will be ignored. Interfaces and abstract types will not be generated automatically and will be set to null.

Scalar types and Non-annotated properties

Scalar types will be guessed based on the name of the property first, if it doesn't match any of the supported data generators, it's generated based on type.

Contributing

Please see CODE_OF_CONDUCT for details.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of felfactory with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
doctrine/annotations Version ^1.6
doctrine/lexer Version ^1.0
fzaninotto/faker Version ^1.8
mustangostang/spyc Version ^0.6.2
symfony/dotenv Version ^4.3
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 feffel/felfactory contains the following files

Loading the files please wait ....