Skip to content

Commit

Permalink
Minor cleanups and adjustments.
Browse files Browse the repository at this point in the history
  • Loading branch information
nrk committed Jun 12, 2016
1 parent 9836e47 commit 02f246c
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 54 deletions.
49 changes: 27 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,41 @@
language: php

php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0

sudo: required

services:
- redis-server

env:
global:
- TEST_PHP_ARGS=-q
global:
- TEST_PHP_ARGS=-q

install:
- |
git clone https://github.com/redis/hiredis.git \
&& pushd hiredis \
&& git checkout v0.13.3 \
&& make \
&& sudo make install \
&& popd
- |
git clone https://github.com/redis/hiredis.git \
&& pushd hiredis \
&& git checkout v0.13.3 \
&& make \
&& sudo make install \
&& popd
script:
- export NO_INTERACTION=1
- export REPORT_EXIT_STATUS=1
- . ./travis_cflags.sh
- phpize
- ./configure --enable-phpiredis
- make
- export TEST_PHP_EXECUTABLE=`which php`
- php run-tests.php -d extension=phpiredis.so -d extension_dir=modules -n ./*.phpt
- export NO_INTERACTION=1
- export REPORT_EXIT_STATUS=1
- . ./travis_cflags.sh
- phpize
- ./configure --enable-phpiredis
- make
- export TEST_PHP_EXECUTABLE=`which php`
- php run-tests.php -d extension=phpiredis.so -d extension_dir=modules -n ./*.phpt

matrix:
allow_failures:
- php: 7.1
fast_finish: true
12 changes: 0 additions & 12 deletions COPYING

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2011-2014, Daniele Alessandri
Copyright (c) 2011-2016, Daniele Alessandri
Copyright (c) 2010-2012, Sebastian Waisbrot

Redistribution and use in source and binary forms, with or without modification,
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
[![Build status][ico-travis]][link-travis]

Phpiredis is an extension for PHP 5.x and 7.x based on [hiredis](https://github.com/redis/hiredis)
that provides a simple and efficient efficient client for Redis and a fast incremental parser for
that provides a simple and efficient client for Redis and a fast incremental parser / serializer for
the [RESP protocol](http://redis.io/topics/protocol).

## Installation ##

Building and using this extension requires `hiredis` (>=0.9.0 <1.0.0) to be installed on the system.
`hiredis` is usually available in the repositories of most Linux distributions, alternatively it is
possible to build it fetching the code from its [repository](https://github.com/redis/hiredis).
possible to build it by fetching the code from its [repository](https://github.com/redis/hiredis).

```sh
git clone https://github.com/nrk/phpiredis.git
Expand All @@ -20,7 +20,7 @@ phpize && ./configure --enable-phpiredis
make && make install
```

If the configuration script is unable to locate `hiredis` on your system, you can specify in which
When the configuration script is unable to locate `hiredis` on your system, you can specify in which
directory it can be found using `--with-hiredis-dir=` (e.g. `--with-hiredis-dir=/usr/local`).

Phpiredis provides a basic test suite that can be launched with `make test`. Tests require a running
Expand Down Expand Up @@ -60,8 +60,8 @@ $response = phpiredis_multi_command_bs($redis, array(
));
```

The `_bs` suffix functions indicates that these functions can handle binary key names or values by
using the unified Redis protocol available since Redis >= 1.2.
The `_bs` suffix indicates that these functions can handle binary key names or values by using the
unified Redis protocol available since Redis >= 1.2.

Commands can still be sent using the old and deprecated inline protocol using `phpiredis_command()`
and `phpiredis_multi_command()` (note the lack of the `_bs` suffix) but it's highly discouraged and
Expand Down
2 changes: 1 addition & 1 deletion phpiredis.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ PHP_FUNCTION(phpiredis_multi_command_bs)
zval *p_cmdArgs;
#ifndef ZEND_ENGINE_3
zval cmdArgs;
HashPosition cmdsPos;
HashPosition cmdsPos;
zval **tmp;
#endif
int cmdSize;
Expand Down
21 changes: 8 additions & 13 deletions travis_cflags.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,25 @@ function contains() {
return 0
}



strictPHPVersions=()
strictPHPVersions+=("5.3")
strictPHPVersions+=("5.4")
strictPHPVersions+=("5.5")
strictPHPVersions+=("5.6")
strictPHPVersions+=("7.0")

strictImageMagickVersions=()
strictImageMagickVersions+=("dev")
strictImageMagickVersions+=("6.8.7-0")
strictImageMagickVersions+=("6.7.5-3")
strictImageMagickVersions+=("6.6.0-9")

echo "TRAVIS_PHP_VERSION is ${TRAVIS_PHP_VERSION}"

strictPHP=$(contains "${strictPHPVersions[@]}" "${TRAVIS_PHP_VERSION}" )

echo "strictPHP is ${strictPHP}"

if [[ $strictPHP = '1' ]]; then
CFLAGS="-Wno-deprecated-declarations -Wdeclaration-after-statement -Werror -Wall";
else
CFLAGS="-Wno-deprecated-declarations";
if [[ $strictPHP = '1' ]]; then
CFLAGS="-Wno-deprecated-declarations -Wdeclaration-after-statement -Werror -Wall";
else
CFLAGS="-Wno-deprecated-declarations";
fi

echo "Setting CFLAGS to ${CFLAGS}"

export CFLAGS=$CFLAGS
export CFLAGS=$CFLAGS

0 comments on commit 02f246c

Please sign in to comment.