Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

Commit

Permalink
Support disallow_silence (#43)
Browse files Browse the repository at this point in the history
* Support `disallow_silence`

* Enable strict options that introduce test failures

* Require HHVM 4.25 for HHI support of array_literal

* Test on composer.json version of hhvm
  • Loading branch information
lexidor authored and jjergus committed Oct 31, 2019
1 parent ec776e9 commit 97ad9b1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
5 changes: 2 additions & 3 deletions .hhconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ disallow_stringish_magic = true
disable_primitive_refinement = true
user_attributes=
disable_static_local_variables = true

; Once the minimum hhvm version hits 4.25 this setting can be safely enabled
disallow_array_literal = false
disallow_array_literal = true
disallow_silence = true
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ sudo: required
language: generic
services: docker
env:
- HHVM_VERSION=4.5-latest
- HHVM_VERSION=4.8-latest
- HHVM_VERSION=4.25-latest
- HHVM_VERSION=latest
- HHVM_VERSION=nightly
install:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
],
"require": {
"composer-plugin-api": "^1.0",
"hhvm": "^4.5",
"hhvm": "^4.25",
"hhvm/hsl": "^4.0"
},
"require-dev": {
Expand Down
5 changes: 4 additions & 1 deletion src/builders/FactParseScanner.hack
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ final class FactParseScanner implements Builder {
),
);
} catch (\Exception $e) {
if (@\filesize($file) === 0) {
$error_level = \error_reporting(0);
$file_is_empty = \filesize($file) === 0;
\error_reporting($error_level);
if ($file_is_empty) {
continue;
}
throw new \Exception("Failed to parse '".$file.'"', $e->getCode(), $e);
Expand Down

0 comments on commit 97ad9b1

Please sign in to comment.