Skip to content

Commit

Permalink
Merge pull request #2 from matsubo/feature/php70
Browse files Browse the repository at this point in the history
Feature/php70
  • Loading branch information
matsubo committed Dec 26, 2015
2 parents d3ab032 + 6fb8c79 commit d069051
Show file tree
Hide file tree
Showing 6 changed files with 1,185 additions and 12 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
vendor
composer.lock
composer.phar
clover.xml
build
9 changes: 2 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
language: php
php:
- 7.0
- 5.6
- 5.5
- 5.4
- 5.3
services:
- redis-server
before_install:
# install phpredis extension.
- wget -O phpredis.tar.gz --no-check-certificate https://github.com/nicolasff/phpredis/tarball/master
- tar -xzf phpredis.tar.gz
- sh -c "cd nicolasff-phpredis-* && phpize && ./configure && make && sudo make install"
- echo "extension=redis.so" > redis.ini && phpenv config-add redis.ini
- ./.travis_redis.sh
before_script:
- wget http://getcomposer.org/composer.phar
- php composer.phar install --dev --no-interaction
Expand Down
24 changes: 24 additions & 0 deletions .travis_redis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
# install phpredis extension.

set -e



major_version=`php -v | head -n 1 | cut -c 5`
if [ $major_version == "7" ]
then
git clone --branch=php7 https://github.com/phpredis/phpredis
else
git clone https://github.com/phpredis/phpredis
fi

cd phpredis
phpize
./configure
make
sudo make install

echo "extension=redis.so" > redis.ini
phpenv config-add redis.ini

9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Requirements
- PhpRedis extension
- https://github.com/nicolasff/phpredis
- PHP
- >=5.3
- >=5.4, >=5.5 >=5.6, >=7.0
- Composer


Expand Down Expand Up @@ -61,7 +61,7 @@ Run with default setting.
% vendor/bin/phpunit -c phpunit.xml.dist
```

Currently tested with PHP 5.3.15 + Redis 2.6.12.
Currently tested with PHP 7.0.0 + Redis 2.6.12.


TODO
Expand All @@ -73,6 +73,11 @@ TODO

History
----------------------------
- Next Release
- Refactoring
- Support PHP 7.0
- Library update
- Removed PHP5.3 and PHP5.4 compatibility
- 1.0.1
- bugfix: correct variable name.
- supports travis CI and passed test.
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "library",
"license": "PHP3",
"require" : {
"php": ">=5.3.0"
"php": ">=5.5.0"
},
"authors": [
{
Expand All @@ -16,7 +16,7 @@
}
],
"require-dev": {
"devster/ubench": "1.1.*-dev",
"devster/ubench": "dev-master",
"phpunit/phpunit": "3.7.*@stable",
"satooshi/php-coveralls": "dev-master",
"fabpot/php-cs-fixer": "0.3.*@dev",
Expand Down
Loading

0 comments on commit d069051

Please sign in to comment.