aboutsummaryrefslogtreecommitdiffhomepage
path: root/assets/php/vendor/react/cache
diff options
context:
space:
mode:
authormarvin-borner@live.com2018-04-16 21:09:05 +0200
committermarvin-borner@live.com2018-04-16 21:09:05 +0200
commitcf14306c2b3f82a81f8d56669a71633b4d4b5fce (patch)
tree86700651aa180026e89a66064b0364b1e4346f3f /assets/php/vendor/react/cache
parent619b01b3615458c4ed78bfaeabb6b1a47cc8ad8b (diff)
Main merge to user management system - files are now at /main/public/
Diffstat (limited to 'assets/php/vendor/react/cache')
-rwxr-xr-xassets/php/vendor/react/cache/.gitignore2
-rwxr-xr-xassets/php/vendor/react/cache/.travis.yml25
-rwxr-xr-xassets/php/vendor/react/cache/CHANGELOG.md35
-rwxr-xr-xassets/php/vendor/react/cache/LICENSE19
-rwxr-xr-xassets/php/vendor/react/cache/README.md171
-rwxr-xr-xassets/php/vendor/react/cache/composer.json19
-rwxr-xr-xassets/php/vendor/react/cache/phpunit.xml.dist20
-rwxr-xr-xassets/php/vendor/react/cache/src/ArrayCache.php29
-rwxr-xr-xassets/php/vendor/react/cache/src/CacheInterface.php13
-rwxr-xr-xassets/php/vendor/react/cache/tests/ArrayCacheTest.php60
-rwxr-xr-xassets/php/vendor/react/cache/tests/CallableStub.php10
-rwxr-xr-xassets/php/vendor/react/cache/tests/TestCase.php43
12 files changed, 0 insertions, 446 deletions
diff --git a/assets/php/vendor/react/cache/.gitignore b/assets/php/vendor/react/cache/.gitignore
deleted file mode 100755
index 987e2a2..0000000
--- a/assets/php/vendor/react/cache/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-composer.lock
-vendor
diff --git a/assets/php/vendor/react/cache/.travis.yml b/assets/php/vendor/react/cache/.travis.yml
deleted file mode 100755
index 290df75..0000000
--- a/assets/php/vendor/react/cache/.travis.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-language: php
-
-php:
-# - 5.3 # requires old distro, see below
- - 5.4
- - 5.5
- - 5.6
- - 7
- - hhvm
-
-# lock distro so new future defaults will not break the build
-dist: trusty
-
-matrix:
- include:
- - php: 5.3
- dist: precise
-
-sudo: false
-
-install:
- - composer install --no-interaction
-
-script:
- - ./vendor/bin/phpunit --coverage-text
diff --git a/assets/php/vendor/react/cache/CHANGELOG.md b/assets/php/vendor/react/cache/CHANGELOG.md
deleted file mode 100755
index 19d1801..0000000
--- a/assets/php/vendor/react/cache/CHANGELOG.md
+++ /dev/null
@@ -1,35 +0,0 @@
-# Changelog
-
-## 0.4.2 (2017-12-20)
-
-* Improve documentation with usage and installation instructions
- (#10 by @clue)
-
-* Improve test suite by adding PHPUnit to `require-dev` and
- add forward compatibility with PHPUnit 5 and PHPUnit 6 and
- sanitize Composer autoload paths
- (#14 by @shaunbramley and #12 and #18 by @clue)
-
-## 0.4.1 (2016-02-25)
-
-* Repository maintenance, split off from main repo, improve test suite and documentation
-* First class support for PHP7 and HHVM (#9 by @clue)
-* Adjust compatibility to 5.3 (#7 by @clue)
-
-## 0.4.0 (2014-02-02)
-
-* BC break: Bump minimum PHP version to PHP 5.4, remove 5.3 specific hacks
-* BC break: Update to React/Promise 2.0
-* Dependency: Autoloading and filesystem structure now PSR-4 instead of PSR-0
-
-## 0.3.2 (2013-05-10)
-
-* Version bump
-
-## 0.3.0 (2013-04-14)
-
-* Version bump
-
-## 0.2.6 (2012-12-26)
-
-* Feature: New cache component, used by DNS
diff --git a/assets/php/vendor/react/cache/LICENSE b/assets/php/vendor/react/cache/LICENSE
deleted file mode 100755
index a808108..0000000
--- a/assets/php/vendor/react/cache/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2012 Igor Wiedler, Chris Boden
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/assets/php/vendor/react/cache/README.md b/assets/php/vendor/react/cache/README.md
deleted file mode 100755
index 70ad40a..0000000
--- a/assets/php/vendor/react/cache/README.md
+++ /dev/null
@@ -1,171 +0,0 @@
-# Cache Component
-
-[![Build Status](https://secure.travis-ci.org/reactphp/cache.png?branch=master)](http://travis-ci.org/reactphp/cache) [![Code Climate](https://codeclimate.com/github/reactphp/cache/badges/gpa.svg)](https://codeclimate.com/github/reactphp/cache)
-
-Async, [Promise](https://github.com/reactphp/promise)-based cache interface
-for [ReactPHP](https://reactphp.org/).
-
-The cache component provides a
-[Promise](https://github.com/reactphp/promise)-based
-[`CacheInterface`](#cacheinterface) and an in-memory [`ArrayCache`](#arraycache)
-implementation of that.
-This allows consumers to type hint against the interface and third parties to
-provide alternate implementations.
-
-**Table of Contents**
-
-* [Usage](#usage)
- * [CacheInterface](#cacheinterface)
- * [get()](#get)
- * [set()](#set)
- * [remove()](#remove)
- * [ArrayCache](#arraycache)
-* [Common usage](#common-usage)
- * [Fallback get](#fallback-get)
- * [Fallback-get-and-set](#fallback-get-and-set)
-* [Install](#install)
-* [Tests](#tests)
-* [License](#license)
-
-## Usage
-
-### CacheInterface
-
-The `CacheInterface` describes the main interface of this component.
-This allows consumers to type hint against the interface and third parties to
-provide alternate implementations.
-
-#### get()
-
-```php
-$cache
- ->get('foo')
- ->then('var_dump');
-```
-
-This example fetches the value of the key `foo` and passes it to the
-`var_dump` function. You can use any of the composition provided by
-[promises](https://github.com/reactphp/promise).
-
-If the key `foo` does not exist, the promise will be rejected.
-
-#### set()
-
-```php
-$cache->set('foo', 'bar');
-```
-
-This example eventually sets the value of the key `foo` to `bar`. If it
-already exists, it is overridden. No guarantees are made as to when the cache
-value is set. If the cache implementation has to go over the network to store
-it, it may take a while.
-
-#### remove()
-
-```php
-$cache->remove('foo');
-```
-
-This example eventually removes the key `foo` from the cache. As with `set`,
-this may not happen instantly.
-
-### ArrayCache
-
-The `ArrayCache` provides an in-memory implementation of the
-[`CacheInterface`](#cacheinterface).
-
-```php
-$cache = new ArrayCache();
-
-$cache->set('foo', 'bar');
-```
-
-## Common usage
-
-### Fallback get
-
-A common use case of caches is to attempt fetching a cached value and as a
-fallback retrieve it from the original data source if not found. Here is an
-example of that:
-
-```php
-$cache
- ->get('foo')
- ->then(null, 'getFooFromDb')
- ->then('var_dump');
-```
-
-First an attempt is made to retrieve the value of `foo`. A promise rejection
-handler of the function `getFooFromDb` is registered. `getFooFromDb` is a
-function (can be any PHP callable) that will be called if the key does not
-exist in the cache.
-
-`getFooFromDb` can handle the missing key by returning a promise for the
-actual value from the database (or any other data source). As a result, this
-chain will correctly fall back, and provide the value in both cases.
-
-### Fallback get and set
-
-To expand on the fallback get example, often you want to set the value on the
-cache after fetching it from the data source.
-
-```php
-$cache
- ->get('foo')
- ->then(null, array($this, 'getAndCacheFooFromDb'))
- ->then('var_dump');
-
-public function getAndCacheFooFromDb()
-{
- return $this->db
- ->get('foo')
- ->then(array($this, 'cacheFooFromDb'));
-}
-
-public function cacheFooFromDb($foo)
-{
- $this->cache->set('foo', $foo);
-
- return $foo;
-}
-```
-
-By using chaining you can easily conditionally cache the value if it is
-fetched from the database.
-
-## Install
-
-The recommended way to install this library is [through Composer](https://getcomposer.org).
-[New to Composer?](https://getcomposer.org/doc/00-intro.md)
-
-This will install the latest supported version:
-
-```bash
-$ composer require react/cache:^0.4.2
-```
-
-See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.
-
-This project aims to run on any platform and thus does not require any PHP
-extensions and supports running on legacy PHP 5.3 through current PHP 7+ and
-HHVM.
-It's *highly recommended to use PHP 7+* for this project.
-
-## Tests
-
-To run the test suite, you first need to clone this repo and then install all
-dependencies [through Composer](https://getcomposer.org):
-
-```bash
-$ composer install
-```
-
-To run the test suite, go to the project root and run:
-
-```bash
-$ php vendor/bin/phpunit
-```
-
-## License
-
-MIT, see [LICENSE file](LICENSE).
diff --git a/assets/php/vendor/react/cache/composer.json b/assets/php/vendor/react/cache/composer.json
deleted file mode 100755
index 51573b6..0000000
--- a/assets/php/vendor/react/cache/composer.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "name": "react/cache",
- "description": "Async, Promise-based cache interface for ReactPHP",
- "keywords": ["cache", "caching", "promise", "ReactPHP"],
- "license": "MIT",
- "require": {
- "php": ">=5.3.0",
- "react/promise": "~2.0|~1.1"
- },
- "autoload": {
- "psr-4": { "React\\Cache\\": "src/" }
- },
- "autoload-dev": {
- "psr-4": { "React\\Tests\\Cache\\": "tests/" }
- },
- "require-dev": {
- "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35"
- }
-}
diff --git a/assets/php/vendor/react/cache/phpunit.xml.dist b/assets/php/vendor/react/cache/phpunit.xml.dist
deleted file mode 100755
index d02182f..0000000
--- a/assets/php/vendor/react/cache/phpunit.xml.dist
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<phpunit colors="true"
- convertErrorsToExceptions="true"
- convertNoticesToExceptions="true"
- convertWarningsToExceptions="true"
- bootstrap="vendor/autoload.php"
->
- <testsuites>
- <testsuite name="React Test Suite">
- <directory>./tests/</directory>
- </testsuite>
- </testsuites>
-
- <filter>
- <whitelist>
- <directory>./src/</directory>
- </whitelist>
- </filter>
-</phpunit>
diff --git a/assets/php/vendor/react/cache/src/ArrayCache.php b/assets/php/vendor/react/cache/src/ArrayCache.php
deleted file mode 100755
index 03dcc15..0000000
--- a/assets/php/vendor/react/cache/src/ArrayCache.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-namespace React\Cache;
-
-use React\Promise;
-
-class ArrayCache implements CacheInterface
-{
- private $data = array();
-
- public function get($key)
- {
- if (!isset($this->data[$key])) {
- return Promise\reject();
- }
-
- return Promise\resolve($this->data[$key]);
- }
-
- public function set($key, $value)
- {
- $this->data[$key] = $value;
- }
-
- public function remove($key)
- {
- unset($this->data[$key]);
- }
-}
diff --git a/assets/php/vendor/react/cache/src/CacheInterface.php b/assets/php/vendor/react/cache/src/CacheInterface.php
deleted file mode 100755
index fd5f2d5..0000000
--- a/assets/php/vendor/react/cache/src/CacheInterface.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-
-namespace React\Cache;
-
-interface CacheInterface
-{
- // @return React\Promise\PromiseInterface
- public function get($key);
-
- public function set($key, $value);
-
- public function remove($key);
-}
diff --git a/assets/php/vendor/react/cache/tests/ArrayCacheTest.php b/assets/php/vendor/react/cache/tests/ArrayCacheTest.php
deleted file mode 100755
index eec3739..0000000
--- a/assets/php/vendor/react/cache/tests/ArrayCacheTest.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-
-namespace React\Tests\Cache;
-
-use React\Cache\ArrayCache;
-
-class ArrayCacheTest extends TestCase
-{
- private $cache;
-
- public function setUp()
- {
- $this->cache = new ArrayCache();
- }
-
- /** @test */
- public function getShouldRejectPromiseForNonExistentKey()
- {
- $this->cache
- ->get('foo')
- ->then(
- $this->expectCallableNever(),
- $this->expectCallableOnce()
- );
- }
-
- /** @test */
- public function setShouldSetKey()
- {
- $this->cache
- ->set('foo', 'bar');
-
- $success = $this->createCallableMock();
- $success
- ->expects($this->once())
- ->method('__invoke')
- ->with('bar');
-
- $this->cache
- ->get('foo')
- ->then($success);
- }
-
- /** @test */
- public function removeShouldRemoveKey()
- {
- $this->cache
- ->set('foo', 'bar');
-
- $this->cache
- ->remove('foo');
-
- $this->cache
- ->get('foo')
- ->then(
- $this->expectCallableNever(),
- $this->expectCallableOnce()
- );
- }
-}
diff --git a/assets/php/vendor/react/cache/tests/CallableStub.php b/assets/php/vendor/react/cache/tests/CallableStub.php
deleted file mode 100755
index 2f547cd..0000000
--- a/assets/php/vendor/react/cache/tests/CallableStub.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-
-namespace React\Tests\Cache;
-
-class CallableStub
-{
- public function __invoke()
- {
- }
-}
diff --git a/assets/php/vendor/react/cache/tests/TestCase.php b/assets/php/vendor/react/cache/tests/TestCase.php
deleted file mode 100755
index aa449f2..0000000
--- a/assets/php/vendor/react/cache/tests/TestCase.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-
-namespace React\Tests\Cache;
-
-use PHPUnit\Framework\TestCase as BaseTestCase;
-
-class TestCase extends BaseTestCase
-{
- protected function expectCallableExactly($amount)
- {
- $mock = $this->createCallableMock();
- $mock
- ->expects($this->exactly($amount))
- ->method('__invoke');
-
- return $mock;
- }
-
- protected function expectCallableOnce()
- {
- $mock = $this->createCallableMock();
- $mock
- ->expects($this->once())
- ->method('__invoke');
-
- return $mock;
- }
-
- protected function expectCallableNever()
- {
- $mock = $this->createCallableMock();
- $mock
- ->expects($this->never())
- ->method('__invoke');
-
- return $mock;
- }
-
- protected function createCallableMock()
- {
- return $this->getMockBuilder('React\Tests\Cache\CallableStub')->getMock();
- }
-}