Download the PHP package ashleyhindle/private-dump without Composer

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

Private Dump

Private Dump is a CLI tool which can create an anonymised dump of your MySQL database, usually for development or staging use.

It accomplishes this by reading a JSON configuration file which maps out which table columns should be modified and how.

travis-ci-build-status styleci-status

Private Dump requires PHP >= 7.3

Table of Contents

Installation

Install with Composer

Install with curl

Usage

When private-dump is ran with a valid configuration it will output the dump to stdout, allowing you to redirect it to a file, or pipe it to another program (for compression, transfer, encryption, etc..).

First, create a example config, then:

Composer:

Curl:

You can also override the MySQL username, password and hostname from the command line:

Composer:

Curl:

Note: It's best not to pass the password on the command line as it can be seen in the process list, and will exist in the user's history.

Configuration File

The configuration file is a JSON dictionary containing:

An example configuration, and configurations for popular applications, exist in the configs directory.

Annotated Example Configuration - private-dump.json

Key Value Tables

Private Dump supports replacing values in a key-value store, by using an array in the configuration file to link the value column with the key column as below:

This is a bit more complicated than the standard replacements, but offers a lot of flexibility for anonymising all types of data.

Replacements

The vast majority of these are made possible by the amazing Faker library. Most formatters listed in Faker's documentation are supported in Private Dump's configuration file

All replacements below should be prefixed with an @ as in the example configuration files.

If you need to use a hardcoded value (active=0, completed=1) you can do this by omitting the @: "active": 0 in the configuration file.

You can pass variables to commands as such @numberBetween|100,1000

Text

Dates

Internet

Random

User

Payment

Company

Miscellaneous

Barcodes

Transformers


These notes are mainly for my own development use, feel free to ignore.

Dev Steps

  1. Install Box
  2. Modify PHP configuration to set phar.readonly = Off
  3. box build
  4. chmod a+x bin/private-dump.phar

Release Process

  1. Build the PHAR: box build
  2. Rename the PHAR: mv bin/private-dump.phar ./private-dump
  3. Update the version in README.md's installation instructions based on the next version from git tag --list
  4. Tag the next release: git tag -a vx.x.x -m "Release x.x.x"
  5. Push: git push origin --tags
  6. Edit release on GitHub attaching the newly created bin/private-dump file

All versions of private-dump with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3|^8.0|^8.1|^8.2
ext-json Version *
nategood/commando Version ^0.3.0
ifsnop/mysqldump-php Version ^2.9
fakerphp/faker Version ^1.14.0
dflydev/dot-access-data Version ^1.0
pelmered/fake-car Version ^1.6
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 ashleyhindle/private-dump contains the following files

Loading the files please wait ....