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

Commit

Permalink
Support 3.24, require 3.23+
Browse files Browse the repository at this point in the history
  • Loading branch information
fredemmott committed Jan 9, 2018
1 parent f9b7882 commit 85736d0
Show file tree
Hide file tree
Showing 9 changed files with 104 additions and 95 deletions.
1 change: 1 addition & 0 deletions .hhconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
assume_php=false
enable_experimental_tc_features = safe_pass_by_ref, safe_array, safe_vector_array, contextual_inference
3 changes: 3 additions & 0 deletions .travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ hhvm /usr/local/bin/composer install
hh_server --check $(pwd)
hhvm -d hhvm.php7.all=0 vendor/bin/phpunit tests/
hhvm -d hhvm.php7.all=1 vendor/bin/phpunit tests/

sed -i '/enable_experimental_tc_features/d' .hhconfig
hh_server --check $(pwd)
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ language: generic
services:
- docker
env:
- HHVM_VERSION=latest
- HHVM_VERSION=nightly
install:
- docker pull hhvm/hhvm:$HHVM_VERSION
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"homepage": "https://github.com/hhvm/hack-router-codegen",
"require": {
"hhvm": "^3.23.0",
"facebook/hack-router": "^0.10",
"facebook/hack-router": "^0.11",
"facebook/hack-codegen": "^3.0.1",
"facebook/definition-finder": "^1.5.3",
"hhvm/type-assert": "^3.0"
Expand Down
176 changes: 90 additions & 86 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/UriMapBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function getUriMap(
}

foreach ($map as $submap) {
natsort($submap);
natsort(&$submap);
}

return $map
Expand Down
8 changes: 4 additions & 4 deletions tests/RouterCLILookupCodegenBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public function testCanLookupExampleController(): void {
$path,
})->map($x ==> escapeshellarg($x)),
),
$output,
$exit_code,
&$output,
&$exit_code,
);
$output = implode("\n", $output);
$this->assertSame(0, $exit_code);
Expand All @@ -83,8 +83,8 @@ public function testCantLookupInvalidPath(): void {
self::CODEGEN_PATH,
})->map($x ==> escapeshellarg($x)),
),
$output,
$exit_code,
&$output,
&$exit_code,
);
$output = implode("\n", $output);
$this->assertGreaterThan(0, $exit_code);
Expand Down
4 changes: 2 additions & 2 deletions tests/TestTypechecksTestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ final public function testTypechecks(): void {
$out_array = [];
exec(
'hh_client',
$out_array,
$exit_code,
&$out_array,
&$exit_code,
);
$this->assertSame(0, $exit_code, "Typechecker errors found");
}
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/codegen/lookup-path.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private function prettifyControllerName(string $controller): string {
'Too few NS parts found; expected everything to be in example NS',
);
$first = $parts[0];
$last = array_pop($parts);
$last = array_pop(&$parts);
return '\\'.$first.'\\...\\'.$last;
/* END MANUAL SECTION */
}
Expand Down

0 comments on commit 85736d0

Please sign in to comment.