Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: colinmollenhour/Cm_Cache_Backend_Redis
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.13.0
Choose a base ref
...
head repository: colinmollenhour/Cm_Cache_Backend_Redis
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 706 additions and 640 deletions.
  1. +50 −0 .github/workflows/php.yml
  2. +3 −0 .gitignore
  3. +21 −0 .php-cs-fixer.dist.php
  4. +344 −266 Cm/Cache/Backend/Redis.php
  5. +2 −0 Dockerfile
  6. +2 −1 LICENSE
  7. +46 −34 README.md
  8. +12 −2 composer.json
  9. +1 −1 lib/Credis
  10. +1 −1 modman
  11. +70 −63 stats.php
  12. +43 −142 tests/CommonBackendTest.php
  13. +37 −76 tests/CommonExtendedBackendTest.php
  14. +4 −3 tests/RedisBackendAutoExpiryTest.php
  15. +4 −5 tests/RedisBackendStandaloneTest.php
  16. +66 −46 tests/RedisBackendTest.php
50 changes: 50 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: PHPUnit

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
test:

runs-on: ubuntu-latest

services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379

steps:
- uses: actions/checkout@v3

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run PHPUnit test suite
run: composer run-script test

- name: Run PHP CS Fixer
run: composer run-script php-cs-fixer -- --dry-run
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
.basedir
vendor
composer.lock
/.php-cs-fixer.cache
21 changes: 21 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/*
* This document has been generated with
* https://mlocati.github.io/php-cs-fixer-configurator/#version:3.4.0|configurator
* you can change this configuration by importing this file.
*/
$config = new PhpCsFixer\Config();
return $config
->setRules([
'@PSR12' => true,
])
->setFinder(
PhpCsFixer\Finder::create()
->in([
'Cm/',
'tests/',
])
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true)
);
Loading