Skip to content

Commit 9003d1d

Browse files
authored
Merge pull request #6 from SpacePossum/1.0
maintenance
2 parents 9b1e261 + bfa35e2 commit 9003d1d

16 files changed

+366
-279
lines changed

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
* text=auto eol=lf
2+
*.php text eol=lf whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent,tabwidth=4 diff=php
3+
*.json text eol=lf whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent,tabwidth=4
4+
*.test text eol=lf whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent,tabwidth=4
5+
*.yml text eol=lf whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent,tabwidth=4

.php_cs.dist

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,21 @@ return Symfony\CS\Config\Config::create()
1616
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
1717
// and extra fixers:
1818
->fixers(array(
19+
'ereg_to_preg',
1920
'header_comment',
20-
'long_array_syntax',
2121
'newline_after_open_tag',
22+
'no_useless_return',
2223
'ordered_use',
24+
'short_array_syntax',
25+
'phpdoc_order',
2326
'php_unit_construct',
2427
'php_unit_strict',
25-
'phpdoc_order',
2628
'strict',
2729
'strict_param',
28-
'-psr0',
2930
'-empty_return',
31+
'-phpdoc_short_description',
32+
'-phpdoc_to_comment',
33+
'-psr0',
3034
))
3135
->finder(
3236
Symfony\CS\Finder\DefaultFinder::create()

.travis.yml

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,44 @@
11
language: php
22

3-
php:
4-
- 5.4
5-
- 5.5
6-
- 5.6
7-
- 7
8-
- hhvm
3+
git:
4+
depth: 1
5+
6+
sudo: false
7+
8+
matrix:
9+
fast_finish: true
10+
include:
11+
- php: 5.4
12+
env: MEMCACHED_PECL=memcached-1.0.2 COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
13+
- php: 5.5
14+
env: MEMCACHED_PECL=memcached-2.0.1 COMPOSER_FLAGS="--prefer-stable"
15+
- php: 5.6
16+
env: MEMCACHED_PECL=memcached-2.1.0 COMPOSER_FLAGS="--prefer-stable"
17+
- php: 7.0
18+
env: MEMCACHED_PECL=memcached-2.2.0 COMPOSER_FLAGS="--prefer-stable"
19+
- php: 7.1
20+
env: MEMCACHED_PECL=memcached-2.2.0 COMPOSER_FLAGS="--dev"
21+
- php: hhvm-3.9
22+
sudo: required
23+
dist: trusty
24+
group: edge
25+
env: COMPOSER_FLAGS="--prefer-stable"
26+
- php: hhvm-nightly
27+
sudo: required
28+
dist: trusty
29+
group: edge
30+
env: COMPOSER_FLAGS="--dev"
31+
allow_failures:
32+
- php: 7.1
33+
- php: hhvm-nightly
34+
35+
before_install:
36+
- if [[ ! $TRAVIS_PHP_VERSION = hhvm* ]]; then yes "" | pecl install -f "$MEMCACHED_PECL"; fi
937

1038
install:
11-
- travis_retry composer install --no-interaction --prefer-source
39+
- composer update $COMPOSER_FLAGS --no-interaction -v
40+
- if [[ $TRAVIS_PHP_VERSION = 7.0 ]]; then curl -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v1.12.1/php-cs-fixer.phar -o php-cs-fixer.phar; fi
1241

1342
script:
14-
- phpunit --verbose
43+
- phpunit --verbose
44+
- if [[ $TRAVIS_PHP_VERSION = 7.0 ]]; then php php-cs-fixer.phar --dry-run -v --config-file=.php_cs.dist fix; fi

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ Memcache mock (http://memcached.org/) which mimics the [Memcached package](http:
66
Its use is for test purposes for software that support interaction with Memcache using the Memcached package.
77
It provides a way to perform tests without having an instance of Memcache running or even having the Memcached package available.
88
The mock is written in PHP as class and is therefor not persistent beyond the execution of the script that creates it.
9+
Current mocking is based on PECL=memcached-2.1.0, support for later versions is currently being developed.
910

1011
### Requirements
1112

12-
PHP 5.4 for the Callable type hint.
13+
PHP 5.4 (PHP7 supported). Optional HHVM support >= 3.9.
1314

1415
### Install
1516

composer.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
2-
"name": "gecko-packages/gecko-memcache-mock",
3-
"type": "library",
4-
"homepage": "https://github.com/GeckoPackages",
5-
"description": "Memcache mock.",
6-
"license": "MIT",
7-
"keywords" : ["Memcache", "Memcached", "Mock", "Test"],
8-
"require": {
9-
"php": "^5.4 || ^7.0",
10-
"psr/log": "~1.0",
11-
"symfony/stopwatch" : "~2.5|~3.0"
12-
},
13-
"autoload": {
14-
"psr-4": {
15-
"GeckoPackages\\MemcacheMock\\": "src\\MemcacheMock"
2+
"name": "gecko-packages/gecko-memcache-mock",
3+
"type": "library",
4+
"homepage": "https://github.com/GeckoPackages",
5+
"description": "Memcache mock.",
6+
"license": "MIT",
7+
"keywords" : ["Memcache", "Memcached", "Mock", "Test"],
8+
"require": {
9+
"php": "^5.4 || ^7.0",
10+
"psr/log": "~1.0",
11+
"symfony/stopwatch" : "~2.5|~3.0"
12+
},
13+
"autoload": {
14+
"psr-4": {
15+
"GeckoPackages\\MemcacheMock\\": "src\\MemcacheMock"
16+
}
1617
}
17-
}
1818
}

phpunit.xml.dist

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

33
<phpunit backupGlobals="false"
4-
backupStaticAttributes="false"
5-
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
processIsolation="false"
10-
stopOnFailure="false"
11-
syntaxCheck="false"
12-
bootstrap="./tests/autoload.php"
13-
>
4+
backupStaticAttributes="false"
5+
colors="true"
6+
convertErrorsToExceptions="true"
7+
convertNoticesToExceptions="true"
8+
convertWarningsToExceptions="true"
9+
processIsolation="false"
10+
stopOnFailure="false"
11+
syntaxCheck="false"
12+
bootstrap="./tests/autoload.php"
13+
>
1414
<testsuites>
1515
<testsuite name="GeckoPackages Memcache Mock Test">
1616
<directory>./tests/MemcacheMock/Tests/</directory>

src/MemcacheMock/MemcachedLogger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,6 @@ public function stopMethod()
7474
*/
7575
private function log($message, array $params = null)
7676
{
77-
$this->logger->debug($message, null === $params ? array() : $params);
77+
$this->logger->debug($message, null === $params ? [] : $params);
7878
}
7979
}

0 commit comments

Comments
 (0)