From 66118f5c2a7e4da77e743e69f74773c63b73e8f9 Mon Sep 17 00:00:00 2001 From: Ignace Nyamagana Butera Date: Tue, 28 Nov 2017 09:25:53 +0100 Subject: [PATCH] prepare 9.1.1 release --- .travis.yml | 8 +++++--- CHANGELOG.md | 3 +-- src/AbstractCsv.php | 2 +- src/ByteSequence.php | 4 +--- src/CannotInsertRecord.php | 2 +- src/CharsetConverter.php | 2 +- src/ColumnConsistency.php | 2 +- src/EncloseField.php | 2 +- src/EscapeFormula.php | 2 +- src/Exception.php | 2 +- src/HTMLConverter.php | 2 +- src/MapIterator.php | 2 +- src/RFC4180Field.php | 2 +- src/Reader.php | 2 +- src/ResultSet.php | 2 +- src/Statement.php | 2 +- src/Stream.php | 6 +++--- src/Writer.php | 2 +- src/XMLConverter.php | 2 +- src/functions.php | 2 +- tests/StreamTest.php | 11 +---------- 21 files changed, 27 insertions(+), 37 deletions(-) diff --git a/.travis.yml b/.travis.yml index 64e2bee0..b393c0a1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,10 +8,12 @@ matrix: env: COLLECT_COVERAGE=true VALIDATE_CODING_STYLE=true IGNORE_PLATFORMS=false - php: 7.1 env: COLLECT_COVERAGE=true VALIDATE_CODING_STYLE=true IGNORE_PLATFORMS=false - - php: master + - php: 7.2 + env: COLLECT_COVERAGE=false VALIDATE_CODING_STYLE=false IGNORE_PLATFORMS=true + - php: nightly env: COLLECT_COVERAGE=false VALIDATE_CODING_STYLE=false IGNORE_PLATFORMS=true allow_failures: - - php: master + - php: nightly fast_finish: true cache: @@ -30,4 +32,4 @@ script: after_script: - if [ "$COLLECT_COVERAGE" == "true" ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/clover.xml; fi - - if [ "$VALIDATE_CODING_STYLE" == "true" ]; then composer phpcs; fi + - if [ "$VALIDATE_CODING_STYLE" == "true" ]; then composer phpcs; fi \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 6583a801..00bc3102 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,7 @@ All Notable changes to `Csv` will be documented in this file - -## Next - TBD +## 9.1.1 - 2017-11-28 ### Added diff --git a/src/AbstractCsv.php b/src/AbstractCsv.php index f8d0c896..12c0d1a0 100644 --- a/src/AbstractCsv.php +++ b/src/AbstractCsv.php @@ -4,7 +4,7 @@ * * @license http://opensource.org/licenses/MIT * @link https://github.com/thephpleague/csv/ -* @version 9.1.0 +* @version 9.1.1 * @package League.csv * * For the full copyright and license information, please view the LICENSE diff --git a/src/ByteSequence.php b/src/ByteSequence.php index 32fe76ae..c64db73a 100644 --- a/src/ByteSequence.php +++ b/src/ByteSequence.php @@ -4,14 +4,12 @@ * * @license http://opensource.org/licenses/MIT * @link https://github.com/thephpleague/csv/ -* @version 9.1.0 +* @version 9.1.1 * @package League.csv * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ -declare(strict_types=1); - namespace League\Csv; /** diff --git a/src/CannotInsertRecord.php b/src/CannotInsertRecord.php index 51bac901..b0f2da54 100644 --- a/src/CannotInsertRecord.php +++ b/src/CannotInsertRecord.php @@ -4,7 +4,7 @@ * * @license http://opensource.org/licenses/MIT * @link https://github.com/thephpleague/csv/ -* @version 9.1.0 +* @version 9.1.1 * @package League.csv * * For the full copyright and license information, please view the LICENSE diff --git a/src/CharsetConverter.php b/src/CharsetConverter.php index eb7b3245..f760cb6b 100644 --- a/src/CharsetConverter.php +++ b/src/CharsetConverter.php @@ -4,7 +4,7 @@ * * @license http://opensource.org/licenses/MIT * @link https://github.com/thephpleague/csv/ -* @version 9.1.0 +* @version 9.1.1 * @package League.csv * * For the full copyright and license information, please view the LICENSE diff --git a/src/ColumnConsistency.php b/src/ColumnConsistency.php index e5029ce9..86314a4d 100644 --- a/src/ColumnConsistency.php +++ b/src/ColumnConsistency.php @@ -4,7 +4,7 @@ * * @license http://opensource.org/licenses/MIT * @link https://github.com/thephpleague/csv/ -* @version 9.1.0 +* @version 9.1.1 * @package League.csv * * For the full copyright and license information, please view the LICENSE diff --git a/src/EncloseField.php b/src/EncloseField.php index ef3a089f..76225d11 100644 --- a/src/EncloseField.php +++ b/src/EncloseField.php @@ -4,7 +4,7 @@ * * @license http://opensource.org/licenses/MIT * @link https://github.com/thephpleague/csv/ -* @version 9.1.0 +* @version 9.1.1 * @package League.csv * * For the full copyright and license information, please view the LICENSE diff --git a/src/EscapeFormula.php b/src/EscapeFormula.php index ba3552ab..96e77d7b 100644 --- a/src/EscapeFormula.php +++ b/src/EscapeFormula.php @@ -4,7 +4,7 @@ * * @license http://opensource.org/licenses/MIT * @link https://github.com/thephpleague/csv/ -* @version 9.1.0 +* @version 9.1.1 * @package League.csv * * For the full copyright and license information, please view the LICENSE diff --git a/src/Exception.php b/src/Exception.php index 0a199058..4fb75c0c 100644 --- a/src/Exception.php +++ b/src/Exception.php @@ -4,7 +4,7 @@ * * @license http://opensource.org/licenses/MIT * @link https://github.com/thephpleague/csv/ -* @version 9.1.0 +* @version 9.1.1 * @package League.csv * * For the full copyright and license information, please view the LICENSE diff --git a/src/HTMLConverter.php b/src/HTMLConverter.php index e19ba1d8..e30e8b58 100644 --- a/src/HTMLConverter.php +++ b/src/HTMLConverter.php @@ -4,7 +4,7 @@ * * @license http://opensource.org/licenses/MIT * @link https://github.com/thephpleague/csv/ -* @version 9.1.0 +* @version 9.1.1 * @package League.csv * * For the full copyright and license information, please view the LICENSE diff --git a/src/MapIterator.php b/src/MapIterator.php index da50bcbe..0cdb47cb 100644 --- a/src/MapIterator.php +++ b/src/MapIterator.php @@ -4,7 +4,7 @@ * * @license http://opensource.org/licenses/MIT * @link https://github.com/thephpleague/csv/ -* @version 9.1.0 +* @version 9.1.1 * @package League.csv * * For the full copyright and license information, please view the LICENSE diff --git a/src/RFC4180Field.php b/src/RFC4180Field.php index 2086de06..b1e1f077 100644 --- a/src/RFC4180Field.php +++ b/src/RFC4180Field.php @@ -4,7 +4,7 @@ * * @license http://opensource.org/licenses/MIT * @link https://github.com/thephpleague/csv/ -* @version 9.1.0 +* @version 9.1.1 * @package League.csv * * For the full copyright and license information, please view the LICENSE diff --git a/src/Reader.php b/src/Reader.php index 29cf3711..69b0ddbc 100644 --- a/src/Reader.php +++ b/src/Reader.php @@ -4,7 +4,7 @@ * * @license http://opensource.org/licenses/MIT * @link https://github.com/thephpleague/csv/ -* @version 9.1.0 +* @version 9.1.1 * @package League.csv * * For the full copyright and license information, please view the LICENSE diff --git a/src/ResultSet.php b/src/ResultSet.php index ed882ce3..d9c302bb 100644 --- a/src/ResultSet.php +++ b/src/ResultSet.php @@ -4,7 +4,7 @@ * * @license http://opensource.org/licenses/MIT * @link https://github.com/thephpleague/csv/ -* @version 9.1.0 +* @version 9.1.1 * @package League.csv * * For the full copyright and license information, please view the LICENSE diff --git a/src/Statement.php b/src/Statement.php index 9ab2b2a4..45a12c8f 100644 --- a/src/Statement.php +++ b/src/Statement.php @@ -4,7 +4,7 @@ * * @license http://opensource.org/licenses/MIT * @link https://github.com/thephpleague/csv/ -* @version 9.1.0 +* @version 9.1.1 * @package League.csv * * For the full copyright and license information, please view the LICENSE diff --git a/src/Stream.php b/src/Stream.php index 79751390..2c5cbe1f 100644 --- a/src/Stream.php +++ b/src/Stream.php @@ -4,7 +4,7 @@ * * @license http://opensource.org/licenses/MIT * @link https://github.com/thephpleague/csv/ -* @version 9.1.0 +* @version 9.1.1 * @package League.csv * * For the full copyright and license information, please view the LICENSE @@ -176,7 +176,7 @@ public static function createFromPath(string $path, string $open_mode = 'r', $co } if (!$resource = @fopen(...$args)) { - throw new Exception(error_get_last()['message'] ?? sprintf('`%s`: failed to open stream: No such file or directory', $path)); + throw new Exception(sprintf('`%s`: failed to open stream: No such file or directory', $path)); } $instance = new static($resource); @@ -222,7 +222,7 @@ public function appendFilter(string $filtername, int $read_write, $params = null return; } - throw new Exception(error_get_last()['message'] ?? sprintf('Enable to locate filter `%s`', $filtername)); + throw new Exception(sprintf('unable to locate filter `%s`', $filtername)); } /** diff --git a/src/Writer.php b/src/Writer.php index 2fafae7c..909b184f 100644 --- a/src/Writer.php +++ b/src/Writer.php @@ -4,7 +4,7 @@ * * @license http://opensource.org/licenses/MIT * @link https://github.com/thephpleague/csv/ -* @version 9.1.0 +* @version 9.1.1 * @package League.csv * * For the full copyright and license information, please view the LICENSE diff --git a/src/XMLConverter.php b/src/XMLConverter.php index 2d25dc6e..63c1bdba 100644 --- a/src/XMLConverter.php +++ b/src/XMLConverter.php @@ -4,7 +4,7 @@ * * @license http://opensource.org/licenses/MIT * @link https://github.com/thephpleague/csv/ -* @version 9.1.0 +* @version 9.1.1 * @package League.csv * * For the full copyright and license information, please view the LICENSE diff --git a/src/functions.php b/src/functions.php index ecebfeaf..7b3910b2 100644 --- a/src/functions.php +++ b/src/functions.php @@ -4,7 +4,7 @@ * * @license http://opensource.org/licenses/MIT * @link https://github.com/thephpleague/csv/ -* @version 9.1.0 +* @version 9.1.1 * @package League.csv * * For the full copyright and license information, please view the LICENSE diff --git a/tests/StreamTest.php b/tests/StreamTest.php index 5e8dd78d..59d54027 100644 --- a/tests/StreamTest.php +++ b/tests/StreamTest.php @@ -56,15 +56,10 @@ public function testCreateStreamWithWrongResourceType() */ public function testCreateStreamFromPath() { - set_error_handler(function () { - }); - error_clear_last(); $path = 'no/such/file.csv'; $this->expectException(Exception::class); $this->expectExceptionMessage('`'.$path.'`: failed to open stream: No such file or directory'); Stream::createFromPath($path); - - restore_error_handler(); } /** @@ -191,14 +186,10 @@ public function testCsvControl() */ public function testAppendStreamFilterThrowsException() { - set_error_handler(function () { - }); $filtername = 'foo.bar'; - error_clear_last(); $this->expectException(Exception::class); - $this->expectExceptionMessage('Enable to locate filter `'.$filtername.'`'); + $this->expectExceptionMessage('unable to locate filter `'.$filtername.'`'); $stream = Stream::createFromPath('php://temp', 'r+'); $stream->appendFilter($filtername, STREAM_FILTER_READ); - restore_error_handler(); } }