Download the PHP package johnykvsky/dummygenerator without Composer

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

DummyGenerator

Build Status Coverage Status Quality Score

DummyGenerator is dummy/fake data generator for PHP. It's a fork of Faker, heavily rewritten at core, but overall is same easy to use. In example:

Full list of stuff you can generate is available here.

Faker died for our because of being hard to maintain - more on that here and Faker 2.0 seems to be dead because of "death by committee" kind of stuff.

I needed simple dummy data generator for PHP 8.3 and with modern architecture in mind, so DummyGenerator came to life.

Changes in compare to Faker

There are two Randomizer implementations, default Randomizer and if someone need it there is XoshiroRandomizer that allows to use seed for testing purposes (check BiasedTest).

Providers are gone, but here are sample providers en_US,en_GB and pl_PL to show how to make them / convert from old Faker.

What is this fake / dummy data

When writing tests or populating test database you need to came up with various data, like first name, last name, some dates, maybe description, location coordinates and so on. When you deal with multi-language site and want to have it also multilanguage - you need to came up with every language names or address format.

All of that can be done by hand, but it's much easier to do $generator->firstName() and just don't care about what name it will be. Load provider and don't care about given locale names or phone formats.

Another use case - imagine you have description with 100 chars limit and want to test if it properly gives error when more is passed - instead of copying some text you can just use $generator->text(150) to get ~150 characters long text.

Last but not least - it make sure your tests will get random data on each run, not every single time same value. If your code is good and tests correct - then it should be no problem. If tests start failing from time to time - then what you think, where is the problem:

I leave answer to you. And yes, there might be cases when data should not be random, but usually it's not that case ;)

Installation

Quick Start

Everybody like quick start - it's here, you're welcome.

HowTo

For quick info about how to do various stuff visit howto

Other stuff

There is script\ExtensionsDocs.php that can be used to generate list of available extensions and their methods (look at generate-spec.php)

Since --repeat is still missing in PHPUnit here is Linux shell script for running tests multiple times.

TODO (ideas, not promises)


All versions of dummygenerator with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
symfony/deprecation-contracts Version ^2.2 || ^3.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 johnykvsky/dummygenerator contains the following files

Loading the files please wait ....