Download the PHP package synetic/patternlab-plugin-faker without Composer

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

Packagist

Faker Plugin for Pattern Lab

The Faker Plugin adds Faker support to Pattern Lab. The Faker Plugin will create unique content each time Pattern Lab is generated. You can also use the Faker Plugin to provide locale appropriate content.

Installation

To add the Faker Plugin to your project using Composer type:

composer require synetic/patternlab-plugin-faker

See Packagist for information on the latest release.

Usage

You can create fake data in your json or yml data files by using this format:

"key": "Faker.[formatter]([options])"

If a formatter has no options or you want to use the formatter's default options you can use the following format:

"key": "Faker.[formatter]"

See below for a list of formatters and their options.

Example

To create a random first name without regard to gender you can add the following to your json or yml data files:

"firstName": "Faker.firstName"

To specify a gender you would use:

"firstName": "Faker.firstName('female')"

Formatters

The Faker Plugin supports the following content formatters:

See the official repository for a list of options available to each formatter.

Locales

The content produced by Faker can be localized based on a Faker locale. If the Faker locale isn't supported by a formatter the content will fall back to the default en_US. There is a list of Faker locales.

To update your Faker locale you can either directly edit ./config/config.yml or use the command line option:

php core/console --config --set plugins.faker.locale=[locale]

For example:

php core/console --config --set plugins.faker.locale=fr_FR

Disabling the Plugin

To disable the Faker plugin you can either directly edit ./config/config.yml or use the command line option:

php core/console --config --set plugins.faker.enabled=false

All versions of patternlab-plugin-faker with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
pattern-lab/core Version ^2.3.0
fzaninotto/faker Version ^1.0.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 synetic/patternlab-plugin-faker contains the following files

Loading the files please wait ....