File tree Expand file tree Collapse file tree 11 files changed +66
-34
lines changed
Expand file tree Collapse file tree 11 files changed +66
-34
lines changed Original file line number Diff line number Diff line change 66/tests / export-ignore
77/.hhconfig export-ignore
88hhast-lint.json export-ignore
9+ docker-compose.yml
10+ /docker
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -3,13 +3,25 @@ language: generic
33services :
44 - docker
55env :
6+ global :
7+ - DOCKER_COMPOSE_VERSION=1.23.2
68 matrix :
7- - HHVM_VERSION=4.0.0
8- - HHVM_VERSION=4.0.1
9- - HHVM_VERSION=4.0.2
10- - HHVM_VERSION=4.0.3
11- - HHVM_VERSION=latest
12- install :
13- - docker pull hhvm/hhvm:$HHVM_VERSION
9+ - HHVM_VERSION=4.0.0
10+ - HHVM_VERSION=4.0.1
11+ - HHVM_VERSION=4.0.2
12+ - HHVM_VERSION=4.0.3
13+ - HHVM_VERSION=4.1.0
14+ - HHVM_VERSION=latest
15+
16+ before_install :
17+ - sudo rm /usr/local/bin/docker-compose
18+ - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
19+ - chmod +x docker-compose
20+ - sudo mv docker-compose /usr/local/bin
21+ - docker-compose build
22+ - docker-compose up -d
1423script :
15- - docker run --rm -w /var/source -v $(pwd):/var/source hhvm/hhvm:$HHVM_VERSION ./.travis.sh
24+ - docker-compose exec hhvm /bin/bash -c 'cd /var/source && composer update'
25+ - docker-compose exec hhvm /bin/bash -c 'cd /var/source && hh_client && hhvm ./vendor/bin/hacktest.hack tests/'
26+ matrix :
27+ fast_finish : true
Original file line number Diff line number Diff line change 1+ version : ' 3'
2+ services :
3+ hhvm :
4+ build :
5+ context : ./docker/hhvm
6+ args :
7+ hhvmversion : ${HHVM_VERSION}
8+ volumes :
9+ - .:/var/source
10+ command : hhvm --mode server -vServer.AllowRunAsRoot=1
11+ restart : always
12+ tty : true
13+ redis :
14+ image : redis:4-alpine3.8
15+ ports :
16+ - " 6379:6379"
17+ memcached :
18+ image : memcached:latest
19+ ports :
20+ - " 31211:11211"
Original file line number Diff line number Diff line change 1+ ARG hhvmversion
2+ FROM "hhvm/hhvm:$hhvmversion"
3+
4+ RUN apt-get update
5+ RUN DEBIAN_FRONTEND=noninteractive
6+ RUN apt install -y php-cli zip unzip dnsutils iputils-ping net-tools
7+ RUN hhvm --version && php --version
8+ RUN cd $(mktemp -d) \
9+ && curl https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
Original file line number Diff line number Diff line change @@ -40,18 +40,18 @@ class FileSystemCache extends CacheProvider {
4040 public function fetch (string $id ): mixed {
4141 $resource = $this -> fileContains($id );
4242 if ($resource === false ) {
43- return ;
43+ return null ;
4444 }
4545 if ($resource is string ) {
4646 $element = $this -> unserializeElement($resource );
4747 $expiration = $element -> getLifetime();
4848 if ($expiration && $expiration < time ()) {
4949 $this -> delete($id );
50- return ;
50+ return null ;
5151 }
5252 return $element -> getData();
5353 }
54- return ;
54+ return null ;
5555 }
5656
5757 <<__Override >>
@@ -164,7 +164,7 @@ class FileSystemCache extends CacheProvider {
164164 <<__Memoize >>
165165 protected function unserializeElement (string $resource ): Element {
166166 $element = \unserialize ($resource );
167- if ($element instanceof Element ) {
167+ if ($element is Element ) {
168168 return $element ;
169169 }
170170 return new Element (' ' , - 1 );
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ class MapCache extends CacheProvider {
3030 return $element -> getData();
3131 }
3232 }
33- return ;
33+ return null ;
3434 }
3535
3636 <<__Override >>
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ class MemcachedCache extends CacheProvider {
3030
3131 public function getMemcached (): Memcached {
3232 invariant (
33- $this -> memcached instanceof Memcached ,
33+ $this -> memcached is Memcached ,
3434 " Type mismatch"
3535 );
3636 return $this -> memcached ;
@@ -39,10 +39,10 @@ class MemcachedCache extends CacheProvider {
3939 <<__Override >>
4040 public function fetch (string $id ): mixed {
4141 $element = $this -> getMemcached()-> get($id );
42- if ($element instanceof Element ) {
42+ if ($element is Element ) {
4343 return $element -> getData();
4444 }
45- return ;
45+ return null ;
4646 }
4747
4848 <<__Override >>
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ class VoidCache extends CacheProvider {
2222
2323 <<__Override >>
2424 public function fetch (string $_id ): mixed {
25- return ;
25+ return null ;
2626 }
2727
2828 <<__Override >>
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ final class CacheManagerTest extends HackTest {
3636class NullCache extends CacheProvider {
3737 <<__Override >>
3838 public function fetch (string $_id ): mixed {
39- return ;
39+ return null ;
4040 }
4141
4242 <<__Override >>
You can’t perform that action at this time.
0 commit comments