From a93b8e10f5954be0853eec693c13e84c4bd9e6f2 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Fri, 15 Dec 2017 11:24:35 -0800 Subject: Kanboard requires at least PHP 5.6 now --- vendor/ramsey/array_column/.gitignore | 6 - vendor/ramsey/array_column/.travis.yml | 26 -- vendor/ramsey/array_column/CHANGELOG.md | 37 -- vendor/ramsey/array_column/LICENSE | 19 - vendor/ramsey/array_column/README.md | 91 ----- vendor/ramsey/array_column/composer.json | 27 -- vendor/ramsey/array_column/phpunit.xml.dist | 21 - vendor/ramsey/array_column/src/array_column.php | 115 ------ .../ramsey/array_column/tests/ArrayColumnTest.php | 422 --------------------- vendor/ramsey/array_column/tests/bootstrap.php | 5 - 10 files changed, 769 deletions(-) delete mode 100644 vendor/ramsey/array_column/.gitignore delete mode 100644 vendor/ramsey/array_column/.travis.yml delete mode 100644 vendor/ramsey/array_column/CHANGELOG.md delete mode 100644 vendor/ramsey/array_column/LICENSE delete mode 100644 vendor/ramsey/array_column/README.md delete mode 100644 vendor/ramsey/array_column/composer.json delete mode 100644 vendor/ramsey/array_column/phpunit.xml.dist delete mode 100644 vendor/ramsey/array_column/src/array_column.php delete mode 100644 vendor/ramsey/array_column/tests/ArrayColumnTest.php delete mode 100644 vendor/ramsey/array_column/tests/bootstrap.php (limited to 'vendor/ramsey') diff --git a/vendor/ramsey/array_column/.gitignore b/vendor/ramsey/array_column/.gitignore deleted file mode 100644 index 7e8f330b..00000000 --- a/vendor/ramsey/array_column/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.DS_Store -phpunit.xml -composer.lock -build -vendor -*.phar diff --git a/vendor/ramsey/array_column/.travis.yml b/vendor/ramsey/array_column/.travis.yml deleted file mode 100644 index ffc234e7..00000000 --- a/vendor/ramsey/array_column/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -language: php - -php: - - 5.3 - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - hhvm - -before_script: - - travis_retry composer self-update - - travis_retry composer install --no-interaction --prefer-source - -script: - - mkdir -p build/logs - - ./vendor/bin/parallel-lint src tests - - ./vendor/bin/phpunit --coverage-text - - ./vendor/bin/phpcs src --standard=psr2 -sp - -after_script: - - php vendor/bin/coveralls - -matrix: - allow_failures: - - php: hhvm diff --git a/vendor/ramsey/array_column/CHANGELOG.md b/vendor/ramsey/array_column/CHANGELOG.md deleted file mode 100644 index 1dd01361..00000000 --- a/vendor/ramsey/array_column/CHANGELOG.md +++ /dev/null @@ -1,37 +0,0 @@ -# array_column() Changelog - -## 1.1.3 - -_Released 2015-03-20_ - -* Changing package name from "rhumsaa/array_column" to "ramsey/array_column" -* Updated Travis CI build config to test more versions of PHP -* Updated Travis CI config to lint and check PSR-2 coding standards -* Added project badges -* Added CHANGELOG - -## 1.1.2 - -_Released 2013-07-22_ - -* Remove unnecessary conditionals -* Whitespace changes - -## 1.1.1 - -_Released 2013-07-06_ - -* Documentation updates - -## 1.1.0 - -_Released 2013-07-06_ - -* Catching up array_column() library functionality and tests with PHP 5.5.0 -* Set Travis CI to run tests on PHP 5.5 - -## 1.0.0 - -_Released 2013-03-22_ - -* Initial release of userland library diff --git a/vendor/ramsey/array_column/LICENSE b/vendor/ramsey/array_column/LICENSE deleted file mode 100644 index d099612d..00000000 --- a/vendor/ramsey/array_column/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2013-2015 Ben Ramsey (http://benramsey.com) - -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/vendor/ramsey/array_column/README.md b/vendor/ramsey/array_column/README.md deleted file mode 100644 index 24b5b73f..00000000 --- a/vendor/ramsey/array_column/README.md +++ /dev/null @@ -1,91 +0,0 @@ -# array_column() for PHP - -[![Build Status](https://travis-ci.org/ramsey/array_column.svg?branch=master)](https://travis-ci.org/ramsey/array_column) -[![Coverage Status](https://coveralls.io/repos/ramsey/array_column/badge.svg?branch=master)](https://coveralls.io/r/ramsey/array_column) -[![Latest Stable Version](https://poser.pugx.org/ramsey/array_column/v/stable.svg)](https://packagist.org/packages/ramsey/array_column) -[![Total Downloads](https://poser.pugx.org/ramsey/array_column/downloads.svg)](https://packagist.org/packages/ramsey/array_column) -[![Latest Unstable Version](https://poser.pugx.org/ramsey/array_column/v/unstable.svg)](https://packagist.org/packages/ramsey/array_column) -[![License](https://poser.pugx.org/ramsey/array_column/license.svg)](https://packagist.org/packages/ramsey/array_column) - -This simple library provides functionality for [`array_column()`](http://php.net/array_column) -to versions of PHP earlier than 5.5. It mimics the functionality of the built-in -function in every way. - - -## Usage - -``` -array array_column(array $input, mixed $columnKey[, mixed $indexKey]) -``` - -Given a multi-dimensional array of data, `array_column()` returns the values -from a single column of the input array, identified by the `$columnKey`. -Optionally, you may provide an `$indexKey` to index the values in the returned -array by the values from the `$indexKey` column in the input array. - -For example, using the following array of data, we tell `array_column()` to -return an array of just the last names, indexed by their record IDs. - -``` php - 2135, - 'first_name' => 'John', - 'last_name' => 'Doe' - ), - array( - 'id' => 3245, - 'first_name' => 'Sally', - 'last_name' => 'Smith' - ), - array( - 'id' => 5342, - 'first_name' => 'Jane', - 'last_name' => 'Jones' - ), - array( - 'id' => 5623, - 'first_name' => 'Peter', - 'last_name' => 'Doe' - ) -); - -$lastNames = array_column($records, 'last_name', 'id'); -``` - -If we call `print_r()` on `$lastNames`, you'll see a resulting array that looks -a bit like this: - -``` text -Array -( - [2135] => Doe - [3245] => Smith - [5342] => Jones - [5623] => Doe -) -``` - - -## Installation - -The easiest way to install this library is to use [Composer](https://getcomposer.org/): - -``` -php composer.phar require ramsey/array_column -``` - -Then, when you run `composer install`, everything will fall magically into place, -and the `array_column()` function will be available to your project, as long as -you are including Composer's autoloader. - -_However, you do not need Composer to use this library._ - -This library has no dependencies and should work on older versions of PHP. -Download the code and include `src/array_column.php` in your project, and all -should work fine. - -When you are ready to run your project on PHP 5.5, everything should -continue to run well without conflicts, even if this library remains included -in your project. diff --git a/vendor/ramsey/array_column/composer.json b/vendor/ramsey/array_column/composer.json deleted file mode 100644 index 2316b225..00000000 --- a/vendor/ramsey/array_column/composer.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "ramsey/array_column", - "description": "Provides functionality for array_column() to projects using PHP earlier than version 5.5.", - "type": "library", - "keywords": ["array", "column", "array_column"], - "homepage": "https://github.com/ramsey/array_column", - "license": "MIT", - "authors": [ - { - "name": "Ben Ramsey", - "homepage": "http://benramsey.com" - } - ], - "support": { - "issues": "https://github.com/ramsey/array_column/issues", - "source": "https://github.com/ramsey/array_column" - }, - "require-dev": { - "phpunit/phpunit": "~4.5", - "squizlabs/php_codesniffer": "~2.2", - "jakub-onderka/php-parallel-lint": "0.8.*", - "satooshi/php-coveralls": "0.6.*" - }, - "autoload": { - "files": ["src/array_column.php"] - } -} diff --git a/vendor/ramsey/array_column/phpunit.xml.dist b/vendor/ramsey/array_column/phpunit.xml.dist deleted file mode 100644 index 61da3c17..00000000 --- a/vendor/ramsey/array_column/phpunit.xml.dist +++ /dev/null @@ -1,21 +0,0 @@ - - - - - ./tests - - - - - ./src - - - - - - - - diff --git a/vendor/ramsey/array_column/src/array_column.php b/vendor/ramsey/array_column/src/array_column.php deleted file mode 100644 index 1e7fa99f..00000000 --- a/vendor/ramsey/array_column/src/array_column.php +++ /dev/null @@ -1,115 +0,0 @@ -recordSet = array( - array( - 'id' => 1, - 'first_name' => 'John', - 'last_name' => 'Doe' - ), - array( - 'id' => 2, - 'first_name' => 'Sally', - 'last_name' => 'Smith' - ), - array( - 'id' => 3, - 'first_name' => 'Jane', - 'last_name' => 'Jones' - ), - ); - - $fh = fopen(__FILE__, 'r', true); - - $this->multiDataTypes = array( - array( - 'id' => 1, - 'value' => new stdClass - ), - array( - 'id' => 2, - 'value' => 34.2345 - ), - array( - 'id' => 3, - 'value' => true - ), - array( - 'id' => 4, - 'value' => false - ), - array( - 'id' => 5, - 'value' => null - ), - array( - 'id' => 6, - 'value' => 1234 - ), - array( - 'id' => 7, - 'value' => 'Foo' - ), - array( - 'id' => 8, - 'value' => $fh - ), - ); - - $this->numericColumns = array( - array('aaa', '111'), - array('bbb', '222'), - array('ccc', '333', -1 => 'ddd'), - ); - - $this->mismatchedColumns = array( - array('a' => 'foo', 'b' => 'bar', 'e' => 'bbb'), - array('a' => 'baz', 'c' => 'qux', 'd' => 'aaa'), - array('a' => 'eee', 'b' => 'fff', 'e' => 'ggg'), - ); - } - - public function testFirstNameColumnFromRecordset() - { - $expected = array('John', 'Sally', 'Jane'); - $this->assertEquals($expected, array_column($this->recordSet, 'first_name')); - } - - public function testIdColumnFromRecordset() - { - $expected = array(1, 2, 3); - $this->assertEquals($expected, array_column($this->recordSet, 'id')); - } - - public function testLastNameColumnKeyedByIdColumnFromRecordset() - { - $expected = array(1 => 'Doe', 2 => 'Smith', 3 => 'Jones'); - $this->assertEquals($expected, array_column($this->recordSet, 'last_name', 'id')); - } - - public function testLastNameColumnKeyedByFirstNameColumnFromRecordset() - { - $expected = array('John' => 'Doe', 'Sally' => 'Smith', 'Jane' => 'Jones'); - $this->assertEquals($expected, array_column($this->recordSet, 'last_name', 'first_name')); - } - - public function testValueColumnWithMultipleDataTypes() - { - $expected = array(); - foreach ($this->multiDataTypes as $row) { - $expected[] = $row['value']; - } - $this->assertEquals($expected, array_column($this->multiDataTypes, 'value')); - } - - public function testValueColumnKeyedByIdWithMultipleDataTypes() - { - $expected = array(); - foreach ($this->multiDataTypes as $row) { - $expected[$row['id']] = $row['value']; - } - $this->assertEquals($expected, array_column($this->multiDataTypes, 'value', 'id')); - } - - public function testNumericColumnKeys1() - { - $expected = array('111', '222', '333'); - $this->assertEquals($expected, array_column($this->numericColumns, 1)); - } - - public function testNumericColumnKeys2() - { - $expected = array('aaa' => '111', 'bbb' => '222', 'ccc' => '333'); - $this->assertEquals($expected, array_column($this->numericColumns, 1, 0)); - } - - public function testNumericColumnKeys3() - { - $expected = array('aaa' => '111', 'bbb' => '222', 'ccc' => '333'); - $this->assertEquals($expected, array_column($this->numericColumns, 1, 0.123)); - } - - public function testNumericColumnKeys4() - { - $expected = array(0 => '111', 1 => '222', 'ddd' => '333'); - $this->assertEquals($expected, array_column($this->numericColumns, 1, -1)); - } - - public function testFailureToFindColumn1() - { - $this->assertEquals(array(), array_column($this->numericColumns, 2)); - } - - public function testFailureToFindColumn2() - { - $this->assertEquals(array(), array_column($this->numericColumns, 'foo')); - } - - public function testFailureToFindColumn3() - { - $expected = array('aaa', 'bbb', 'ccc'); - $this->assertEquals($expected, array_column($this->numericColumns, 0, 'foo')); - } - - public function testFailureToFindColumn4() - { - $this->assertEquals(array(), array_column($this->numericColumns, 3.14)); - } - - public function testSingleDimensionalArray() - { - $singleDimension = array('foo', 'bar', 'baz'); - $this->assertEquals(array(), array_column($singleDimension, 1)); - } - - public function testMismatchedColumns1() - { - $expected = array('qux'); - $this->assertEquals($expected, array_column($this->mismatchedColumns, 'c')); - } - - public function testMismatchedColumns2() - { - $expected = array('baz' => 'qux'); - $this->assertEquals($expected, array_column($this->mismatchedColumns, 'c', 'a')); - } - - public function testMismatchedColumns3() - { - $expected = array('foo', 'aaa' => 'baz', 'eee'); - $this->assertEquals($expected, array_column($this->mismatchedColumns, 'a', 'd')); - } - - public function testMismatchedColumns4() - { - $expected = array('bbb' => 'foo', 'baz', 'ggg' => 'eee'); - $this->assertEquals($expected, array_column($this->mismatchedColumns, 'a', 'e')); - } - - public function testMismatchedColumns5() - { - $expected = array('bar', 'fff'); - $this->assertEquals($expected, array_column($this->mismatchedColumns, 'b')); - } - - public function testMismatchedColumns6() - { - $expected = array('foo' => 'bar', 'eee' => 'fff'); - $this->assertEquals($expected, array_column($this->mismatchedColumns, 'b', 'a')); - } - - public function testObjectConvertedToString() - { - $f = new Foo(); - $b = new Bar(); - $this->assertEquals(array('Doe', 'Smith', 'Jones'), array_column($this->recordSet, $f)); - $this->assertEquals(array('John' => 'Doe', 'Sally' => 'Smith', 'Jane' => 'Jones'), array_column($this->recordSet, $f, $b)); - } - - /** - * @expectedException PHPUnit_Framework_Error_Warning - * @expectedExceptionMessage array_column() expects at least 2 parameters, 0 given - */ - public function testFunctionWithZeroArgs() - { - $foo = array_column(); - } - - public function testFunctionWithZeroArgsReturnValue() - { - $foo = @array_column(); - $this->assertNull($foo); - } - - /** - * @expectedException PHPUnit_Framework_Error_Warning - * @expectedExceptionMessage array_column() expects at least 2 parameters, 1 given - */ - public function testFunctionWithOneArg() - { - $foo = array_column(array()); - } - - public function testFunctionWithOneArgReturnValue() - { - $foo = @array_column(array()); - $this->assertNull($foo); - } - - /** - * @expectedException PHPUnit_Framework_Error_Warning - * @expectedExceptionMessage array_column() expects parameter 1 to be array, string given - */ - public function testFunctionWithStringAsFirstArg() - { - $foo = array_column('foo', 0); - } - - public function testFunctionWithStringAsFirstArgReturnValue() - { - $foo = @array_column('foo', 0); - $this->assertNull($foo); - } - - /** - * @expectedException PHPUnit_Framework_Error_Warning - * @expectedExceptionMessage array_column() expects parameter 1 to be array, integer given - */ - public function testFunctionWithIntAsFirstArg() - { - $foo = array_column(1, 'foo'); - } - - public function testFunctionWithIntAsFirstArgReturnValue() - { - $foo = @array_column(1, 'foo'); - $this->assertNull($foo); - } - - /** - * @expectedException PHPUnit_Framework_Error_Warning - * @expectedExceptionMessage array_column(): The column key should be either a string or an integer - */ - public function testFunctionWithColumnKeyAsBool() - { - $foo = array_column(array(), true); - } - - public function testFunctionWithColumnKeyAsBoolReturnValue() - { - $foo = @array_column(array(), true); - $this->assertFalse($foo); - } - - /** - * @expectedException PHPUnit_Framework_Error_Warning - * @expectedExceptionMessage array_column(): The column key should be either a string or an integer - */ - public function testFunctionWithColumnKeyAsArray() - { - $foo = array_column(array(), array()); - } - - public function testFunctionWithColumnKeyAsArrayReturnValue() - { - $foo = @array_column(array(), array()); - $this->assertFalse($foo); - } - - /** - * @expectedException PHPUnit_Framework_Error_Warning - * @expectedExceptionMessage array_column(): The index key should be either a string or an integer - */ - public function testFunctionWithIndexKeyAsBool() - { - $foo = array_column(array(), 'foo', true); - } - - public function testFunctionWithIndexKeyAsBoolReturnValue() - { - $foo = @array_column(array(), 'foo', true); - $this->assertFalse($foo); - } - - /** - * @expectedException PHPUnit_Framework_Error_Warning - * @expectedExceptionMessage array_column(): The index key should be either a string or an integer - */ - public function testFunctionWithIndexKeyAsArray() - { - $foo = array_column(array(), 'foo', array()); - } - - public function testFunctionWithIndexKeyAsArrayReturnValue() - { - $foo = @array_column(array(), 'foo', array()); - $this->assertFalse($foo); - } - - /** - * @link https://bugs.php.net/bug.php?id=64493 - */ - public function testBugRequest64493() - { - // Array from Bug Request #64493 test script - $rows = array( - 456 => array('id' => '3', 'title' => 'Foo', 'date' => '2013-03-25'), - 457 => array('id' => '5', 'title' => 'Bar', 'date' => '2012-05-20'), - ); - - // pass null as second parameter to get back all columns indexed by third parameter - $expected1 = array( - 3 => array('id' => '3', 'title' => 'Foo', 'date' => '2013-03-25'), - 5 => array('id' => '5', 'title' => 'Bar', 'date' => '2012-05-20'), - ); - $this->assertEquals($expected1, array_column($rows, null, 'id')); - - // pass null as second parameter and bogus third param to get back zero-indexed array of all columns - $expected2 = array( - array('id' => '3', 'title' => 'Foo', 'date' => '2013-03-25'), - array('id' => '5', 'title' => 'Bar', 'date' => '2012-05-20'), - ); - $this->assertEquals($expected2, array_column($rows, null, 'foo')); - - // pass null as second parameter and no third param to get back array_values(input) (same as $expected2) - $this->assertEquals($expected2, array_column($rows, null)); - } - - public function testObjectCast() - { - $columnKey = new ColumnKeyClass(); - $indexKey = new IndexKeyClass(); - $value = new ValueClass(); - - $records = array( - array( - 'id' => $value, - 'first_name' => 'John', - 'last_name' => 'XXX' - ), - array( - 'id' => 3245, - 'first_name' => 'Sally', - 'last_name' => 'Smith' - ), - ); - - $expected = array( - 2135 => 'John', - 3245 => 'Sally', - ); - - $this->assertEquals($expected, array_column($records, $columnKey, $indexKey)); - } -} - -class Foo -{ - public function __toString() - { - return 'last_name'; - } -} - -class Bar -{ - public function __toString() - { - return 'first_name'; - } -} - -class ColumnKeyClass -{ - function __toString() { return 'first_name'; } -} - -class IndexKeyClass -{ - function __toString() { return 'id'; } -} - -class ValueClass -{ - function __toString() { return '2135'; } -} diff --git a/vendor/ramsey/array_column/tests/bootstrap.php b/vendor/ramsey/array_column/tests/bootstrap.php deleted file mode 100644 index 97eabbac..00000000 --- a/vendor/ramsey/array_column/tests/bootstrap.php +++ /dev/null @@ -1,5 +0,0 @@ -