Skip to content

Commit

Permalink
prepare 9.1.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Nov 28, 2017
1 parent 0aa2c95 commit 66118f5
Show file tree
Hide file tree
Showing 21 changed files with 27 additions and 37 deletions.
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

All Notable changes to `Csv` will be documented in this file


## Next - TBD
## 9.1.1 - 2017-11-28

### Added

Expand Down
2 changes: 1 addition & 1 deletion src/AbstractCsv.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions src/ByteSequence.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/CannotInsertRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/CharsetConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/ColumnConsistency.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/EncloseField.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/EscapeFormula.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/HTMLConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/MapIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/RFC4180Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Reader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/ResultSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Statement.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Writer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/XMLConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 1 addition & 10 deletions tests/StreamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

/**
Expand Down Expand Up @@ -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();
}
}

3 comments on commit 66118f5

@csiszarattila
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something wring with this version bump.
Seems you accidentally reverted some changes since 4e9765b.
Especially error_get_last() bugfixes.

@nyamsprod
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@csiszarattila What is wrong do you still have some errors ? If so could you report it in a new issue with an example script. FWIW, error_get_last was interely removed from the codebase to decoupled the Exception message from PHP error reporting system.

@csiszarattila
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nyamsprod Sorry, my bad. It works as it intended.

Please sign in to comment.