Skip to content

Commit

Permalink
Merge pull request #9 from snapshotpl/php8
Browse files Browse the repository at this point in the history
Allow install php8
  • Loading branch information
michalbundyra committed Aug 25, 2020
2 parents 82642c8 + 026cdc5 commit 777dac8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Expand Up @@ -48,6 +48,12 @@ matrix:
- php: 7.4
env:
- DEPS=latest
- php: nightly
env:
- DEPS=latest
- COMPOSER_ARGS="--no-interaction --ignore-platform-reqs"
allow_failures:
- php: nightly

before_install:
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -6,7 +6,7 @@ All notable changes to this project will be documented in this file, in reverse

### Added

- Nothing.
- [#9](https://github.com/laminas/laminas-stdlib/pull/9) adds support for the upcoming PHP 8.0 release.

### Changed

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -25,7 +25,7 @@
}
},
"require": {
"php": "^5.6 || ^7.0",
"php": "^5.6 || ^7.0 || ^8.0",
"laminas/laminas-zendframework-bridge": "^1.0"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion src/ArrayUtils.php
Expand Up @@ -226,7 +226,7 @@ public static function iteratorToArray($iterator, $recursive = true)
return iterator_to_array($iterator);
}

if (method_exists($iterator, 'toArray')) {
if (is_object($iterator) && method_exists($iterator, 'toArray')) {
return $iterator->toArray();
}

Expand Down
4 changes: 2 additions & 2 deletions test/ErrorHandlerTest.php
Expand Up @@ -64,7 +64,7 @@ public function testStarted()
public function testReturnCatchedError()
{
ErrorHandler::start();
strpos(); // Invalid argument list
1 / 0; // Division by zero
$err = ErrorHandler::stop();

$this->assertInstanceOf('ErrorException', $err);
Expand All @@ -73,7 +73,7 @@ public function testReturnCatchedError()
public function testThrowCatchedError()
{
ErrorHandler::start();
strpos(); // Invalid argument list
1 / 0; // Division by zero

$this->expectException(ErrorException::class);
ErrorHandler::stop(true);
Expand Down

0 comments on commit 777dac8

Please sign in to comment.