Skip to content

Commit 34ea84e

Browse files
committed
Initial commit
0 parents  commit 34ea84e

19 files changed

+1140
-0
lines changed

.docs/README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Redis
2+
3+
[Predis](https://github.com/nrk/predis) integration into [Nette/DI](https://github.com/nette/di)
4+
5+
## Content
6+
7+
- [Usage - how to register](#usage)
8+
- [Configuration - how to configure](#configuration)
9+
10+
## Usage
11+
12+
```yaml
13+
extensions:
14+
redis: Contributte\Redis\DI\RedisExtension
15+
```
16+
17+
## Configuration
18+
19+
```yaml
20+
redis:
21+
# Setup Tracy panel
22+
debug: %debugMode%
23+
24+
connection:
25+
default:
26+
uri: tcp://127.0.0.1:6379
27+
28+
# Options passed directly to Predis\Client
29+
# https://github.com/nrk/predis#client-configuration
30+
options: []
31+
```
32+
33+
### Sessions
34+
35+
Setup Nette\Http\Session to store session with Redis
36+
37+
```yaml
38+
redis:
39+
connection:
40+
default:
41+
sessions: true
42+
43+
## you can also configure session
44+
sessions:
45+
ttl: null # time after which is session invalidated
46+
```
47+
48+
### Cache
49+
50+
Replaces Nette\Caching\IStorage in DIC with RedisStorage
51+
52+
```yaml
53+
redis:
54+
connection:
55+
default:
56+
storage: false
57+
```

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
indent_style = tab
11+
indent_size = tab
12+
tab_width = 4
13+
14+
[{*.json,*.yml,*.md}]
15+
indent_style = space
16+
indent_size = 2

.gitattributes

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Not archived
2+
.docs export-ignore
3+
tests export-ignore
4+
.editorconfig export-ignore
5+
.gitattributes export-ignore
6+
.gitignore export-ignore
7+
.travis.yml export-ignore
8+
phpstan.neon export-ignore
9+
README.md export-ignore
10+
ruleset.xml export-ignore

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# IDE
2+
/.idea
3+
4+
# Composer
5+
/vendor
6+
/composer.lock
7+
8+
# Tests
9+
/temp/
10+
/tests/*.log
11+
/tests/tmp
12+
/tests/coverage.html
13+
/coverage.xml

.travis.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
language: php
2+
php:
3+
- 7.1
4+
- 7.2
5+
- 7.3
6+
7+
before_install:
8+
# Turn off XDebug
9+
- phpenv config-rm xdebug.ini || return 0
10+
11+
install:
12+
# Composer
13+
- travis_retry composer install --no-progress --prefer-dist
14+
15+
script:
16+
# Check all dependencies at master are up-to-date when running regular builds
17+
- |
18+
if [[ $TRAVIS_EVENT_TYPE == "cron" && $TRAVIS_BRANCH == "master" ]]; then
19+
composer outdated --direct --strict
20+
fi
21+
# Tests
22+
- composer run-script tests
23+
24+
jobs:
25+
include:
26+
- env: title="Lowest Dependencies 7.1"
27+
php: 7.1
28+
install:
29+
- travis_retry composer update --no-progress --prefer-dist --prefer-lowest
30+
script:
31+
- composer run-script tests
32+
33+
- stage: Quality Assurance
34+
php: 7.1
35+
script:
36+
- composer run-script qa
37+
38+
- stage: Phpstan
39+
php: 7.1
40+
script:
41+
- composer run-script phpstan-install
42+
- composer run-script phpstan
43+
44+
- stage: Test Coverage
45+
if: branch = master AND type = push
46+
php: 7.1
47+
script:
48+
- composer run-script coverage
49+
after_script:
50+
- wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar
51+
- php php-coveralls.phar --verbose --config tests/.coveralls.yml
52+
53+
allow_failures:
54+
- stage: Test Coverage
55+
56+
sudo: false
57+
58+
cache:
59+
directories:
60+
- $HOME/.composer/cache

0 commit comments

Comments
 (0)