Download the PHP package idct/database-comparator without Composer

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

database-comparator

Basic framework for database comparisons. Allows to report differences between two datasources.

Useful especially when making a major change in an application which writes data to any data source and you would like to verify if nothing got broken. One could say that it allows to write easy black box tests.

contents

Framework provides so far:

usage

  1. Install by composer using:

or manually by downloading contents and placing in desired folder.

  1. Include all your files or the autoloader:

  2. Build your comparison definitions:

Assuming you have a table with schema:

id irrelevant value
0 somedate 11
0 somedate 12

Create new objects:

In case you compare within SAME database you can use same connector (same source)

  1. Special cases:

In some cases you want to omit some fields - for instance if your tables have the automatic "last updated" fields. You can do it in two ways:

In case your tables / data sources have complex data sources just specify them as next array elements in setSingleKeys, for example:

One of the most interesting features of the framework is option to alter results just before comparison - this is very useful in situations when you know what you have changed and want to check if you achieved it. For instance: if you had an application which fills the sample table above and you made a change to your app which causes writing of the value field with data substracted by 2 you can still verify that using getSinglePreCheckTransformation method.

SinglePreCheckTransformation is meant to update the data from the current data source and should return the updated set. So in case your application substracted 2 from value of field value of every row/entry you can add 2 back in order to make the comparison using the code above.

contribution

In case you found any bugs, problems or would like to add some features... or write tests :) it is more than welcome! Please make the changes, add a pull request and I will merge it when it is possible. Thank you in advance!


All versions of database-comparator with dependencies

PHP Build Version
Package Version
Requires php Version >=5.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 idct/database-comparator contains the following files

Loading the files please wait ....