Download the PHP package scheb/in-memory-data-storage without Composer

On this page you can find all versions of the php package scheb/in-memory-data-storage. 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 in-memory-data-storage

scheb/in-memory-data-storage

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version License

A fast in-memory data storage in plain PHP. It can be used as a test double for a database, in order to to decouple the test cases from the database and speeding them up.

Features

Installation

How to use

You can find an executable example in the doc folder.

Customization

ItemNotFoundException

Single-item (read, update, remove) operations will handle gracefully, when there is no matching item in the data store. Reads will return null, update/remove won't change anything. If you want such cases to raise an exception instead, you can configure that behavior with the builder for each type of operation.

Data Store

The library comes with a simple array-based storage, but you exchange the data storage engine with whatever you like, by implementing Scheb\InMemoryDataStorage\DataStorage\DataStorageInterface. Then, pass an instance to the builder:

Value Matching

Values are checked for equality with PHP's === operation. If you want it to use the less-strict == operator, you can change the behavior with the builder.

The library integrates scheb/comparator to check values for equality. If you need custom comparison rules, implement Scheb\Comparator\ValueComparisonStrategyInterface and pass your comparision strategy to the builder.

You can add as many comparision strategies as you need. They'll be checked in the order they're added and will take preference over the default comparision strategy.

If you want to implement the comparision logic completely on your own, implement Scheb\InMemoryDataStorage\Matching\ValueMatcherInterface and pass an instance to the builder:

Property Access

Properties are read and written with the following access strategies:

If none of these works on a value object, it's either using null (in case of read) or fails with an exception (in case of write).

If you want to implement the property access logic completely on your own, implement Scheb\PropertyAccess\PropertyAccessInterface and pass an instance to the builder:

Contribute

You're welcome to contribute to this library by creating a pull requests or feature request in the issues section. For pull requests, please follow these guidelines:

To run the test suite install the dependencies with composer install and then execute bin/phpunit.

License

This bundle is available under the MIT license.


All versions of in-memory-data-storage with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1.3
scheb/comparator Version ^1.0.0
scheb/property-access Version ^1.0.1
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 scheb/in-memory-data-storage contains the following files

Loading the files please wait ....