Skip to content

Commit

Permalink
Merge pull request #357 from WyriHaximus-labs/php-7.4
Browse files Browse the repository at this point in the history
Avoid unneeded warning when decoding invalid data on PHP 7.4
  • Loading branch information
jsor authored Jan 12, 2020
2 parents 48aff2e + 3cf9dc0 commit 248202e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 17 deletions.
24 changes: 10 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,31 @@
language: php

php:
# - 5.3 # requires old distro, see below
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
- hhvm # ignore errors, see below

# lock distro so new future defaults will not break the build
dist: trusty

# also test lowest dependencies on PHP 7
matrix:
include:
- php: 5.3
dist: precise
- php: 5.4
- php: 5.5
- php: 5.6
- php: 7.0
- php: 7.0
env:
- DEPENDENCIES=lowest
- php: 7.1
- php: 7.2
- php: 7.3
- php: 7.4
- php: hhvm
allow_failures:
- php: hhvm

sudo: false

install:
- composer install --no-interaction
- if [ "$DEPENDENCIES" = "lowest" ]; then composer update --prefer-lowest -n; fi

script:
- ./vendor/bin/phpunit --coverage-text
- if [ "$DEPENDENCIES" = "lowest" ]; then php -n tests/benchmark-middleware-runner.php; fi
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
},
"require-dev": {
"clue/block-react": "^1.1",
"phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35"
"phpunit/phpunit": "^7.0 || ^6.4 || ^5.7 || ^4.8.35"
}
}
1 change: 0 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="tests/bootstrap.php"
>
<testsuites>
Expand Down
2 changes: 1 addition & 1 deletion src/Io/ChunkedDecoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function handleData($data)
}
}

$this->chunkSize = \hexdec($hexValue);
$this->chunkSize = @\hexdec($hexValue);
if (\dechex($this->chunkSize) !== $hexValue) {
$this->handleError(new Exception($hexValue . ' is not a valid hexadecimal number'));
return;
Expand Down

0 comments on commit 248202e

Please sign in to comment.