Commit 4f2e4825 authored by Simon Welsh's avatar Simon Welsh

Support no namespace fallback

parent 704a4c66
Pipeline #213 failed with stages
in 19 seconds
......@@ -4,39 +4,60 @@ stages:
- deploy
before_script:
- "echo 'assume_php=false' > .hhconfig"
- echo 'assume_php=false' > .hhconfig
- echo 'safe_array=true' >> .hhconfig
- echo 'safe_vector_array=true' >> .hhconfig
- echo 'enable_experimental_tc_features = safe_pass_by_ref, no_fallback_in_namespaces' >> .hhconfig
- ./tests/composer.sh
- composer install
cache:
paths:
- vendor/
hack-min:
script:
- hh_server --check .
stage: typecheck
image: hhvm/hhvm:3.23.0
tags:
- docker
hack:
script:
- hh_server --check .
stage: typecheck
image: hhvm/hhvm:latest
tags:
- docker
hack-nightly:
script:
- hh_server --check .
stage: typecheck
image: hhvm/hhvm:nightly
tags:
- hhvm
- docker
#hack-min:
#script:
#- hh_server --check .
#stage: typecheck
#tags:
#- hhvm-3.9
phpunit-min:
script:
- hhvm vendor/bin/phpunit tests/
stage: test
image: hhvm/hhvm:3.23.0
tags:
- docker
phpunit:
script:
- hhvm vendor/bin/phpunit tests/
stage: test
image: hhvm/hhvm:latest
tags:
- docker
phpunit-nightly:
script:
- hhvm vendor/bin/phpunit tests/
stage: test
image: hhvm/hhvm:nightly
tags:
- hhvm
#phpunit-min:
#script:
#- hhvm vendor/bin/phpunit tests/
#stage: test
#tags:
#- hhvm-3.9
- docker
packagist:
type: deploy
......
......@@ -4,14 +4,14 @@
"homepage": "https://git.simon.geek.nz/91-carriage/hack-requests",
"license": ["MIT"],
"require": {
"hhvm": ">=3.9.0",
"91carriage/phpunit-hhi": ">=4.8.0,<6.0"
"hhvm": ">=3.23.0",
"91carriage/phpunit-hhi": ">=5.7.3"
},
"autoload": {
"psr-4": {"_91carriage\\Hack\\": ["src/"]}
},
"require-dev": {
"phpunit/phpunit": ">=4.8.0,<6.0"
"phpunit/phpunit": ">=5.7"
},
"extra": {
"branch-alias": {
......
This diff is collapsed.
......@@ -44,11 +44,11 @@ class ReadonlyTypedMap {
$value = $this->data->at($key);
if (!is_numeric($value)) {
if (!\is_numeric($value)) {
return false;
}
if (is_int($value)) {
if (\is_int($value)) {
return true;
}
......@@ -89,16 +89,16 @@ class ReadonlyTypedMap {
$value = $this->data->at($key);
if (is_bool($value)) {
if (\is_bool($value)) {
return true;
}
if (is_int($value)) {
if (\is_int($value)) {
return $value === 1 || $value === 0;
}
if (is_string($value)) {
$value = strtolower($value);
if (\is_string($value)) {
$value = \strtolower($value);
return self::$boolMapping->contains($value);
}
......@@ -115,17 +115,17 @@ class ReadonlyTypedMap {
if ($this->hasBool($key)) {
$value = $this->data->at($key);
if (is_bool($value)) {
if (\is_bool($value)) {
return $value;
}
if (is_int($value)) {
if (\is_int($value)) {
return $value === 1;
}
invariant(is_string($value), 'Unexpected type %s', gettype($value));
invariant(\is_string($value), 'Unexpected type %s', \gettype($value));
return self::$boolMapping->at(strtolower($value));
return self::$boolMapping->at(\strtolower($value));
}
return null;
}
......@@ -149,7 +149,7 @@ class ReadonlyTypedMap {
$value = $this->data->at($key);
if (!is_numeric($value)) {
if (!\is_numeric($value)) {
return false;
}
......@@ -187,7 +187,7 @@ class ReadonlyTypedMap {
$value = $this->data->at($key);
return $value !== null && !is_object($value) && !is_array($value);
return $value !== null && !\is_object($value) && !\is_array($value);
}
/**
......
#!/bin/sh
EXPECTED_SIGNATURE=$(wget -q -O - https://composer.github.io/installer.sig)
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');")
if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]
then
>&2 echo 'ERROR: Invalid installer signature'
rm composer-setup.php
exit 1
fi
php composer-setup.php --quiet --install-dir=/usr/bin --filename=composer
RESULT=$?
rm composer-setup.php
exit $RESULT
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment