Skip to content

Commit

Permalink
Merge pull request #21 from serima/feature/upgrade-ecosystems
Browse files Browse the repository at this point in the history
BREAKING CHANGES: Support PHP >= 7.2
  • Loading branch information
serima authored Aug 7, 2020
2 parents 9c6da38 + 546c703 commit a8f9a3b
Show file tree
Hide file tree
Showing 14 changed files with 2,593 additions and 786 deletions.
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ env:

matrix:
include:
- php: 5.4
- php: 5.5
- php: 5.6
- php: 7.2
- php: 7.3
- php: 7.4
env: COVERALLS=1 PHPCS=1
- php: 7
- php: hhvm
- php: nightly

allow_failures:
- php: hhvm
- php: nightly
fast_finish: true

before_script:
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#Flexihash
# Flexihash

[![Build Status](https://travis-ci.org/pda/flexihash.svg?branch=master)](https://travis-ci.org/pda/flexihash) [![Coverage Status](https://coveralls.io/repos/github/pda/flexihash/badge.svg?branch=master)](https://coveralls.io/github/pda/flexihash?branch=master)

Flexihash is a small PHP library which implements [consistent hashing](http://en.wikipedia.org/wiki/Consistent_hashing), which is most useful in distributed caching. It requires PHP5 and uses [PHPUnit](http://simpletest.org/) for unit testing.

##Installation
## Installation

[Composer](https://getcomposer.org/) is the recommended installation technique. You can find flexihash on [Packagist](https://packagist.org/packages/flexihash/flexihash) so installation is as easy as
```
Expand All @@ -13,7 +14,7 @@ or in your `composer.json`
```json
{
"require": {
"flexihash/flexihash": "^2.0.0"
"flexihash/flexihash": "^3.0.0"
}
}
```
Expand All @@ -24,7 +25,7 @@ or in your `composer.json`
$hash = new Flexihash();

// bulk add
$hash->addTargets(array('cache-1', 'cache-2', 'cache-3'));
$hash->addTargets(['cache-1', 'cache-2', 'cache-3']);

// simple lookup
$hash->lookup('object-a'); // "cache-1"
Expand All @@ -43,7 +44,7 @@ $hash->removeTarget('cache-2');
$hash->lookup('object'); // "cache-4"
```

##Further Reading
## Further Reading

* http://www.spiteful.com/2008/03/17/programmers-toolbox-part-3-consistent-hashing/
* http://weblogs.java.net/blog/tomwhite/archive/2007/11/consistent_hash.html
17 changes: 15 additions & 2 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
#Roadmap

##v1.0.0
## v1.0.0

This maintains the historical API but allows for composer autoloading.

- [x] Composer support.
- [x] PSR2 bar class names.
- [x] Migrate tests to PHPUnit.


##v2.0.0
## v2.0.0

The historical API will be broken by classname changes.

- [x] Introduce namespacing.
- [x] PSR4 autoloading.
- [x] Automated testing.
- [x] PHP 5.4 minimum.

## v3.0.0

- [x] PHP 7.2 minimum.
- [x] PHPUnit 8.
- [x] Enable strict typing mode for all PHP files.

## v4.0.0

- [ ] PHP 7.3 minimum.
- [ ] PHPUnit 9.
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
}
],
"require": {
"php": ">=5.4.0"
"php": ">=7.2.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8",
"squizlabs/php_codesniffer": "^2.3",
"satooshi/php-coveralls": "~1.0",
"symfony/config": "^2.0.0",
"symfony/console": "^2.0.0",
"symfony/filesystem": "^2.0.0",
"symfony/stopwatch": "^2.0.0",
"symfony/yaml": "^2.0.0"
"phpunit/phpunit": "^8",
"squizlabs/php_codesniffer": "3.*",
"php-coveralls/php-coveralls": "^2.2",
"symfony/config": "^5.1.3",
"symfony/console": "^5.1.3",
"symfony/filesystem": "^5.1.3",
"symfony/stopwatch": "^5.1.3",
"symfony/yaml": "^5.1.3"
},
"autoload": {
"psr-4": {
Expand Down
Loading

0 comments on commit a8f9a3b

Please sign in to comment.