Skip to content

Commit

Permalink
Merge pull request #10 from graze/php55-support
Browse files Browse the repository at this point in the history
Support PHP 5.5
  • Loading branch information
notlee committed Apr 7, 2016
2 parents 8cbc8ab + d96f9a4 commit cc8e5e3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
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: php
sudo: false

php:
- 5.5
- 5.6
- 7.0
- hhvm
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ SHELL = /bin/sh
.SILENT: help

install: ## Download the depenedencies then build the image :rocket:.
docker pull php:5.5-cli
docker pull php:5.6-cli
docker pull php:7.0-cli
make 'composer-update --optimize-autoloader --ignore-platform-reqs'
Expand All @@ -21,6 +22,8 @@ test: ## Run the unit and intergration testsuites.
test: test-unit test-benchmark

test-unit: ## Run the unit testsuite.
docker run --rm -t -v $$(pwd):/opt/graze/formatter -w /opt/graze/formatter php:5.5-cli \
vendor/bin/phpunit --testsuite unit
docker run --rm -t -v $$(pwd):/opt/graze/formatter -w /opt/graze/formatter php:5.6-cli \
vendor/bin/phpunit --testsuite unit
docker run --rm -t -v $$(pwd):/opt/graze/formatter -w /opt/graze/formatter php:7.0-cli \
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
},

"require": {
"php": "^5.6 || ^7.0",
"php": "^5.5 || ^5.6 || ^7.0",
"graze/sort": "^2.0.1"
},

"require-dev": {
"graze/hamcrest-test-listener": "^1.0",
"hamcrest/hamcrest-php": "^1.2",
"phpunit/phpunit": "^5.0"
"phpunit/phpunit": "^4.8 || ^5.0"
}
}
3 changes: 1 addition & 2 deletions src/AbstractFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

namespace Graze\Formatter;

use function Graze\Sort\schwartzian;
use Graze\Formatter\Filter;
use Graze\Formatter\FormatterInterface;
use Graze\Formatter\Processor;
Expand Down Expand Up @@ -150,7 +149,7 @@ private function filter(array $unfiltered)
private function sort(array $unsorted)
{
if ($this->sorters) {
return schwartzian($unsorted, $this->sorters);
return \Graze\Sort\schwartzian($unsorted, $this->sorters);
}

return $unsorted;
Expand Down

0 comments on commit cc8e5e3

Please sign in to comment.