diff --git a/.github/workflows/.editorconfig b/.github/workflows/.editorconfig new file mode 100644 index 00000000..7bd3346f --- /dev/null +++ b/.github/workflows/.editorconfig @@ -0,0 +1,2 @@ +[*.yml] +indent_size = 2 diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml new file mode 100644 index 00000000..d89112ff --- /dev/null +++ b/.github/workflows/checks.yml @@ -0,0 +1,39 @@ +name: Checks + +on: pull_request + +jobs: + composer-normalize: + name: Composer Normalize + runs-on: ubuntu-latest + + steps: + - name: Set up PHP + uses: shivammathur/setup-php@2.7.0 + with: + php-version: 7.4 + coverage: none + tools: composer-normalize + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Normalize + run: | + ok=0 + echo ::group::Root + composer-normalize --dry-run + echo ::endgroup:: + for PACKAGE in $(find src -maxdepth 4 -type f -name composer.json | sort) + do + echo ::group::$PACKAGE + localExit=0 + composer-normalize $PACKAGE --dry-run || localExit=1 + ok=$(( $localExit || $ok )) + echo ::endgroup:: + if [ $localExit -ne 0 ]; then + echo "::error::$PACKAGE failed" + fi + done + + exit $ok diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..4afbe0ff --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,98 @@ +name: CI + +on: + pull_request: ~ + push: + branches: + - master + +jobs: + build: + name: Build + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: ['7.4', '8.0', '8.1'] + + services: + redis: + image: redis:6.0.0 + ports: + - 6379:6379 + redis-cluster: + image: grokzen/redis-cluster:5.0.4 + ports: + - 7000:7000 + - 7001:7001 + - 7002:7002 + env: + STANDALONE: 1 + memcached: + image: memcached:1.6.5 + ports: + - 11211:11211 + mongodb: + image: mongo + ports: + - 27017:27017 + + steps: + - name: Set up PHP + uses: shivammathur/setup-php@2.7.0 + with: + php-version: ${{ matrix.php }} + coverage: none + tools: pecl + extensions: redis, memcached, mongodb, apcu, apc + ini-values: apc.enable_cli=1 + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Download dependencies + env: + PHP_VERSION: ${{ matrix.php }} + run: | + CURRENT_DIR=$(pwd) + ok=0 + for PACKAGE in $(find src -maxdepth 4 -type f -name phpunit.xml.dist -printf '%h\n' | sort) + do + echo ::group::$PACKAGE + echo "$CURRENT_DIR/$PACKAGE" + cd "$CURRENT_DIR/$PACKAGE" + + localExit=0 + if [ $PHP_VERSION = '8.0' ]; then + COMPOSER_OPTIONS=' --ignore-platform-req=php' + fi + composer update --no-interaction --prefer-dist --optimize-autoloader $COMPOSER_OPTIONS || localExit=1 + ok=$(( $localExit || $ok )) + echo ::endgroup:: + if [ $localExit -ne 0 ]; then + echo "::error::$PACKAGE error" + fi + done + + exit $ok + + - name: Run tests + run: | + CURRENT_DIR=$(pwd) + ok=0 + for PACKAGE in $(find src -maxdepth 4 -type f -name phpunit.xml.dist -printf '%h\n' | sort) + do + echo ::group::$PACKAGE + echo "$CURRENT_DIR/$PACKAGE" + cd "$CURRENT_DIR/$PACKAGE" + + localExit=0 + ./vendor/bin/phpunit 2>&1 || localExit=1 + ok=$(( $localExit || $ok )) + echo ::endgroup:: + if [ $localExit -ne 0 ]; then + echo "::error::$PACKAGE failed" + fi + done + + exit $ok diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 00000000..ec86a73d --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,56 @@ +name: Static analysis + +on: + pull_request: ~ + push: + branches: + - master + +jobs: + phpstan: + name: PHPStan + runs-on: ubuntu-latest + + steps: + - name: Set up PHP + uses: shivammathur/setup-php@2.7.0 + with: + php-version: '7.4' + coverage: none + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Download dependencies + run: | + composer update --no-interaction --prefer-dist --optimize-autoloader + + - name: PHPStan + uses: docker://oskarstark/phpstan-ga:0.12.48 + with: + entrypoint: /composer/vendor/bin/phpstan + args: analyze --no-progress + + psalm: + name: Psalm + runs-on: ubuntu-latest + steps: + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + extensions: redis, memcached, apcu + tools: composer:v2 + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Download dependencies + run: | + composer require --dev --no-update psalm/phar:3.16 + composer update --no-interaction --prefer-dist + + - name: Psalm + run: | + ./vendor/bin/psalm.phar --version + ./vendor/bin/psalm.phar --output-format=github --no-progress --show-info=false --stats diff --git a/.gush.yml b/.gush.yml deleted file mode 100644 index 6784386a..00000000 --- a/.gush.yml +++ /dev/null @@ -1,18 +0,0 @@ -# Gush configuration file, any comments will be lost. -repo_adapter: github -issue_tracker: github -repo_org: php-cache -repo_name: cache -issue_project_org: php-cache -issue_project_name: issues -pr_type: - - feature - - bugfix - - refactor - - tests - - remove - - style - - documentation - - security -table-pr: - fixed_tickets: ['Fixed Tickets', ''] \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 758fdb19..00000000 --- a/.travis.yml +++ /dev/null @@ -1,109 +0,0 @@ -language: php -sudo: required -dist: trusty -env: - global: - - COVERAGE=false - -branches: - except: - - /^analysis-.*$/ - - /^patch-.*$/ - -matrix: - fast_finish: true - include: - - php: 5.6 - env: deps="low" - - php: 7.1 - env: deps="high" - - php: 7.0 - env: COVERAGE=true - - php: 7.1 - - php: 7.2 - - php: 5.6 - -services: - - redis - - memcached - - mongodb - -addons: - apt: - sources: - - mongodb-3.2-trusty - packages: - - parallel - - mongodb-org-server - -cache: - directories: - - "$HOME/.composer/cache" - -before_install: - - if [[ $COVERAGE == false ]]; then phpenv config-rm xdebug.ini || true; fi - - mkdir -p ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d - - ./build/php/all.sh - - ./build/RedisClusterSetup.sh - - sleep 5 # To make sure all services installed and running - - | - # General configuration - stty cols 120 - PHP=$TRAVIS_PHP_VERSION - [ -d ~/.composer ] || mkdir ~/.composer - export PHPUNIT=$(readlink -f ./phpunit) - export PHPUNIT_X="$PHPUNIT --exclude-group benchmark" - export PHPUNIT_COVERAGE="$PHPUNIT_X --coverage-clover=coverage.xml" - export COMPOSER_UP='composer update --no-progress --no-suggest --ansi --prefer-dist' - - # tfold is a helper to create folded reports - tfold () { - title=$1 - fold=$(echo $title | sed -r 's/[^-_A-Za-z\d]+/./g') - shift - echo -e "travis_fold:start:$fold\\n\\e[1;34m$title\\e[0m" - bash -xc "$*" 2>&1 && - echo "########################################" && - echo "########################################" && - echo -e "\\e[32mOK\\e[0m $title\\n\\ntravis_fold:end:$fold" || - ( echo -e "\\e[41mKO\\e[0m $title\\n" && exit 1 ) - } - export -f tfold - - COMPONENTS=$(find src -mindepth 2 -type f -name phpunit.xml.dist -printf '%h\n') - - # php.ini configuration - INI=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - echo memory_limit = -1 >> $INI - -install: - - if [[ ! $skip ]]; then $COMPOSER_UP; fi - - | - run_tests () { - set -e - if [[ $skip ]]; then - echo -e "\\n\\e[1;34mIntermediate PHP version $PHP is skipped for pull requests.\\e[0m" - elif [[ $deps = high ]]; then - echo "$COMPONENTS" | parallel --gnu -j10% "tfold {} 'cd {} && $COMPOSER_UP && $PHPUNIT_X$LEGACY'" - elif [[ $deps = low ]]; then - sleep 3 - echo "$COMPONENTS" | parallel --gnu -j10% "tfold {} 'cd {} && $COMPOSER_UP --prefer-lowest --prefer-stable && $PHPUNIT_X'" - elif [[ $COVERAGE == true ]]; then - $PHPUNIT_COVERAGE - else - echo "$COMPONENTS" | parallel --gnu "tfold {} $PHPUNIT_X {}" - tfold tty-group $PHPUNIT --group tty - fi - } - -script: - - (run_tests) - -after_success: - - if [[ $COVERAGE == true ]]; then pip install --user codecov && codecov ; fi - -notifications: - email: false - webhooks: - urls: - - https://webhooks.gitter.im/e/7b0035a70de31fa976df diff --git a/README.md b/README.md index 95d90a12..73e4260c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ [![Gitter](https://badges.gitter.im/php-cache/cache.svg)](https://gitter.im/php-cache/cache?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![codecov.io](https://codecov.io/github/php-cache/cache/coverage.svg?branch=master)](https://codecov.io/github/php-cache/cache?branch=master) -[![Build Status](https://travis-ci.org/php-cache/cache.svg?branch=master)](https://travis-ci.org/php-cache/cache) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) [![StyleCI](https://styleci.io/repos/50789153/shield)](https://styleci.io/repos/50789153) diff --git a/build/README.md b/build/README.md deleted file mode 100755 index 5637a313..00000000 --- a/build/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Build Scripts - -This directory contains the scripts that travis uses to build the project. - -The scripts in [the php directory](php/) are ran when travis is testing the given version and adapter. [`all.sh`](php/all.sh) is ran for all adapters but for one php version. - -Tests are ran using [`runTest.sh`](runTest.sh). This file changes the directory to the library subdirectory, installs composer, and runs the tests. diff --git a/build/RedisClusterSetup.sh b/build/RedisClusterSetup.sh deleted file mode 100755 index 217f6a67..00000000 --- a/build/RedisClusterSetup.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env bash - -echo "Setup Redis Cluster" - -mkdir build/cluster-test; -cd build/cluster-test -mkdir 7000 7001 7002 7003 7004 7005 - -cd 7000; -echo "port 7000" > redis.conf -echo "cluster-enabled yes" >> redis.conf -echo "cluster-config-file nodes.conf" >> redis.conf -echo "cluster-node-timeout 5000" >> redis.conf -echo "appendonly yes" >> redis.conf -redis-server ./redis.conf & - -cd ../7001; -echo "port 7001" > redis.conf -echo "cluster-enabled yes" >> redis.conf -echo "cluster-config-file nodes.conf" >> redis.conf -echo "cluster-node-timeout 5000" >> redis.conf -echo "appendonly yes" >> redis.conf -redis-server ./redis.conf & - -cd ../7002; -echo "port 7002" > redis.conf -echo "cluster-enabled yes" >> redis.conf -echo "cluster-config-file nodes.conf" >> redis.conf -echo "cluster-node-timeout 5000" >> redis.conf -echo "appendonly yes" >> redis.conf -redis-server ./redis.conf & - -cd ../7003; -echo "port 7003" > redis.conf -echo "cluster-enabled yes" >> redis.conf -echo "cluster-config-file nodes.conf" >> redis.conf -echo "cluster-node-timeout 5000" >> redis.conf -echo "appendonly yes" >> redis.conf -redis-server ./redis.conf & - -cd ../7004; -echo "port 7004" > redis.conf -echo "cluster-enabled yes" >> redis.conf -echo "cluster-config-file nodes.conf" >> redis.conf -echo "cluster-node-timeout 5000" >> redis.conf -echo "appendonly yes" >> redis.conf -redis-server ./redis.conf & - -cd ../7005; -echo "port 7005" > redis.conf -echo "cluster-enabled yes" >> redis.conf -echo "cluster-config-file nodes.conf" >> redis.conf -echo "cluster-node-timeout 5000" >> redis.conf -echo "appendonly yes" >> redis.conf -redis-server ./redis.conf & - -cd .. -gem install redis; -wget http://download.redis.io/redis-stable/src/redis-trib.rb -echo "yes" | ruby redis-trib.rb create --replicas 1 127.0.0.1:7000 127.0.0.1:7001 \ -127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005 - -cd ../.. diff --git a/build/php/5.6/Apc.sh b/build/php/5.6/Apc.sh deleted file mode 100755 index c4a15ef5..00000000 --- a/build/php/5.6/Apc.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -echo "Add php.ini settings" -phpenv config-add ./build/php/apc.ini - -echo "Install APC Adapter & APCu Adapter dependencies" -yes '' | pecl install -f apcu-4.0.11 diff --git a/build/php/5.6/Apcu.sh b/build/php/5.6/Apcu.sh deleted file mode 100755 index dbc71fd6..00000000 --- a/build/php/5.6/Apcu.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -echo "Add php.ini settings" -phpenv config-add ./build/php/apc.ini - -echo "Install APC Adapter & APCu Adapter dependencies" -yes '' | pecl install -f apcu-4.0.10 diff --git a/build/php/5.6/Memcache.sh b/build/php/5.6/Memcache.sh deleted file mode 100755 index eb60e26a..00000000 --- a/build/php/5.6/Memcache.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -echo "Add php.ini settings" -phpenv config-add ./build/php/memcache.ini - -echo "Enable extension" -echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini \ No newline at end of file diff --git a/build/php/5.6/Memcached.sh b/build/php/5.6/Memcached.sh deleted file mode 100755 index 5c7ff622..00000000 --- a/build/php/5.6/Memcached.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -echo "Enable extension" -echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini \ No newline at end of file diff --git a/build/php/5.6/MongoDB.sh b/build/php/5.6/MongoDB.sh deleted file mode 100755 index 5a58535c..00000000 --- a/build/php/5.6/MongoDB.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -pecl install -f mongodb-1.1.2 - diff --git a/build/php/5.6/Redis.sh b/build/php/5.6/Redis.sh deleted file mode 100755 index 3589d6ea..00000000 --- a/build/php/5.6/Redis.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -echo "Install redis" -yes '' | pecl install -f redis-2.2.8 - -#echo "Enable extension" -#echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini diff --git a/build/php/7.0/Apcu.sh b/build/php/7.0/Apcu.sh deleted file mode 100755 index 319d2aaf..00000000 --- a/build/php/7.0/Apcu.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -echo "Add php.ini settings" -phpenv config-add ./build/php/apc.ini - -echo "Install APCu Adapter dependencies" -yes '' | pecl install -f apcu-5.1.8 diff --git a/build/php/7.0/Memcached.sh b/build/php/7.0/Memcached.sh deleted file mode 100755 index 5721d57e..00000000 --- a/build/php/7.0/Memcached.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -echo "Install memcache(d)" -echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini diff --git a/build/php/7.0/MongoDB.sh b/build/php/7.0/MongoDB.sh deleted file mode 100755 index b6905957..00000000 --- a/build/php/7.0/MongoDB.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -echo "Install MongoDB" -pecl install -f mongodb-1.1.2 - diff --git a/build/php/7.0/Redis.sh b/build/php/7.0/Redis.sh deleted file mode 100755 index ace14176..00000000 --- a/build/php/7.0/Redis.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -echo "Install Redis" -yes '' | pecl install -f redis-3.0.0 diff --git a/build/php/7.1/Apcu.sh b/build/php/7.1/Apcu.sh deleted file mode 100755 index 319d2aaf..00000000 --- a/build/php/7.1/Apcu.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -echo "Add php.ini settings" -phpenv config-add ./build/php/apc.ini - -echo "Install APCu Adapter dependencies" -yes '' | pecl install -f apcu-5.1.8 diff --git a/build/php/7.1/Memcached.sh b/build/php/7.1/Memcached.sh deleted file mode 100755 index 5721d57e..00000000 --- a/build/php/7.1/Memcached.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -echo "Install memcache(d)" -echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini diff --git a/build/php/7.1/MongoDB.sh b/build/php/7.1/MongoDB.sh deleted file mode 100755 index 103bcf7e..00000000 --- a/build/php/7.1/MongoDB.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -echo "Install MongoDB" -pecl install -f mongodb-1.1.2 diff --git a/build/php/7.1/Redis.sh b/build/php/7.1/Redis.sh deleted file mode 100755 index 65ca9bdd..00000000 --- a/build/php/7.1/Redis.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -echo "Install redis" -yes '' | pecl install -f redis-3.0.0 diff --git a/build/php/7.2/Apcu.sh b/build/php/7.2/Apcu.sh deleted file mode 100755 index 319d2aaf..00000000 --- a/build/php/7.2/Apcu.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -echo "Add php.ini settings" -phpenv config-add ./build/php/apc.ini - -echo "Install APCu Adapter dependencies" -yes '' | pecl install -f apcu-5.1.8 diff --git a/build/php/7.2/Memcached.sh b/build/php/7.2/Memcached.sh deleted file mode 100755 index 5721d57e..00000000 --- a/build/php/7.2/Memcached.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -echo "Install memcache(d)" -echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini diff --git a/build/php/7.2/MongoDB.sh b/build/php/7.2/MongoDB.sh deleted file mode 100755 index 103bcf7e..00000000 --- a/build/php/7.2/MongoDB.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -echo "Install MongoDB" -pecl install -f mongodb-1.1.2 diff --git a/build/php/7.2/Redis.sh b/build/php/7.2/Redis.sh deleted file mode 100755 index 65ca9bdd..00000000 --- a/build/php/7.2/Redis.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -echo "Install redis" -yes '' | pecl install -f redis-3.0.0 diff --git a/build/php/all.sh b/build/php/all.sh deleted file mode 100755 index 4aeb861c..00000000 --- a/build/php/all.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -for SCRIPT in build/php/$TRAVIS_PHP_VERSION/*.sh -do - echo "Found Script: $SCRIPT" - if [ -f $SCRIPT -a -x $SCRIPT ] - then - echo "Running: $SCRIPT" - . $SCRIPT - fi -done \ No newline at end of file diff --git a/build/php/apc.ini b/build/php/apc.ini deleted file mode 100755 index d85888ee..00000000 --- a/build/php/apc.ini +++ /dev/null @@ -1,3 +0,0 @@ -apc.enabled=1 -apc.enable_cli=1 -apc.use_request_time=0 \ No newline at end of file diff --git a/build/php/apcu_bc.ini b/build/php/apcu_bc.ini deleted file mode 100644 index 3ff19e7d..00000000 --- a/build/php/apcu_bc.ini +++ /dev/null @@ -1 +0,0 @@ -extension=apc.so \ No newline at end of file diff --git a/build/php/memcache.ini b/build/php/memcache.ini deleted file mode 100755 index c23acc3b..00000000 --- a/build/php/memcache.ini +++ /dev/null @@ -1,2 +0,0 @@ -memcache.enabled=1 -memcache.enable_cli=1 \ No newline at end of file diff --git a/ci_phpstan.neon b/ci_phpstan.neon deleted file mode 100644 index 26c5b59a..00000000 --- a/ci_phpstan.neon +++ /dev/null @@ -1,6 +0,0 @@ -parameters: - autoload_directories: - - %currentWorkingDirectory%/src - - ignoreErrors: - - '#Parameter \$result of method Cache\\Prefixed\\Tests\\PrefixedSimpleCacheTest::getCacheStub\(\) has invalid typehint type Cache\\Prefixed\\Tests\\type#' diff --git a/composer.json b/composer.json index d34edb6d..858c316f 100644 --- a/composer.json +++ b/composer.json @@ -1,13 +1,12 @@ { "name": "cache/cache", - "type": "library", "description": "Library of all the php-cache adapters", + "license": "MIT", + "type": "library", "keywords": [ "cache", "psr6" ], - "homepage": "http://www.php-cache.com/en/latest/", - "license": "MIT", "authors": [ { "name": "Aaron Scherer", @@ -20,61 +19,85 @@ "homepage": "https://github.com/nyholm" } ], + "homepage": "http://www.php-cache.com/en/latest/", "require": { - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", - "psr/log": "^1.0", + "php": ">=7.4", "doctrine/cache": "^1.3", - "psr/simple-cache": "^1.0", - "league/flysystem": "^1.0" + "league/flysystem": "^1.0", + "psr/cache": "^1.0 || ^2.0", + "psr/log": "^1.0 || ^2.0 || ^3.0", + "psr/simple-cache": "^1.0" }, "require-dev": { + "cache/integration-tests": "^0.17", "defuse/php-encryption": "^2.0", - "phpunit/phpunit": "^5.7.21", + "illuminate/cache": "^5.4 || ^5.5 || ^5.6", "mockery/mockery": "^1.0", - "cache/integration-tests": "^0.16", + "phpunit/phpunit": "^7.5.20 || ^9.5.10", "predis/predis": "^1.1", "symfony/cache": "^3.1", - "symfony/polyfill-php70": "^1.6", - "illuminate/cache": "^5.4 || ^5.5 || ^5.6" + "symfony/polyfill-php70": "^1.6" + }, + "replace": { + "cache/adapter-common": "^1", + "cache/apc-adapter": "^1", + "cache/apcu-adapter": "^1", + "cache/array-adapter": "^1", + "cache/chain-adapter": "^1", + "cache/doctrine-adapter": "^1", + "cache/filesystem-adapter": "^1", + "cache/hierarchical-cache": "^1", + "cache/illuminate-adapter": "^1", + "cache/memcache-adapter": "^1", + "cache/memcached-adapter": "^1", + "cache/mongodb-adapter": "^1", + "cache/predis-adapter": "^1", + "cache/psr-6-doctrine-bridge": "^1", + "cache/redis-adapter": "^1", + "cache/session-handler": "^1", + "cache/taggable-cache": "^1", + "cache/util": "^1", + "cache/void-adapter": "^1" + }, + "conflict": { + "cache/adapter-common": "<1", + "cache/apc-adapter": "<1", + "cache/apcu-adapter": "<1", + "cache/array-adapter": "<1", + "cache/chain-adapter": "<1", + "cache/doctrine-adapter": "<1", + "cache/filesystem-adapter": "<1", + "cache/hierarchical-cache": "<1", + "cache/illuminate-adapter": "<1", + "cache/memcache-adapter": "<1", + "cache/memcached-adapter": "<1", + "cache/mongodb-adapter": "<1", + "cache/predis-adapter": "<1", + "cache/psr-6-doctrine-bridge": "<1", + "cache/redis-adapter": "<1", + "cache/session-handler": "<1", + "cache/taggable-cache": "<1", + "cache/util": "<1", + "cache/void-adapter": "<1" }, "suggest": { "ext-apc": "APC extension is required to use the APC Adapter", "ext-apcu": "APCu extension is required to use the APCu Adapter", "ext-memcache": "Memcache extension is required to use the Memcache Adapter", "ext-memcached": "Memcached extension is required to use the Memcached Adapter", - "ext-redis": "Redis extension is required to use the Redis adapter", "ext-mongodb": "Mongodb extension required to use the Mongodb adapter", + "ext-redis": "Redis extension is required to use the Redis adapter", "mongodb/mongodb": "Mongodb lib required to use the Mongodb adapter" }, - "conflict": { - "cache/apc-adapter": "*", - "cache/apcu-adapter": "*", - "cache/chain-adapter": "*", - "cache/adapter-common": "*", - "cache/doctrine-adapter": "*", - "cache/filesystem-adapter": "*", - "cache/memcache-adapter": "*", - "cache/memcached-adapter": "*", - "cache/mongodb-adapter": "*", - "cache/array-adapter": "*", - "cache/predis-adapter": "*", - "cache/redis-adapter": "*", - "cache/void-adapter": "*", - "cache/psr-6-doctrine-bridge": "*", - "cache/hierarchical-cache": "*", - "cache/session-handler": "*", - "cache/taggable-cache": "*", - "cache/illuminate-adapter": "*", - "cache/util": "*" - }, "minimum-stability": "dev", "prefer-stable": true, "autoload": { "psr-4": { "Cache\\": "src/" }, - "files": ["src/inc.php"], + "files": [ + "src/inc.php" + ], "exclude-from-classmap": [ "**/Tests/" ] diff --git a/local_phpstan.neon b/local_phpstan.neon deleted file mode 100644 index 99889e06..00000000 --- a/local_phpstan.neon +++ /dev/null @@ -1,14 +0,0 @@ -includes: - - phpstan.neon - -parameters: - ignoreErrors: - # External Instances and functions - - '#Memcache#' - # Regex for all found redis classes - - '#Redis#' - # Regex for all found mongodb classes - - '#MongoDB#' - - '#Function igbinary_serialize not found#' - - '#Function apc_#' - - '#Function apcu_#' diff --git a/norm.sh b/norm.sh new file mode 100755 index 00000000..acc4b63d --- /dev/null +++ b/norm.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +CURRENT_DIR=$(pwd) +ok=0 +for PACKAGE in $(find src -maxdepth 4 -type f -name phpunit.xml.dist -exec dirname {} \; | sort) +do + echo ::group::$PACKAGE + echo "$CURRENT_DIR/$PACKAGE" + cd "$CURRENT_DIR/$PACKAGE" + + localExit=0 + composer update --no-interaction --prefer-dist --optimize-autoloader $COMPOSER_OPTIONS || localExit=1 + ok=$(( $localExit || $ok )) + echo ::endgroup:: + if [ $localExit -ne 0 ]; then + echo "::error::$PACKAGE error" + fi + composer normalize +done diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon new file mode 100644 index 00000000..f383c9bd --- /dev/null +++ b/phpstan-baseline.neon @@ -0,0 +1,232 @@ +parameters: + ignoreErrors: + - + message: "#^Call to an undefined method Psr\\\\Cache\\\\CacheItemPoolInterface\\:\\:invalidateTags\\(\\)\\.$#" + count: 1 + path: src/Adapter/Chain/CachePoolChain.php + + - + message: "#^Method Cache\\\\Adapter\\\\Common\\\\AbstractCachePool\\:\\:hasItem\\(\\) should return bool but return statement is missing\\.$#" + count: 1 + path: src/Adapter/Common/AbstractCachePool.php + + - + message: "#^Method Cache\\\\Adapter\\\\Common\\\\AbstractCachePool\\:\\:clear\\(\\) should return bool but return statement is missing\\.$#" + count: 1 + path: src/Adapter/Common/AbstractCachePool.php + + - + message: "#^Method Cache\\\\Adapter\\\\Common\\\\AbstractCachePool\\:\\:deleteItem\\(\\) should return bool but return statement is missing\\.$#" + count: 1 + path: src/Adapter/Common/AbstractCachePool.php + + - + message: "#^Parameter \\#1 \\$item of method Cache\\\\Adapter\\\\Common\\\\AbstractCachePool\\:\\:removeTagEntries\\(\\) expects Cache\\\\Adapter\\\\Common\\\\PhpCacheItem, Psr\\\\Cache\\\\CacheItemInterface given\\.$#" + count: 1 + path: src/Adapter/Common/AbstractCachePool.php + + - + message: "#^Parameter \\#1 \\$item of method Cache\\\\Adapter\\\\Common\\\\AbstractCachePool\\:\\:saveTags\\(\\) expects Cache\\\\Adapter\\\\Common\\\\PhpCacheItem, Psr\\\\Cache\\\\CacheItemInterface given\\.$#" + count: 1 + path: src/Adapter/Common/AbstractCachePool.php + + - + message: "#^Call to an undefined method Psr\\\\Cache\\\\CacheItemInterface\\:\\:getExpirationTimestamp\\(\\)\\.$#" + count: 1 + path: src/Adapter/Common/AbstractCachePool.php + + - + message: "#^Method Cache\\\\Adapter\\\\Common\\\\AbstractCachePool\\:\\:save\\(\\) should return bool but return statement is missing\\.$#" + count: 1 + path: src/Adapter/Common/AbstractCachePool.php + + - + message: "#^Parameter \\#1 \\$item of method Cache\\\\Adapter\\\\Common\\\\AbstractCachePool\\:\\:storeItemInCache\\(\\) expects Cache\\\\Adapter\\\\Common\\\\PhpCacheItem, Psr\\\\Cache\\\\CacheItemInterface given\\.$#" + count: 1 + path: src/Adapter/Common/AbstractCachePool.php + + - + message: "#^PHPDoc tag @param has invalid value \\(\\$default\\)\\: Unexpected token \"\\$default\", expected type at offset 18$#" + count: 1 + path: src/Adapter/Common/AbstractCachePool.php + + - + message: "#^PHPDoc tag @param has invalid value \\(\\$items\\)\\: Unexpected token \"\\$items\", expected type at offset 41$#" + count: 1 + path: src/Adapter/Common/AbstractCachePool.php + + - + message: "#^Call to function is_int\\(\\) with null will always evaluate to false\\.$#" + count: 1 + path: src/Adapter/Common/CacheItem.php + + - + message: "#^Result of \\|\\| is always true\\.$#" + count: 1 + path: src/Adapter/Common/CacheItem.php + + - + message: "#^Else branch is unreachable because ternary operator condition is always true\\.$#" + count: 1 + path: src/Adapter/Common/CacheItem.php + + - + message: "#^Method Cache\\\\Adapter\\\\Filesystem\\\\FilesystemCachePool\\:\\:removeList\\(\\) should return bool but return statement is missing\\.$#" + count: 1 + path: src/Adapter/Filesystem/FilesystemCachePool.php + + - + message: "#^PHPDoc tag @param has invalid value \\(\\$key\\)\\: Unexpected token \"\\$key\", expected type at offset 18$#" + count: 1 + path: src/Adapter/Filesystem/FilesystemCachePool.php + + - + message: "#^Parameter \\$collection of method Cache\\\\Adapter\\\\MongoDB\\\\MongoDBCachePool\\:\\:__construct\\(\\) has invalid typehint type MongoDB\\\\Collection\\.$#" + count: 2 + path: src/Adapter/MongoDB/MongoDBCachePool.php + + - + message: "#^Return typehint of method Cache\\\\Adapter\\\\MongoDB\\\\MongoDBCachePool\\:\\:createCollection\\(\\) has invalid type MongoDB\\\\Collection\\.$#" + count: 1 + path: src/Adapter/MongoDB/MongoDBCachePool.php + + - + message: "#^Instantiated class MongoDB\\\\Collection not found\\.$#" + count: 1 + path: src/Adapter/MongoDB/MongoDBCachePool.php + + - + message: "#^Call to method createIndex\\(\\) on an unknown class MongoDB\\\\Collection\\.$#" + count: 1 + path: src/Adapter/MongoDB/MongoDBCachePool.php + + - + message: "#^Access to an undefined property object\\:\\:\\$tags\\.$#" + count: 1 + path: src/Adapter/MongoDB/MongoDBCachePool.php + + - + message: "#^Access to an undefined property object\\:\\:\\$expirationTimestamp\\.$#" + count: 1 + path: src/Adapter/MongoDB/MongoDBCachePool.php + + - + message: "#^Negated boolean expression is always false\\.$#" + count: 1 + path: src/Adapter/PHPArray/ArrayCachePool.php + + - + message: "#^Result of && is always false\\.$#" + count: 2 + path: src/Adapter/PHPArray/ArrayCachePool.php + + - + message: "#^Result of && is always false\\.$#" + count: 1 + path: src/Adapter/Redis/RedisCachePool.php + + - + message: "#^PHPDoc tag @param has invalid value \\(string &\\$pathKey A cache key for the path\\. If this key is changed everything beyond that path is changed\\.\\)\\: Unexpected token \"&\", expected variable at offset 287$#" + count: 1 + path: src/Adapter/Redis/RedisCachePool.php + + - + message: "#^Method Cache\\\\Bridge\\\\Doctrine\\\\DoctrineCacheBridge\\:\\:doGetStats\\(\\) should return array\\|null but return statement is missing\\.$#" + count: 1 + path: src/Bridge/Doctrine/DoctrineCacheBridge.php + + - + message: "#^PHPDoc tag @param has invalid value \\(\\$default\\)\\: Unexpected token \"\\$default\", expected type at offset 18$#" + count: 1 + path: src/Bridge/SimpleCache/SimpleCacheBridge.php + + - + message: "#^PHPDoc tag @param has invalid value \\(\\$items\\)\\: Unexpected token \"\\$items\", expected type at offset 41$#" + count: 1 + path: src/Bridge/SimpleCache/SimpleCacheBridge.php + + - + message: "#^Parameter \\#1 \\$cacheItem of class Cache\\\\Encryption\\\\EncryptedItemDecorator constructor expects Cache\\\\TagInterop\\\\TaggableCacheItemInterface, Psr\\\\Cache\\\\CacheItemInterface given\\.$#" + count: 1 + path: src/Encryption/EncryptedCachePool.php + + - + message: "#^PHPDoc tag @param has invalid value \\(string &\\$pathKey A cache key for the path\\. If this key is changed everything beyond that path is changed\\.\\)\\: Unexpected token \"&\", expected variable at offset 287$#" + count: 1 + path: src/Adapter/Illuminate/IlluminateCachePool.php + + - + message: "#^PHPDoc tag @param has invalid value \\(string &\\$pathKey A cache key for the path\\. If this key is changed everything beyond that path is changed\\.\\)\\: Unexpected token \"&\", expected variable at offset 287$#" + count: 1 + path: src/Adapter/Memcached/MemcachedCachePool.php + + - + message: "#^PHPDoc tag @param has invalid value \\(string &\\$pathKey A cache key for the path\\. If this key is changed everything beyond that path is changed\\.\\)\\: Unexpected token \"&\", expected variable at offset 287$#" + count: 1 + path: src/Adapter/Predis/PredisCachePool.php + + - + message: "#^PHPDoc tag @param references unknown parameter\\: \\$keys$#" + count: 1 + path: src/Namespaced/NamespacedCachePool.php + + - + message: "#^PHPDoc tag @param references unknown parameter\\: \\$keys$#" + count: 1 + path: src/Prefixed/PrefixedCachePool.php + + - + message: "#^PHPDoc tag @param references unknown parameter\\: \\$keys$#" + count: 1 + path: src/Prefixed/PrefixedSimpleCache.php + + - + message: "#^Parameter \\#2 \\$time of static method DateTime\\:\\:createFromFormat\\(\\) expects string, \\(float\\|int\\) given\\.$#" + count: 1 + path: src/SessionHandler/Psr16SessionHandler.php + + - + message: "#^PHPDoc tag @throws with type Psr\\\\SimpleCache\\\\InvalidArgumentException is not subtype of Throwable$#" + count: 1 + path: src/SessionHandler/Psr16SessionHandler.php + + - + message: "#^Parameter \\#2 \\$time of static method DateTime\\:\\:createFromFormat\\(\\) expects string, \\(float\\|int\\) given\\.$#" + count: 1 + path: src/SessionHandler/Psr6SessionHandler.php + + - + message: "#^PHPDoc tag @throws with type Psr\\\\Cache\\\\InvalidArgumentException is not subtype of Throwable$#" + count: 4 + path: src/SessionHandler/Psr6SessionHandler.php + + - + message: "#^PHPDoc tag @throws with type Psr\\\\Cache\\\\InvalidArgumentException is not subtype of Throwable$#" + count: 1 + path: src/TagInterop/TaggableCacheItemInterface.php + + - + message: "#^PHPDoc tag @throws with type Psr\\\\Cache\\\\InvalidArgumentException is not subtype of Throwable$#" + count: 2 + path: src/TagInterop/TaggableCacheItemPoolInterface.php + + - + message: "#^Parameter \\#1 \\$item of method Cache\\\\Taggable\\\\TaggablePSR6PoolAdapter\\:\\:removeTagEntries\\(\\) expects Cache\\\\TagInterop\\\\TaggableCacheItemInterface, Psr\\\\Cache\\\\CacheItemInterface given\\.$#" + count: 1 + path: src/Taggable/TaggablePSR6PoolAdapter.php + + - + message: "#^Parameter \\#1 \\$item of method Cache\\\\Taggable\\\\TaggablePSR6PoolAdapter\\:\\:saveTags\\(\\) expects Cache\\\\Taggable\\\\TaggablePSR6ItemAdapter, Psr\\\\Cache\\\\CacheItemInterface given\\.$#" + count: 2 + path: src/Taggable/TaggablePSR6PoolAdapter.php + + - + message: "#^Call to an undefined method Psr\\\\Cache\\\\CacheItemInterface\\:\\:unwrap\\(\\)\\.$#" + count: 2 + path: src/Taggable/TaggablePSR6PoolAdapter.php + + - + message: "#^Method Cache\\\\Taggable\\\\TaggablePSR6PoolAdapter\\:\\:commit\\(\\) should return bool but return statement is missing\\.$#" + count: 1 + path: src/Taggable/TaggablePSR6PoolAdapter.php + diff --git a/phpstan.neon.dist b/phpstan.neon.dist new file mode 100644 index 00000000..81a9a4ba --- /dev/null +++ b/phpstan.neon.dist @@ -0,0 +1,11 @@ +includes: + - ./phpstan-baseline.neon + +parameters: + level: 5 + paths: + - src + + excludes_analyse: + - src/*/Tests/* + - src/**/Tests/* diff --git a/phpunit.xml.dist b/phpunit.xml.dist index f7f6c998..1f0230d4 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,37 +1,14 @@ - - + ./src/*/Tests ./src/*/*/Tests - - - - - ./ - - ./src/*/Tests - ./src/*/*/Tests - ./vendor - - - diff --git a/psalm.baseline.xml b/psalm.baseline.xml new file mode 100644 index 00000000..bd9a61da --- /dev/null +++ b/psalm.baseline.xml @@ -0,0 +1,53 @@ + + + + + $this->cache + $this->cache + $this->cache + $this->cache + $this->cache + $this->cache + Memcache + + + + + $this->collection + $this->collection + $this->collection + $this->collection + $this->collection + $this->collection + Collection + Manager + + + Collection + + + + + \Psr\SimpleCache\InvalidArgumentException + + + + + \Psr\Cache\InvalidArgumentException + \Psr\Cache\InvalidArgumentException + \Psr\Cache\InvalidArgumentException + \Psr\Cache\InvalidArgumentException + + + + + InvalidArgumentException + + + + + InvalidArgumentException + InvalidArgumentException + + + diff --git a/psalm.xml b/psalm.xml new file mode 100644 index 00000000..955e1c74 --- /dev/null +++ b/psalm.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/Adapter/Apc/.travis.yml b/src/Adapter/Apc/.travis.yml deleted file mode 100644 index 062df1a3..00000000 --- a/src/Adapter/Apc/.travis.yml +++ /dev/null @@ -1,37 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 7.0 - -cache: - directories: - - "$HOME/.composer/cache" - -before_install: - - mkdir -p ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d - - PHP_INI_FILE=`php -r "echo php_ini_loaded_file();"` - - | - echo "apc.enabled=1 - apc.enable_cli=1 - apc.use_request_time=0 - " > ./apc.ini - - phpenv config-add ./apc.ini - - yes '' | pecl install -f apcu - - yes '' | pecl install -f apcu_bc-beta - - sed -i '1d' ${PHP_INI_FILE} - - echo "extension=apc.so" > ./apcu_bc.ini - - phpenv config-add ./apcu_bc.ini - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/src/Adapter/Apc/Changelog.md b/src/Adapter/Apc/Changelog.md index 621102b0..684ce9d5 100644 --- a/src/Adapter/Apc/Changelog.md +++ b/src/Adapter/Apc/Changelog.md @@ -1,9 +1,21 @@ # Change Log -The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. +The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. ## UNRELEASED +## 1.2.0 + +* Support for PHP 8.1 +* Drop support for PHP < 7.4 +* Allow psr/cache: ^1.0 || ^2.0 + +## 1.1.0 + +### Added + +* Support for PHP 8 + ## 1.0.0 * No changes since 0.4.0 @@ -12,12 +24,12 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee ### Added -* Support for the new `TaggableCacheItemPoolInterface`. +* Support for the new `TaggableCacheItemPoolInterface`. * Support for PSR-16 SimpleCache ### Changed -* The behavior of `CacheItem::getTags()` has changed. It will not return the tags stored in the cache storage. +* The behavior of `CacheItem::getTags()` has changed. It will not return the tags stored in the cache storage. ### Removed diff --git a/src/Adapter/Apc/composer.json b/src/Adapter/Apc/composer.json index 0ec48978..c30dd6c4 100644 --- a/src/Adapter/Apc/composer.json +++ b/src/Adapter/Apc/composer.json @@ -1,16 +1,13 @@ { "name": "cache/apc-adapter", "description": "A PSR-6 cache implementation using apc. This implementation supports tags", - "type": "library", "license": "MIT", - "minimum-stability": "dev", - "prefer-stable": true, + "type": "library", "keywords": [ "cache", "psr-6", "apc" ], - "homepage": "http://www.php-cache.com/en/latest/", "authors": [ { "name": "Aaron Scherer", @@ -23,23 +20,26 @@ "homepage": "https://github.com/nyholm" } ], + "homepage": "http://www.php-cache.com/en/latest/", "require": { - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", - "psr/simple-cache": "^1.0", - "cache/adapter-common": "^1.0" - }, - "suggest": { - "ext-apc": "The extension required to use this pool." + "php": ">=7.4", + "cache/adapter-common": "^1.0", + "psr/cache": "^1.0 || ^2.0", + "psr/simple-cache": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.21", - "cache/integration-tests": "^0.16" + "cache/integration-tests": "^0.17", + "phpunit/phpunit": "^7.5.20 || ^9.5.10" }, "provide": { "psr/cache-implementation": "^1.0", "psr/simple-cache-implementation": "^1.0" }, + "suggest": { + "ext-apc": "The extension required to use this pool." + }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Cache\\Adapter\\Apc\\": "" diff --git a/src/Adapter/Apc/phpunit.xml.dist b/src/Adapter/Apc/phpunit.xml.dist index 61b3e0f8..3c863522 100644 --- a/src/Adapter/Apc/phpunit.xml.dist +++ b/src/Adapter/Apc/phpunit.xml.dist @@ -1,35 +1,13 @@ - - + ./Tests/ - benchmark - - - - ./ - - ./Tests - ./vendor - - - diff --git a/src/Adapter/Apcu/.travis.yml b/src/Adapter/Apcu/.travis.yml deleted file mode 100644 index 09f59e5c..00000000 --- a/src/Adapter/Apcu/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 7.0 - -cache: - directories: - - "$HOME/.composer/cache" - -before_install: - - mkdir -p ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d - - | - echo "apc.enabled=1 - apc.enable_cli=1 - apc.use_request_time=0 - " > ./apc.ini - - phpenv config-add ./apc.ini - - yes '' | pecl install -f apcu-5.1.8 - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/src/Adapter/Apcu/ApcuCachePool.php b/src/Adapter/Apcu/ApcuCachePool.php index de11f580..157addf9 100644 --- a/src/Adapter/Apcu/ApcuCachePool.php +++ b/src/Adapter/Apcu/ApcuCachePool.php @@ -85,6 +85,10 @@ protected function storeItemInCache(PhpCacheItem $item, $ttl) return false; } + if ($ttl === null) { + $ttl = 0; + } + return apcu_store($item->getKey(), serialize([$item->get(), $item->getTags(), $item->getExpirationTimestamp()]), $ttl); } diff --git a/src/Adapter/Apcu/Changelog.md b/src/Adapter/Apcu/Changelog.md index 1db2467c..22b0069d 100644 --- a/src/Adapter/Apcu/Changelog.md +++ b/src/Adapter/Apcu/Changelog.md @@ -1,9 +1,21 @@ # Change Log -The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. +The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. ## UNRELEASED +## 1.2.0 + +* Support for PHP 8.1 +* Drop support for PHP < 7.4 +* Allow psr/cache: ^1.0 || ^2.0 + +## 1.1.0 + +### Added + +* Support for PHP 8 + ## 1.0.0 * No changes since 0.3.0 @@ -12,12 +24,12 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee ### Added -* Support for the new `TaggableCacheItemPoolInterface`. +* Support for the new `TaggableCacheItemPoolInterface`. * Support for PSR-16 SimpleCache ### Changed -* The behavior of `CacheItem::getTags()` has changed. It will not return the tags stored in the cache storage. +* The behavior of `CacheItem::getTags()` has changed. It will not return the tags stored in the cache storage. ### Removed diff --git a/src/Adapter/Apcu/Tests/IntegrationPoolTest.php b/src/Adapter/Apcu/Tests/IntegrationPoolTest.php index ded34409..7933726d 100644 --- a/src/Adapter/Apcu/Tests/IntegrationPoolTest.php +++ b/src/Adapter/Apcu/Tests/IntegrationPoolTest.php @@ -24,7 +24,7 @@ class IntegrationPoolTest extends BaseTest public function createCachePool() { - if (defined('HHVM_VERSION') || !function_exists('apcu_store')) { + if (defined('HHVM_VERSION') || !function_exists('apcu_store') || (function_exists('apcu_enabled') && !apcu_enabled())) { $this->markTestSkipped(); } diff --git a/src/Adapter/Apcu/Tests/IntegrationSimpleCachelTest.php b/src/Adapter/Apcu/Tests/IntegrationSimpleCachelTest.php index 8da563be..8c9c64c8 100644 --- a/src/Adapter/Apcu/Tests/IntegrationSimpleCachelTest.php +++ b/src/Adapter/Apcu/Tests/IntegrationSimpleCachelTest.php @@ -18,7 +18,7 @@ class IntegrationSimpleCachelTest extends BaseTest { public function createSimpleCache() { - if (defined('HHVM_VERSION') || !function_exists('apcu_store')) { + if (defined('HHVM_VERSION') || !function_exists('apcu_store') || (function_exists('apcu_enabled') && !apcu_enabled())) { $this->markTestSkipped(); } diff --git a/src/Adapter/Apcu/Tests/IntegrationTagTest.php b/src/Adapter/Apcu/Tests/IntegrationTagTest.php index d8acb789..bb481d06 100644 --- a/src/Adapter/Apcu/Tests/IntegrationTagTest.php +++ b/src/Adapter/Apcu/Tests/IntegrationTagTest.php @@ -18,7 +18,7 @@ class IntegrationTagTest extends TaggableCachePoolTest { public function createCachePool() { - if (defined('HHVM_VERSION') || !function_exists('apcu_store')) { + if (defined('HHVM_VERSION') || !function_exists('apcu_store') || (function_exists('apcu_enabled') && !apcu_enabled())) { $this->markTestSkipped(); } diff --git a/src/Adapter/Apcu/composer.json b/src/Adapter/Apcu/composer.json index 04483abf..c5a0d1c2 100644 --- a/src/Adapter/Apcu/composer.json +++ b/src/Adapter/Apcu/composer.json @@ -1,16 +1,13 @@ { "name": "cache/apcu-adapter", "description": "A PSR-6 cache implementation using apcu. This implementation supports tags", - "type": "library", "license": "MIT", - "minimum-stability": "dev", - "prefer-stable": true, + "type": "library", "keywords": [ "cache", "psr-6", "apcu" ], - "homepage": "http://www.php-cache.com/en/latest/", "authors": [ { "name": "Aaron Scherer", @@ -23,23 +20,26 @@ "homepage": "https://github.com/nyholm" } ], + "homepage": "http://www.php-cache.com/en/latest/", "require": { - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", - "psr/simple-cache": "^1.0", - "cache/adapter-common": "^1.0" + "php": ">=7.4", + "cache/adapter-common": "^1.0", + "psr/cache": "^1.0 || ^2.0", + "psr/simple-cache": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.21", - "cache/integration-tests": "^0.16" - }, - "suggest": { - "ext-apcu": "The extension required to use this pool." + "cache/integration-tests": "^0.17", + "phpunit/phpunit": "^7.5.20 || ^9.5.10" }, "provide": { "psr/cache-implementation": "^1.0", "psr/simple-cache-implementation": "^1.0" }, + "suggest": { + "ext-apcu": "The extension required to use this pool." + }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Cache\\Adapter\\Apcu\\": "" diff --git a/src/Adapter/Apcu/phpunit.xml.dist b/src/Adapter/Apcu/phpunit.xml.dist index 61b3e0f8..3c863522 100644 --- a/src/Adapter/Apcu/phpunit.xml.dist +++ b/src/Adapter/Apcu/phpunit.xml.dist @@ -1,35 +1,13 @@ - - + ./Tests/ - benchmark - - - - ./ - - ./Tests - ./vendor - - - diff --git a/src/Adapter/Chain/.travis.yml b/src/Adapter/Chain/.travis.yml deleted file mode 100644 index cd914e84..00000000 --- a/src/Adapter/Chain/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 7.0 - -services: - - redis - -cache: - directories: - - "$HOME/.composer/cache" - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/src/Adapter/Chain/CachePoolChain.php b/src/Adapter/Chain/CachePoolChain.php index 2d18db12..89f97bf2 100644 --- a/src/Adapter/Chain/CachePoolChain.php +++ b/src/Adapter/Chain/CachePoolChain.php @@ -297,7 +297,7 @@ public function invalidateTags(array $tags) /** * @param LoggerInterface $logger */ - public function setLogger(LoggerInterface $logger) + public function setLogger(LoggerInterface $logger): void { $this->logger = $logger; } @@ -343,8 +343,11 @@ private function handleException($poolKey, $operation, CachePoolException $excep $this->log( 'warning', - sprintf('Removing pool "%s" from chain because it threw an exception when executing "%s"', $poolKey, - $operation), + sprintf( + 'Removing pool "%s" from chain because it threw an exception when executing "%s"', + $poolKey, + $operation + ), ['exception' => $exception] ); diff --git a/src/Adapter/Chain/Changelog.md b/src/Adapter/Chain/Changelog.md index d51295c8..00128062 100644 --- a/src/Adapter/Chain/Changelog.md +++ b/src/Adapter/Chain/Changelog.md @@ -1,9 +1,21 @@ # Change Log -The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. +The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. ## UNRELEASED +## 1.2.0 + +* Support for PHP 8.1 +* Drop support for PHP < 7.4 +* Allow psr/cache: ^1.0 || ^2.0 + +## 1.1.0 + +### Added + +* Support for PHP 8 + ## 1.0.0 ### Added @@ -25,13 +37,13 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee ### Added -* Support for the new `TaggableCacheItemPoolInterface`. +* Support for the new `TaggableCacheItemPoolInterface`. ## 0.4.0 ### Changed -* `CachePoolChain::getPools` is protected instead of public +* `CachePoolChain::getPools` is protected instead of public ## 0.3.1 diff --git a/src/Adapter/Chain/Tests/IntegrationPoolTest.php b/src/Adapter/Chain/Tests/IntegrationPoolTest.php index 92120db2..34ab8168 100644 --- a/src/Adapter/Chain/Tests/IntegrationPoolTest.php +++ b/src/Adapter/Chain/Tests/IntegrationPoolTest.php @@ -18,6 +18,10 @@ class IntegrationPoolTest extends CachePoolTest { use CreatePoolTrait; + protected $skippedTests = [ + 'testBasicUsageWithLongKey' => 'Long keys are not supported.', + ]; + public function createCachePool() { return new CachePoolChain($this->getAdapters()); diff --git a/src/Adapter/Chain/composer.json b/src/Adapter/Chain/composer.json index ae68c978..a0eb25a0 100644 --- a/src/Adapter/Chain/composer.json +++ b/src/Adapter/Chain/composer.json @@ -1,17 +1,14 @@ { "name": "cache/chain-adapter", "description": "A PSR-6 cache implementation using chain. This implementation supports tags", - "type": "library", "license": "MIT", - "minimum-stability": "dev", - "prefer-stable": true, + "type": "library", "keywords": [ "cache", "psr-6", "chain", "tag" ], - "homepage": "http://www.php-cache.com/en/latest/", "authors": [ { "name": "Aaron Scherer", @@ -24,22 +21,25 @@ "homepage": "https://github.com/nyholm" } ], + "homepage": "http://www.php-cache.com/en/latest/", "require": { - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", - "psr/log": "^1.0", + "php": ">=7.4", "cache/adapter-common": "^1.0", - "cache/tag-interop": "^1.0" + "cache/tag-interop": "^1.0", + "psr/cache": "^1.0 || ^2.0", + "psr/log": "^1.0 || ^2.0 || ^3.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.21", - "cache/filesystem-adapter": "^1.0", "cache/array-adapter": "^1.0", - "cache/integration-tests": "^0.16" + "cache/filesystem-adapter": "^1.0", + "cache/integration-tests": "^0.17", + "phpunit/phpunit": "^7.5.20 || ^9.5.10" }, "provide": { "psr/cache-implementation": "^1.0" }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Cache\\Adapter\\Chain\\": "" diff --git a/src/Adapter/Chain/phpunit.xml.dist b/src/Adapter/Chain/phpunit.xml.dist index 61b3e0f8..3c863522 100644 --- a/src/Adapter/Chain/phpunit.xml.dist +++ b/src/Adapter/Chain/phpunit.xml.dist @@ -1,35 +1,13 @@ - - + ./Tests/ - benchmark - - - - ./ - - ./Tests - ./vendor - - - diff --git a/src/Adapter/Common/.travis.yml b/src/Adapter/Common/.travis.yml deleted file mode 100644 index 942fe27e..00000000 --- a/src/Adapter/Common/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 7.0 - -cache: - directories: - - "$HOME/.composer/cache" - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/src/Adapter/Common/AbstractCachePool.php b/src/Adapter/Common/AbstractCachePool.php index e8494af3..de7d2bc7 100644 --- a/src/Adapter/Common/AbstractCachePool.php +++ b/src/Adapter/Common/AbstractCachePool.php @@ -278,7 +278,8 @@ protected function validateKey($key) { if (!is_string($key)) { $e = new InvalidArgumentException(sprintf( - 'Cache key must be string, "%s" given', gettype($key) + 'Cache key must be string, "%s" given', + gettype($key) )); $this->handleException($e, __FUNCTION__); } @@ -298,7 +299,7 @@ protected function validateKey($key) /** * @param LoggerInterface $logger */ - public function setLogger(LoggerInterface $logger) + public function setLogger(LoggerInterface $logger): void { $this->logger = $logger; } diff --git a/src/Adapter/Common/Changelog.md b/src/Adapter/Common/Changelog.md index 4c87198f..5a821888 100644 --- a/src/Adapter/Common/Changelog.md +++ b/src/Adapter/Common/Changelog.md @@ -1,10 +1,22 @@ # Change Log -The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. +The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. + +## 1.3.0 + +* Support for PHP 8.1 +* Drop support for PHP < 7.4 +* Allow psr/cache: ^1.0 || ^2.0 + +## 1.2.0 + +### Added + +* Support for PHP 8 ## 1.1.0 -### Added +### Added - Support for storing binary data @@ -14,7 +26,7 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee ### Changed -- Tests are now extending `PHPUnit\Framework\TestCase` +- Tests are now extending `PHPUnit\Framework\TestCase` ## 1.0.0 @@ -25,16 +37,16 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee ### Added * `AbstractCachePool` has 4 new abstract methods: `getList`, `removeList`, `appendListItem` and `removeListItem`. -* `AbstractCachePool::invalidateTags` and `AbstractCachePool::invalidateTags` +* `AbstractCachePool::invalidateTags` and `AbstractCachePool::invalidateTags` * Added interfaces for our items and pools `PhpCachePool` and `PhpCacheItem` * Trait to help adapters to support tags. `TagSupportWithArray`. ### Changed -* First parameter to `AbstractCachePool::storeItemInCache` must be a `PhpCacheItem`. -* Return value from `AbstractCachePool::fetchObjectFromCache` must be a an array with 4 values. Added expiration timestamp. +* First parameter to `AbstractCachePool::storeItemInCache` must be a `PhpCacheItem`. +* Return value from `AbstractCachePool::fetchObjectFromCache` must be a an array with 4 values. Added expiration timestamp. * `HasExpirationDateInterface` is replaced by `HasExpirationTimestampInterface` -* We do not work with `\DateTime` internally anymore. We work with timestamps. +* We do not work with `\DateTime` internally anymore. We work with timestamps. ## 0.3.3 @@ -55,7 +67,7 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee * The `AbstractCachePool` does not longer implement `TaggablePoolInterface`. However, the `CacheItem` does still implement `TaggableItemInterface`. * `CacheItem::getKeyFromTaggedKey` has been removed * The `CacheItem`'s second parameter is a callable that must return an array with 3 elements; [`hasValue`, `value`, `tags`]. - + ## 0.2.0 - + * No changelog before this version diff --git a/src/Adapter/Common/composer.json b/src/Adapter/Common/composer.json index be69af00..c773462d 100644 --- a/src/Adapter/Common/composer.json +++ b/src/Adapter/Common/composer.json @@ -1,16 +1,13 @@ { "name": "cache/adapter-common", "description": "Common classes for PSR-6 adapters", - "type": "library", "license": "MIT", - "minimum-stability": "dev", - "prefer-stable": true, + "type": "library", "keywords": [ "cache", "psr-6", "tag" ], - "homepage": "http://www.php-cache.com/en/latest/", "authors": [ { "name": "Aaron Scherer", @@ -23,17 +20,20 @@ "homepage": "https://github.com/nyholm" } ], + "homepage": "http://www.php-cache.com/en/latest/", "require": { - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", - "psr/simple-cache": "^1.0", - "psr/log": "^1.0", - "cache/tag-interop": "^1.0" + "php": ">=7.4", + "cache/tag-interop": "^1.0", + "psr/cache": "^1.0 || ^2.0", + "psr/log": "^1.0 || ^2.0 || ^3.0", + "psr/simple-cache": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.21", - "cache/integration-tests": "^0.16" + "cache/integration-tests": "^0.17", + "phpunit/phpunit": "^7.5.20 || ^9.5.10" }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Cache\\Adapter\\Common\\": "" diff --git a/src/Adapter/Common/phpunit.xml.dist b/src/Adapter/Common/phpunit.xml.dist index 61b3e0f8..3c863522 100644 --- a/src/Adapter/Common/phpunit.xml.dist +++ b/src/Adapter/Common/phpunit.xml.dist @@ -1,35 +1,13 @@ - - + ./Tests/ - benchmark - - - - ./ - - ./Tests - ./vendor - - - diff --git a/src/Adapter/Doctrine/.travis.yml b/src/Adapter/Doctrine/.travis.yml deleted file mode 100644 index 942fe27e..00000000 --- a/src/Adapter/Doctrine/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 7.0 - -cache: - directories: - - "$HOME/.composer/cache" - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/src/Adapter/Doctrine/Changelog.md b/src/Adapter/Doctrine/Changelog.md index 29b86f27..2b688b56 100644 --- a/src/Adapter/Doctrine/Changelog.md +++ b/src/Adapter/Doctrine/Changelog.md @@ -1,9 +1,21 @@ # Change Log -The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. +The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. ## UNRELEASED +## 1.2.0 + +* Support for PHP 8.1 +* Drop support for PHP < 7.4 +* Allow psr/cache: ^1.0 || ^2.0 + +## 1.1.0 + +### Added + +* Support for PHP 8 + ## 1.0.0 * No changes since 0.6.0 @@ -12,12 +24,12 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee ### Added -* Support for the new `TaggableCacheItemPoolInterface`. +* Support for the new `TaggableCacheItemPoolInterface`. * Support for PSR-16 SimpleCache ### Changed -* The behavior of `CacheItem::getTags()` has changed. It will not return the tags stored in the cache storage. +* The behavior of `CacheItem::getTags()` has changed. It will not return the tags stored in the cache storage. ### Removed diff --git a/src/Adapter/Doctrine/Tests/DoctrineAdapterTest.php b/src/Adapter/Doctrine/Tests/DoctrineAdapterTest.php index 3e4140c2..4651811e 100644 --- a/src/Adapter/Doctrine/Tests/DoctrineAdapterTest.php +++ b/src/Adapter/Doctrine/Tests/DoctrineAdapterTest.php @@ -40,7 +40,7 @@ class DoctrineAdapterTest extends TestCase */ private $mockDoctrine; - protected function setUp() + protected function setUp(): void { $this->mockItem = m::mock(CacheItem::class); $this->mockDoctrine = m::mock(Cache::class); diff --git a/src/Adapter/Doctrine/composer.json b/src/Adapter/Doctrine/composer.json index 89031e66..6be7f5b1 100644 --- a/src/Adapter/Doctrine/composer.json +++ b/src/Adapter/Doctrine/composer.json @@ -1,17 +1,14 @@ { "name": "cache/doctrine-adapter", "description": "A PSR-6 cache implementation using Doctrine. This implementation supports tags", - "type": "library", "license": "MIT", - "minimum-stability": "dev", - "prefer-stable": true, + "type": "library", "keywords": [ "cache", "psr-6", "doctrine", "tag" ], - "homepage": "http://www.php-cache.com/en/latest/", "authors": [ { "name": "Aaron Scherer", @@ -24,17 +21,18 @@ "homepage": "https://github.com/nyholm" } ], + "homepage": "http://www.php-cache.com/en/latest/", "require": { - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", - "psr/simple-cache": "^1.0", + "php": ">=7.4", "cache/adapter-common": "^1.0", - "doctrine/cache": "^1.6" + "doctrine/cache": "^1.6", + "psr/cache": "^1.0 || ^2.0", + "psr/simple-cache": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.21", + "cache/integration-tests": "^0.17", "mockery/mockery": "^1.0", - "cache/integration-tests": "^0.16" + "phpunit/phpunit": "^7.5.20 || ^9.5.10" }, "provide": { "psr/cache-implementation": "^1.0", @@ -46,6 +44,8 @@ "ext-memcached": "Allows for caching with Memcached", "ext-redis": "Allows for caching with Redis" }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Cache\\Adapter\\Doctrine\\": "" diff --git a/src/Adapter/Doctrine/phpunit.xml.dist b/src/Adapter/Doctrine/phpunit.xml.dist index 61b3e0f8..3c863522 100644 --- a/src/Adapter/Doctrine/phpunit.xml.dist +++ b/src/Adapter/Doctrine/phpunit.xml.dist @@ -1,35 +1,13 @@ - - + ./Tests/ - benchmark - - - - ./ - - ./Tests - ./vendor - - - diff --git a/src/Adapter/Filesystem/.travis.yml b/src/Adapter/Filesystem/.travis.yml deleted file mode 100644 index 942fe27e..00000000 --- a/src/Adapter/Filesystem/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 7.0 - -cache: - directories: - - "$HOME/.composer/cache" - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/src/Adapter/Filesystem/Changelog.md b/src/Adapter/Filesystem/Changelog.md index bb4c2592..bd1f9029 100644 --- a/src/Adapter/Filesystem/Changelog.md +++ b/src/Adapter/Filesystem/Changelog.md @@ -1,14 +1,24 @@ # Change Log -The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. +The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. ## UNRELEASED +## 1.2.0 + +* Support for PHP 8.1 +* Drop support for PHP < 7.4 +* Allow psr/cache: ^1.0 || ^2.0 + ## 1.1.0 +### Added + +* Support for PHP 8 + ### Changed -* Use `League\Flysystem\FilesystemInterface` instead of concreate `League\Flysystem\Filesystem` class +* Use `League\Flysystem\FilesystemInterface` instead of concrete `League\Flysystem\Filesystem` class ## 1.0.0 @@ -18,12 +28,12 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee ### Added -* Support for the new `TaggableCacheItemPoolInterface`. +* Support for the new `TaggableCacheItemPoolInterface`. * Support for PSR-16 SimpleCache ### Changed -* The behavior of `CacheItem::getTags()` has changed. It will not return the tags stored in the cache storage. +* The behavior of `CacheItem::getTags()` has changed. It will not return the tags stored in the cache storage. ### Removed diff --git a/src/Adapter/Filesystem/Tests/FilesystemCachePoolTest.php b/src/Adapter/Filesystem/Tests/FilesystemCachePoolTest.php index fe4365db..4cadacf0 100644 --- a/src/Adapter/Filesystem/Tests/FilesystemCachePoolTest.php +++ b/src/Adapter/Filesystem/Tests/FilesystemCachePoolTest.php @@ -12,6 +12,7 @@ namespace Cache\Adapter\Filesystem\Tests; use PHPUnit\Framework\TestCase; +use Psr\Cache\InvalidArgumentException; /** * @author Tobias Nyholm @@ -20,11 +21,10 @@ class FilesystemCachePoolTest extends TestCase { use CreatePoolTrait; - /** - * @expectedException \Psr\Cache\InvalidArgumentException - */ public function testInvalidKey() { + $this->expectException(InvalidArgumentException::class); + $pool = $this->createCachePool(); $pool->getItem('test%string')->get(); diff --git a/src/Adapter/Filesystem/Tests/IntegrationPoolTest.php b/src/Adapter/Filesystem/Tests/IntegrationPoolTest.php index f2e179ff..a0c21237 100644 --- a/src/Adapter/Filesystem/Tests/IntegrationPoolTest.php +++ b/src/Adapter/Filesystem/Tests/IntegrationPoolTest.php @@ -16,4 +16,8 @@ class IntegrationPoolTest extends CachePoolTest { use CreatePoolTrait; + + protected $skippedTests = [ + 'testBasicUsageWithLongKey' => 'Long keys are not supported.', + ]; } diff --git a/src/Adapter/Filesystem/Tests/IntegrationSimpleCacheTest.php b/src/Adapter/Filesystem/Tests/IntegrationSimpleCacheTest.php index c2887f95..73070e93 100644 --- a/src/Adapter/Filesystem/Tests/IntegrationSimpleCacheTest.php +++ b/src/Adapter/Filesystem/Tests/IntegrationSimpleCacheTest.php @@ -16,4 +16,8 @@ class IntegrationSimpleCacheTest extends SimpleCacheTest { use CreatePoolTrait; + + protected $skippedTests = [ + 'testBasicUsageWithLongKey' => 'Long keys are not supported.', + ]; } diff --git a/src/Adapter/Filesystem/composer.json b/src/Adapter/Filesystem/composer.json index 37d621a2..d2f794d8 100644 --- a/src/Adapter/Filesystem/composer.json +++ b/src/Adapter/Filesystem/composer.json @@ -1,17 +1,14 @@ { "name": "cache/filesystem-adapter", "description": "A PSR-6 cache implementation using filesystem. This implementation supports tags", - "type": "library", "license": "MIT", - "minimum-stability": "dev", - "prefer-stable": true, + "type": "library", "keywords": [ "cache", "psr-6", "filesystem", "tag" ], - "homepage": "http://www.php-cache.com/en/latest/", "authors": [ { "name": "Aaron Scherer", @@ -24,21 +21,24 @@ "homepage": "https://github.com/nyholm" } ], + "homepage": "http://www.php-cache.com/en/latest/", "require": { - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", - "psr/simple-cache": "^1.0", + "php": ">=7.4", "cache/adapter-common": "^1.0", - "league/flysystem": "^1.0" + "league/flysystem": "^1.0", + "psr/cache": "^1.0 || ^2.0", + "psr/simple-cache": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.21", - "cache/integration-tests": "^0.16" + "cache/integration-tests": "^0.17", + "phpunit/phpunit": "^7.5.20 || ^9.5.10" }, "provide": { "psr/cache-implementation": "^1.0", "psr/simple-cache-implementation": "^1.0" }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Cache\\Adapter\\Filesystem\\": "" diff --git a/src/Adapter/Filesystem/phpunit.xml.dist b/src/Adapter/Filesystem/phpunit.xml.dist index 61b3e0f8..3c863522 100644 --- a/src/Adapter/Filesystem/phpunit.xml.dist +++ b/src/Adapter/Filesystem/phpunit.xml.dist @@ -1,35 +1,13 @@ - - + ./Tests/ - benchmark - - - - ./ - - ./Tests - ./vendor - - - diff --git a/src/Adapter/Illuminate/.travis.yml b/src/Adapter/Illuminate/.travis.yml deleted file mode 100644 index 942fe27e..00000000 --- a/src/Adapter/Illuminate/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 7.0 - -cache: - directories: - - "$HOME/.composer/cache" - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/src/Adapter/Illuminate/Changelog.md b/src/Adapter/Illuminate/Changelog.md index 4626c4bf..92773d70 100644 --- a/src/Adapter/Illuminate/Changelog.md +++ b/src/Adapter/Illuminate/Changelog.md @@ -1,22 +1,26 @@ # Change Log The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. -## UNRELEASED + +## 0.4.0 + +* Support for PHP 8.1 +* Drop support for PHP < 7.4 +* Allow psr/cache: ^1.0 || ^2.0 + +## 0.3.0 ### Added * Hierarchical implementation +* Support for PHP 8 -## 1.1.0 +## 0.2.0 ### Fixed * Let composer install laravel 5.4, 5.5 and 5.6 -## 1.0.0 - -* No changes since 0.1.0 - ## 0.1.0 * First version diff --git a/src/Adapter/Illuminate/Tests/IlluminateAdapterTest.php b/src/Adapter/Illuminate/Tests/IlluminateAdapterTest.php index ea8928c6..6e3e3722 100644 --- a/src/Adapter/Illuminate/Tests/IlluminateAdapterTest.php +++ b/src/Adapter/Illuminate/Tests/IlluminateAdapterTest.php @@ -36,7 +36,7 @@ class IlluminateAdapterTest extends TestCase */ private $mockStore; - protected function setUp() + protected function setUp(): void { $this->mockItem = m::mock(CacheItem::class); $this->mockStore = m::mock(Store::class); diff --git a/src/Adapter/Illuminate/Tests/IntegrationPoolTest.php b/src/Adapter/Illuminate/Tests/IntegrationPoolTest.php index f24075c7..7befa93a 100644 --- a/src/Adapter/Illuminate/Tests/IntegrationPoolTest.php +++ b/src/Adapter/Illuminate/Tests/IntegrationPoolTest.php @@ -16,4 +16,9 @@ class IntegrationPoolTest extends CachePoolTest { use CreatePoolTrait; + + protected $skippedTests = [ + 'testDeleteItem' => 'Version 5.8 does not return true when deleting non-existent item.', + 'testDeleteItems' => 'Version 5.8 does not return true when deleting non-existent item.', + ]; } diff --git a/src/Adapter/Illuminate/Tests/IntegrationSimpleCacheTest.php b/src/Adapter/Illuminate/Tests/IntegrationSimpleCacheTest.php index 3612063f..eff45dce 100644 --- a/src/Adapter/Illuminate/Tests/IntegrationSimpleCacheTest.php +++ b/src/Adapter/Illuminate/Tests/IntegrationSimpleCacheTest.php @@ -16,4 +16,10 @@ class IntegrationSimpleCacheTest extends SimpleCacheTest { use CreatePoolTrait; + + protected $skippedTests = [ + 'testDelete' => 'Version 5.8 does not return true when deleting non-existent item.', + 'testDeleteMultiple' => 'Version 5.8 does not return true when deleting non-existent item.', + 'testDeleteMultipleGenerator' => 'Version 5.8 does not return true when deleting non-existent item.', + ]; } diff --git a/src/Adapter/Illuminate/composer.json b/src/Adapter/Illuminate/composer.json index f6b7fd6a..03822e0f 100644 --- a/src/Adapter/Illuminate/composer.json +++ b/src/Adapter/Illuminate/composer.json @@ -1,10 +1,8 @@ { "name": "cache/illuminate-adapter", "description": "A PSR-6 cache implementation using Illuminate. This implementation supports tags", - "type": "library", "license": "MIT", - "minimum-stability": "dev", - "prefer-stable": true, + "type": "library", "keywords": [ "cache", "psr-6", @@ -12,7 +10,6 @@ "laravel", "tag" ], - "homepage": "http://www.php-cache.com/en/latest/", "authors": [ { "name": "Florian Voutzinos", @@ -30,23 +27,26 @@ "homepage": "https://github.com/nyholm" } ], + "homepage": "http://www.php-cache.com/en/latest/", "require": { - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", - "psr/simple-cache": "^1.0", + "php": ">=7.4", "cache/adapter-common": "^1.0", + "cache/hierarchical-cache": "^1.0", "illuminate/cache": "^5.4 || ^5.5 || ^5.6", - "cache/hierarchical-cache": "^1.0" + "psr/cache": "^1.0 || ^2.0", + "psr/simple-cache": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.21", + "cache/integration-tests": "^0.17", "mockery/mockery": "^1.0", - "cache/integration-tests": "^0.16" + "phpunit/phpunit": "^7.5.20 || ^9.5.10" }, "provide": { "psr/cache-implementation": "^1.0", "psr/simple-cache-implementation": "^1.0" }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Cache\\Adapter\\Illuminate\\": "" diff --git a/src/Adapter/Illuminate/phpunit.xml.dist b/src/Adapter/Illuminate/phpunit.xml.dist index 61b3e0f8..3c863522 100644 --- a/src/Adapter/Illuminate/phpunit.xml.dist +++ b/src/Adapter/Illuminate/phpunit.xml.dist @@ -1,35 +1,13 @@ - - + ./Tests/ - benchmark - - - - ./ - - ./Tests - ./vendor - - - diff --git a/src/Adapter/Memcache/.travis.yml b/src/Adapter/Memcache/.travis.yml deleted file mode 100644 index 6de6e999..00000000 --- a/src/Adapter/Memcache/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 5.6 - -services: - - memcached - -cache: - directories: - - "$HOME/.composer/cache" - -before_install: - - mkdir -p ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d - - bash <(curl -s https://raw.githubusercontent.com/php-cache/cache/master/build/php/5.6/Memcache.sh) - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/src/Adapter/Memcache/Changelog.md b/src/Adapter/Memcache/Changelog.md index d4e666dd..b23d357f 100644 --- a/src/Adapter/Memcache/Changelog.md +++ b/src/Adapter/Memcache/Changelog.md @@ -1,9 +1,21 @@ # Change Log -The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. +The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. ## UNRELEASED +## 1.2.0 + +* Support for PHP 8.1 +* Drop support for PHP < 7.4 +* Allow psr/cache: ^1.0 || ^2.0 + +## 1.1.0 + +### Added + +* Support for PHP 8 + ## 1.0.0 * No changes since 0.3.0 @@ -12,12 +24,12 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee ### Added -* Support for the new `TaggableCacheItemPoolInterface`. +* Support for the new `TaggableCacheItemPoolInterface`. * Support for PSR-16 SimpleCache ### Changed -* The behavior of `CacheItem::getTags()` has changed. It will not return the tags stored in the cache storage. +* The behavior of `CacheItem::getTags()` has changed. It will not return the tags stored in the cache storage. ### Removed diff --git a/src/Adapter/Memcache/composer.json b/src/Adapter/Memcache/composer.json index 067cda3f..26c42022 100644 --- a/src/Adapter/Memcache/composer.json +++ b/src/Adapter/Memcache/composer.json @@ -1,17 +1,14 @@ { "name": "cache/memcache-adapter", "description": "A PSR-6 cache implementation using memcache. This implementation supports tags", - "type": "library", "license": "MIT", - "minimum-stability": "dev", - "prefer-stable": true, + "type": "library", "keywords": [ "cache", "psr-6", "memcache", "tag" ], - "homepage": "http://www.php-cache.com/en/latest/", "authors": [ { "name": "Aaron Scherer", @@ -24,23 +21,26 @@ "homepage": "https://github.com/nyholm" } ], + "homepage": "http://www.php-cache.com/en/latest/", "require": { - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", - "psr/simple-cache": "^1.0", - "cache/adapter-common": "^1.0" + "php": ">=7.4", + "cache/adapter-common": "^1.0", + "psr/cache": "^1.0 || ^2.0", + "psr/simple-cache": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.21", - "cache/integration-tests": "^0.16" - }, - "suggest": { - "ext-memcache": "The extension required to use this pool." + "cache/integration-tests": "^0.17", + "phpunit/phpunit": "^7.5.20 || ^9.5.10" }, "provide": { "psr/cache-implementation": "^1.0", "psr/simple-cache-implementation": "^1.0" }, + "suggest": { + "ext-memcache": "The extension required to use this pool." + }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Cache\\Adapter\\Memcache\\": "" diff --git a/src/Adapter/Memcache/phpunit.xml.dist b/src/Adapter/Memcache/phpunit.xml.dist index 61b3e0f8..3c863522 100644 --- a/src/Adapter/Memcache/phpunit.xml.dist +++ b/src/Adapter/Memcache/phpunit.xml.dist @@ -1,35 +1,13 @@ - - + ./Tests/ - benchmark - - - - ./ - - ./Tests - ./vendor - - - diff --git a/src/Adapter/Memcached/.travis.yml b/src/Adapter/Memcached/.travis.yml deleted file mode 100644 index 012f31b9..00000000 --- a/src/Adapter/Memcached/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 7.0 - -services: - - memcached - -cache: - directories: - - "$HOME/.composer/cache" - -before_install: - - mkdir -p ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d - - bash <(curl -s https://raw.githubusercontent.com/php-cache/cache/master/build/php/7.0/Memcached.sh) - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/src/Adapter/Memcached/Changelog.md b/src/Adapter/Memcached/Changelog.md index 90be86a9..7bd845a8 100644 --- a/src/Adapter/Memcached/Changelog.md +++ b/src/Adapter/Memcached/Changelog.md @@ -1,9 +1,21 @@ # Change Log -The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. +The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. ## UNRELEASED +## 1.2.0 + +* Support for PHP 8.1 +* Drop support for PHP < 7.4 +* Allow psr/cache: ^1.0 || ^2.0 + +## 1.1.0 + +### Added + +* Support for PHP 8 + ## 1.0.0 ### Fixed @@ -14,12 +26,12 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee ### Added -* Support for the new `TaggableCacheItemPoolInterface`. +* Support for the new `TaggableCacheItemPoolInterface`. * Support for PSR-16 SimpleCache ### Changed -* The behavior of `CacheItem::getTags()` has changed. It will not return the tags stored in the cache storage. +* The behavior of `CacheItem::getTags()` has changed. It will not return the tags stored in the cache storage. ### Removed @@ -31,7 +43,7 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee ### Fixed -* Issue when ttl is larger than 30 days. +* Issue when ttl is larger than 30 days. ## 0.3.2 diff --git a/src/Adapter/Memcached/Tests/IntegrationPoolTest.php b/src/Adapter/Memcached/Tests/IntegrationPoolTest.php index 1442323d..40da7c2a 100644 --- a/src/Adapter/Memcached/Tests/IntegrationPoolTest.php +++ b/src/Adapter/Memcached/Tests/IntegrationPoolTest.php @@ -16,4 +16,8 @@ class IntegrationPoolTest extends BaseTest { use CreatePoolTrait; + + protected $skippedTests = [ + 'testBasicUsageWithLongKey' => 'Long keys are not supported.', + ]; } diff --git a/src/Adapter/Memcached/Tests/IntegrationSimpleCacheTest.php b/src/Adapter/Memcached/Tests/IntegrationSimpleCacheTest.php index 12d10c20..dfeb6e04 100644 --- a/src/Adapter/Memcached/Tests/IntegrationSimpleCacheTest.php +++ b/src/Adapter/Memcached/Tests/IntegrationSimpleCacheTest.php @@ -16,4 +16,8 @@ class IntegrationSimpleCacheTest extends BaseTest { use CreatePoolTrait; + + protected $skippedTests = [ + 'testBasicUsageWithLongKey' => 'Long keys are not supported.', + ]; } diff --git a/src/Adapter/Memcached/composer.json b/src/Adapter/Memcached/composer.json index 5873daca..aadb1848 100644 --- a/src/Adapter/Memcached/composer.json +++ b/src/Adapter/Memcached/composer.json @@ -1,17 +1,14 @@ { "name": "cache/memcached-adapter", "description": "A PSR-6 cache implementation using Memcached. This implementation supports tags", - "type": "library", "license": "MIT", - "minimum-stability": "dev", - "prefer-stable": true, + "type": "library", "keywords": [ "cache", "psr-6", "memcached", "tag" ], - "homepage": "http://www.php-cache.com/en/latest/", "authors": [ { "name": "Aaron Scherer", @@ -24,24 +21,27 @@ "homepage": "https://github.com/nyholm" } ], + "homepage": "http://www.php-cache.com/en/latest/", "require": { - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", - "psr/simple-cache": "^1.0", + "php": ">=7.4", "cache/adapter-common": "^1.0", - "cache/hierarchical-cache": "^1.0" + "cache/hierarchical-cache": "^1.0", + "psr/cache": "^1.0 || ^2.0", + "psr/simple-cache": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.21", - "cache/integration-tests": "^0.16" - }, - "suggest": { - "ext-memcached": "The extension required to use this pool." + "cache/integration-tests": "^0.17", + "phpunit/phpunit": "^7.5.20 || ^9.5.10" }, "provide": { "psr/cache-implementation": "^1.0", "psr/simple-cache-implementation": "^1.0" }, + "suggest": { + "ext-memcached": "The extension required to use this pool." + }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Cache\\Adapter\\Memcached\\": "" diff --git a/src/Adapter/Memcached/phpunit.xml.dist b/src/Adapter/Memcached/phpunit.xml.dist index 2fb17fd8..3c863522 100644 --- a/src/Adapter/Memcached/phpunit.xml.dist +++ b/src/Adapter/Memcached/phpunit.xml.dist @@ -1,16 +1,5 @@ - - + ./Tests/ @@ -21,14 +10,4 @@ benchmark - - - - ./ - - ./Tests - ./vendor - - - diff --git a/src/Adapter/MongoDB/.travis.yml b/src/Adapter/MongoDB/.travis.yml deleted file mode 100644 index 221b2488..00000000 --- a/src/Adapter/MongoDB/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 7.0 - -services: - - mongodb - -addons: - apt: - sources: - - mongodb-3.2-precise - packages: - - mongodb-org-server - -cache: - directories: - - "$HOME/.composer/cache" - -before_install: - - mkdir -p ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d - - bash <(curl -s https://raw.githubusercontent.com/php-cache/cache/master/build/php/7.0/MongoDB.sh) - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/src/Adapter/MongoDB/Changelog.md b/src/Adapter/MongoDB/Changelog.md index 76c7a912..7a780992 100644 --- a/src/Adapter/MongoDB/Changelog.md +++ b/src/Adapter/MongoDB/Changelog.md @@ -1,9 +1,21 @@ # Change Log -The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. +The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. ## UNRELEASED +## 1.3.0 + +* Support for PHP 8.1 +* Drop support for PHP < 7.4 +* Allow psr/cache: ^1.0 || ^2.0 + +## 1.2.0 + +### Added + +* Support for PHP 8 + ## 1.1.0 ### Changed @@ -17,12 +29,12 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee ### Added -* Support for the new `TaggableCacheItemPoolInterface`. +* Support for the new `TaggableCacheItemPoolInterface`. * Support for PSR-16 SimpleCache ### Changed -* The behavior of `CacheItem::getTags()` has changed. It will not return the tags stored in the cache storage. +* The behavior of `CacheItem::getTags()` has changed. It will not return the tags stored in the cache storage. ### Removed diff --git a/src/Adapter/MongoDB/Tests/CreateServerTrait.php b/src/Adapter/MongoDB/Tests/CreateServerTrait.php index 94707abe..36092993 100644 --- a/src/Adapter/MongoDB/Tests/CreateServerTrait.php +++ b/src/Adapter/MongoDB/Tests/CreateServerTrait.php @@ -37,7 +37,7 @@ public function getCollection() return $this->collection; } - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { if (!class_exists('\MongoDB\Collection')) { static::markTestSkipped('MonogoDB extension not installed.'); diff --git a/src/Adapter/MongoDB/composer.json b/src/Adapter/MongoDB/composer.json index b55015c3..ecadc298 100644 --- a/src/Adapter/MongoDB/composer.json +++ b/src/Adapter/MongoDB/composer.json @@ -1,17 +1,14 @@ { "name": "cache/mongodb-adapter", "description": "A PSR-6 cache implementation using MongoDB. This implementation supports tags", - "type": "library", "license": "MIT", - "minimum-stability": "dev", - "prefer-stable": true, + "type": "library", "keywords": [ "cache", "psr-6", "mongodb", "tag" ], - "homepage": "http://www.php-cache.com/en/latest/", "authors": [ { "name": "Aaron Scherer", @@ -24,21 +21,24 @@ "homepage": "https://github.com/nyholm" } ], + "homepage": "http://www.php-cache.com/en/latest/", "require": { - "php": "^5.6 || ^7.0", + "php": ">=7.4", "cache/adapter-common": "^1.1", "mongodb/mongodb": "^1.0", - "psr/cache": "^1.0", + "psr/cache": "^1.0 || ^2.0", "psr/simple-cache": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.21", - "cache/integration-tests": "^0.16" + "cache/integration-tests": "^0.17", + "phpunit/phpunit": "^7.5.20 || ^9.5.10" }, "provide": { "psr/cache-implementation": "^1.0", "psr/simple-cache-implementation": "^1.0" }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Cache\\Adapter\\MongoDB\\": "" diff --git a/src/Adapter/MongoDB/phpunit.xml.dist b/src/Adapter/MongoDB/phpunit.xml.dist index 7a23a398..c69a9ae9 100644 --- a/src/Adapter/MongoDB/phpunit.xml.dist +++ b/src/Adapter/MongoDB/phpunit.xml.dist @@ -1,41 +1,18 @@ - - + ./Tests/ - - benchmark - - - - ./ - - ./Tests - ./vendor - - - diff --git a/src/Adapter/PHPArray/.travis.yml b/src/Adapter/PHPArray/.travis.yml deleted file mode 100644 index 942fe27e..00000000 --- a/src/Adapter/PHPArray/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 7.0 - -cache: - directories: - - "$HOME/.composer/cache" - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/src/Adapter/PHPArray/Changelog.md b/src/Adapter/PHPArray/Changelog.md index 3af96825..8d9ee5e7 100644 --- a/src/Adapter/PHPArray/Changelog.md +++ b/src/Adapter/PHPArray/Changelog.md @@ -1,14 +1,24 @@ # Change Log -The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. +The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. -## UNRELEASED +## 1.2.0 + +* Support for PHP 8.1 +* Drop support for PHP < 7.4 +* Allow psr/cache: ^1.0 || ^2.0 + +## 1.1.0 + +### Added + +* Support for PHP 8 ### Changed * New Hierarchical mode by using nested arrays instead of a flat array -## 1.1.0 +## 1.0.1 ### Fixed @@ -24,12 +34,12 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee ### Added -* Support for the new `TaggableCacheItemPoolInterface`. +* Support for the new `TaggableCacheItemPoolInterface`. * Support for PSR-16 SimpleCache ### Changed -* The behavior of `CacheItem::getTags()` has changed. It will not return the tags stored in the cache storage. +* The behavior of `CacheItem::getTags()` has changed. It will not return the tags stored in the cache storage. ### Removed diff --git a/src/Adapter/PHPArray/composer.json b/src/Adapter/PHPArray/composer.json index c013d571..53a327e3 100644 --- a/src/Adapter/PHPArray/composer.json +++ b/src/Adapter/PHPArray/composer.json @@ -1,17 +1,14 @@ { "name": "cache/array-adapter", "description": "A PSR-6 cache implementation using a php array. This implementation supports tags", - "type": "library", "license": "MIT", - "minimum-stability": "dev", - "prefer-stable": true, + "type": "library", "keywords": [ "cache", "psr-6", "array", "tag" ], - "homepage": "http://www.php-cache.com/en/latest/", "authors": [ { "name": "Aaron Scherer", @@ -24,21 +21,24 @@ "homepage": "https://github.com/nyholm" } ], + "homepage": "http://www.php-cache.com/en/latest/", "require": { - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", - "psr/simple-cache": "^1.0", + "php": ">=7.4", "cache/adapter-common": "^1.0", - "cache/hierarchical-cache": "^1.0" + "cache/hierarchical-cache": "^1.0", + "psr/cache": "^1.0 || ^2.0", + "psr/simple-cache": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.21", - "cache/integration-tests": "^0.16" + "cache/integration-tests": "^0.17", + "phpunit/phpunit": "^7.5.20 || ^9.5.10" }, "provide": { "psr/cache-implementation": "^1.0", "psr/simple-cache-implementation": "^1.0" }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Cache\\Adapter\\PHPArray\\": "" diff --git a/src/Adapter/PHPArray/phpunit.xml.dist b/src/Adapter/PHPArray/phpunit.xml.dist index 61b3e0f8..3c863522 100644 --- a/src/Adapter/PHPArray/phpunit.xml.dist +++ b/src/Adapter/PHPArray/phpunit.xml.dist @@ -1,35 +1,13 @@ - - + ./Tests/ - benchmark - - - - ./ - - ./Tests - ./vendor - - - diff --git a/src/Adapter/Predis/.travis.yml b/src/Adapter/Predis/.travis.yml deleted file mode 100644 index cd914e84..00000000 --- a/src/Adapter/Predis/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 7.0 - -services: - - redis - -cache: - directories: - - "$HOME/.composer/cache" - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/src/Adapter/Predis/Changelog.md b/src/Adapter/Predis/Changelog.md index 5394b1d8..82944367 100644 --- a/src/Adapter/Predis/Changelog.md +++ b/src/Adapter/Predis/Changelog.md @@ -1,9 +1,21 @@ # Change Log -The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. +The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. ## UNRELEASED +## 1.2.0 + +* Support for PHP 8.1 +* Drop support for PHP < 7.4 +* Allow psr/cache: ^1.0 || ^2.0 + +## 1.1.0 + +### Added + +* Support for PHP 8 + ## 1.0.0 ### Fixed @@ -14,12 +26,12 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee ### Added -* Support for the new `TaggableCacheItemPoolInterface`. +* Support for the new `TaggableCacheItemPoolInterface`. * Support for PSR-16 SimpleCache ### Changed -* The behavior of `CacheItem::getTags()` has changed. It will not return the tags stored in the cache storage. +* The behavior of `CacheItem::getTags()` has changed. It will not return the tags stored in the cache storage. ### Removed diff --git a/src/Adapter/Predis/composer.json b/src/Adapter/Predis/composer.json index c0573683..2739326b 100644 --- a/src/Adapter/Predis/composer.json +++ b/src/Adapter/Predis/composer.json @@ -1,10 +1,8 @@ { "name": "cache/predis-adapter", "description": "A PSR-6 cache implementation using Redis (Predis). This implementation supports tags", - "type": "library", "license": "MIT", - "minimum-stability": "dev", - "prefer-stable": true, + "type": "library", "keywords": [ "cache", "psr-6", @@ -12,7 +10,6 @@ "predis", "tag" ], - "homepage": "http://www.php-cache.com/en/latest/", "authors": [ { "name": "Aaron Scherer", @@ -25,22 +22,25 @@ "homepage": "https://github.com/nyholm" } ], + "homepage": "http://www.php-cache.com/en/latest/", "require": { - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", - "psr/simple-cache": "^1.0", + "php": ">=7.4", "cache/adapter-common": "^1.0", "cache/hierarchical-cache": "^1.0", - "predis/predis": "^1.1" + "predis/predis": "^1.1", + "psr/cache": "^1.0 || ^2.0", + "psr/simple-cache": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.21", - "cache/integration-tests": "^0.16" + "cache/integration-tests": "^0.17", + "phpunit/phpunit": "^7.5.20 || ^9.5.10" }, "provide": { "psr/cache-implementation": "^1.0", "psr/simple-cache-implementation": "^1.0" }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Cache\\Adapter\\Predis\\": "" diff --git a/src/Adapter/Predis/phpunit.xml.dist b/src/Adapter/Predis/phpunit.xml.dist index 61b3e0f8..3c863522 100644 --- a/src/Adapter/Predis/phpunit.xml.dist +++ b/src/Adapter/Predis/phpunit.xml.dist @@ -1,35 +1,13 @@ - - + ./Tests/ - benchmark - - - - ./ - - ./Tests - ./vendor - - - diff --git a/src/Adapter/Redis/.travis.yml b/src/Adapter/Redis/.travis.yml deleted file mode 100644 index 7e05db9c..00000000 --- a/src/Adapter/Redis/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 7.0 - -services: - - redis - -cache: - directories: - - "$HOME/.composer/cache" - -before_install: - - mkdir -p ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d - - bash <(curl -s https://raw.githubusercontent.com/php-cache/cache/master/build/php/7.0/Redis.sh) - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/src/Adapter/Redis/Changelog.md b/src/Adapter/Redis/Changelog.md index d1ac9341..40d1bd45 100644 --- a/src/Adapter/Redis/Changelog.md +++ b/src/Adapter/Redis/Changelog.md @@ -1,12 +1,20 @@ # Change Log -The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. +The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. ## UNRELEASED +## 1.2.0 + +* Support for PHP 8.1 +* Drop support for PHP < 7.4 +* Allow psr/cache: ^1.0 || ^2.0 + ## 1.1.0 ### Added + +* Support for PHP 8 * Allow \RedisArray and \RedisCluster objects for RedisCachePool ## 1.0.0 @@ -19,12 +27,12 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee ### Added -* Support for the new `TaggableCacheItemPoolInterface`. +* Support for the new `TaggableCacheItemPoolInterface`. * Support for PSR-16 SimpleCache ### Changed -* The behavior of `CacheItem::getTags()` has changed. It will not return the tags stored in the cache storage. +* The behavior of `CacheItem::getTags()` has changed. It will not return the tags stored in the cache storage. ### Removed diff --git a/src/Adapter/Redis/Tests/RedisCachePoolTest.php b/src/Adapter/Redis/Tests/RedisCachePoolTest.php index a0cf12a3..03e143a6 100644 --- a/src/Adapter/Redis/Tests/RedisCachePoolTest.php +++ b/src/Adapter/Redis/Tests/RedisCachePoolTest.php @@ -11,18 +11,20 @@ namespace Cache\Adapter\Redis\Tests; +use Cache\Adapter\Common\Exception\CachePoolException; use Cache\Adapter\Redis\RedisCachePool; +use PHPUnit\Framework\TestCase; -class RedisCachePoolTest extends \PHPUnit_Framework_TestCase +class RedisCachePoolTest extends TestCase { /** * Tests that an exception is thrown if invalid object is * passed to the constructor. - * - * @expectedException \Cache\Adapter\Common\Exception\CachePoolException */ public function testConstructorWithInvalidObject() { + $this->expectException(CachePoolException::class); + new RedisCachePool(new \stdClass()); } } diff --git a/src/Adapter/Redis/composer.json b/src/Adapter/Redis/composer.json index 114960c7..7abda0c3 100644 --- a/src/Adapter/Redis/composer.json +++ b/src/Adapter/Redis/composer.json @@ -1,10 +1,8 @@ { "name": "cache/redis-adapter", "description": "A PSR-6 cache implementation using Redis (PhpRedis). This implementation supports tags", - "type": "library", "license": "MIT", - "minimum-stability": "dev", - "prefer-stable": true, + "type": "library", "keywords": [ "cache", "psr-6", @@ -12,7 +10,6 @@ "redis", "tag" ], - "homepage": "http://www.php-cache.com/en/latest/", "authors": [ { "name": "Aaron Scherer", @@ -25,24 +22,27 @@ "homepage": "https://github.com/nyholm" } ], + "homepage": "http://www.php-cache.com/en/latest/", "require": { - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", - "psr/simple-cache": "^1.0", + "php": ">=7.4", "cache/adapter-common": "^1.0", - "cache/hierarchical-cache": "^1.0" + "cache/hierarchical-cache": "^1.0", + "psr/cache": "^1.0 || ^2.0", + "psr/simple-cache": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.21", - "cache/integration-tests": "^0.16" - }, - "suggest": { - "ext-redis": "The extension required to use this pool." + "cache/integration-tests": "^0.17", + "phpunit/phpunit": "^7.5.20 || ^9.5.10" }, "provide": { "psr/cache-implementation": "^1.0", "psr/simple-cache-implementation": "^1.0" }, + "suggest": { + "ext-redis": "The extension required to use this pool." + }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Cache\\Adapter\\Redis\\": "" diff --git a/src/Adapter/Redis/phpunit.xml.dist b/src/Adapter/Redis/phpunit.xml.dist index 61b3e0f8..3c863522 100644 --- a/src/Adapter/Redis/phpunit.xml.dist +++ b/src/Adapter/Redis/phpunit.xml.dist @@ -1,35 +1,13 @@ - - + ./Tests/ - benchmark - - - - ./ - - ./Tests - ./vendor - - - diff --git a/src/Adapter/Void/.travis.yml b/src/Adapter/Void/.travis.yml deleted file mode 100644 index 942fe27e..00000000 --- a/src/Adapter/Void/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 7.0 - -cache: - directories: - - "$HOME/.composer/cache" - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/src/Adapter/Void/Changelog.md b/src/Adapter/Void/Changelog.md index 87575600..e72ae238 100644 --- a/src/Adapter/Void/Changelog.md +++ b/src/Adapter/Void/Changelog.md @@ -1,9 +1,21 @@ # Change Log -The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. +The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. ## UNRELEASED +## 1.2.0 + +* Support for PHP 8.1 +* Drop support for PHP < 7.4 +* Allow psr/cache: ^1.0 || ^2.0 + +## 1.1.0 + +### Added + +* Support for PHP 8 + ## 1.0.0 * No changes since 0.4.1. @@ -18,12 +30,12 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee ### Added -* Support for the new `TaggableCacheItemPoolInterface`. +* Support for the new `TaggableCacheItemPoolInterface`. * Support for PSR-16 SimpleCache ### Changed -* The behavior of `CacheItem::getTags()` has changed. It will not return the tags stored in the cache storage. +* The behavior of `CacheItem::getTags()` has changed. It will not return the tags stored in the cache storage. ### Removed diff --git a/src/Adapter/Void/Tests/IntegrationPoolTest.php b/src/Adapter/Void/Tests/IntegrationPoolTest.php index 2fb21d3e..891f677a 100644 --- a/src/Adapter/Void/Tests/IntegrationPoolTest.php +++ b/src/Adapter/Void/Tests/IntegrationPoolTest.php @@ -44,6 +44,7 @@ class IntegrationPoolTest extends BaseTest 'testSaveDeferredWhenChangingValues' => 'Void adapter does not save,', 'testSavingObject' => 'Void adapter does not save,', 'testSaveDeferredOverwrite' => 'Void adapter does not save,', + 'testBasicUsageWithLongKey' => 'Void adapter does not save.', ]; public function createCachePool() diff --git a/src/Adapter/Void/Tests/IntegrationSimpleCacheTest.php b/src/Adapter/Void/Tests/IntegrationSimpleCacheTest.php index 12baaa4e..5619b0d6 100644 --- a/src/Adapter/Void/Tests/IntegrationSimpleCacheTest.php +++ b/src/Adapter/Void/Tests/IntegrationSimpleCacheTest.php @@ -17,28 +17,30 @@ class IntegrationSimpleCacheTest extends BaseTest { protected $skippedTests = [ - 'testSet' => 'Void adapter does not save,', - 'testSetTtl' => 'Void adapter does not save,', - 'testGet' => 'Void adapter does not save,', - 'testSetMultiple' => 'Void adapter does not save,', - 'testSetMultipleTtl' => 'Void adapter does not save,', - 'testSetMultipleWithGenerator' => 'Void adapter does not save,', - 'testGetMultiple' => 'Void adapter does not save,', - 'testGetMultipleWithGenerator' => 'Void adapter does not save,', - 'testHas' => 'Void adapter does not save,', - 'testBinaryData' => 'Void adapter does not save,', - 'testDataTypeString' => 'Void adapter does not save,', - 'testDataTypeInteger' => 'Void adapter does not save,', - 'testDataTypeFloat' => 'Void adapter does not save,', - 'testDataTypeBoolean' => 'Void adapter does not save,', - 'testDataTypeArray' => 'Void adapter does not save,', - 'testDataTypeObject' => 'Void adapter does not save,', - 'testSetValidKeys' => 'Void adapter does not save,', - 'testSetMultipleValidKeys' => 'Void adapter does not save,', - 'testSetMultipleInvalidKeys' => 'Void adapter does not save,', - 'testSetValidData' => 'Void adapter does not save,', - 'testSetMultipleValidData' => 'Void adapter does not save,', - 'testObjectDoesNotChangeInCache' => 'Void adapter does not save,', + 'testSet' => 'Void adapter does not save,', + 'testSetTtl' => 'Void adapter does not save,', + 'testGet' => 'Void adapter does not save,', + 'testSetMultiple' => 'Void adapter does not save,', + 'testSetMultipleTtl' => 'Void adapter does not save,', + 'testSetMultipleWithGenerator' => 'Void adapter does not save,', + 'testGetMultiple' => 'Void adapter does not save,', + 'testGetMultipleWithGenerator' => 'Void adapter does not save,', + 'testHas' => 'Void adapter does not save,', + 'testBinaryData' => 'Void adapter does not save,', + 'testDataTypeString' => 'Void adapter does not save,', + 'testDataTypeInteger' => 'Void adapter does not save,', + 'testDataTypeFloat' => 'Void adapter does not save,', + 'testDataTypeBoolean' => 'Void adapter does not save,', + 'testDataTypeArray' => 'Void adapter does not save,', + 'testDataTypeObject' => 'Void adapter does not save,', + 'testSetValidKeys' => 'Void adapter does not save,', + 'testSetMultipleValidKeys' => 'Void adapter does not save,', + 'testSetMultipleInvalidKeys' => 'Void adapter does not save,', + 'testSetValidData' => 'Void adapter does not save,', + 'testSetMultipleValidData' => 'Void adapter does not save,', + 'testObjectDoesNotChangeInCache' => 'Void adapter does not save,', + 'testBasicUsageWithLongKey' => 'Void adapter does not save.', + 'testSetMultipleWithIntegerArrayKey' => 'Void adapter does not save.', ]; public function createSimpleCache() diff --git a/src/Adapter/Void/composer.json b/src/Adapter/Void/composer.json index 938ec253..1c09f613 100644 --- a/src/Adapter/Void/composer.json +++ b/src/Adapter/Void/composer.json @@ -1,17 +1,14 @@ { "name": "cache/void-adapter", "description": "A PSR-6 cache implementation using Void. This implementation supports tags", - "type": "library", "license": "MIT", - "minimum-stability": "dev", - "prefer-stable": true, + "type": "library", "keywords": [ "cache", "psr-6", "void", "tag" ], - "homepage": "http://www.php-cache.com/en/latest/", "authors": [ { "name": "Aaron Scherer", @@ -24,21 +21,24 @@ "homepage": "https://github.com/nyholm" } ], + "homepage": "http://www.php-cache.com/en/latest/", "require": { - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", - "psr/simple-cache": "^1.0", + "php": ">=7.4", "cache/adapter-common": "^1.0", - "cache/hierarchical-cache": "^1.0" + "cache/hierarchical-cache": "^1.0", + "psr/cache": "^1.0 || ^2.0", + "psr/simple-cache": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.21", - "cache/integration-tests": "^0.16" + "cache/integration-tests": "^0.17", + "phpunit/phpunit": "^7.5.20 || ^9.5.10" }, "provide": { "psr/cache-implementation": "^1.0", "psr/simple-cache-implementation": "^1.0" }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Cache\\Adapter\\Void\\": "" diff --git a/src/Adapter/Void/phpunit.xml.dist b/src/Adapter/Void/phpunit.xml.dist index 61b3e0f8..3c863522 100644 --- a/src/Adapter/Void/phpunit.xml.dist +++ b/src/Adapter/Void/phpunit.xml.dist @@ -1,35 +1,13 @@ - - + ./Tests/ - benchmark - - - - ./ - - ./Tests - ./vendor - - - diff --git a/src/Bridge/Doctrine/.travis.yml b/src/Bridge/Doctrine/.travis.yml deleted file mode 100644 index 942fe27e..00000000 --- a/src/Bridge/Doctrine/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 7.0 - -cache: - directories: - - "$HOME/.composer/cache" - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/src/Bridge/Doctrine/Changelog.md b/src/Bridge/Doctrine/Changelog.md index 7d83dbd7..e9f948c4 100644 --- a/src/Bridge/Doctrine/Changelog.md +++ b/src/Bridge/Doctrine/Changelog.md @@ -2,12 +2,27 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. +## 3.2.0 + +* Support for PHP 8.1 +* Drop support for PHP < 7.4 +* Allow psr/cache: ^1.0 || ^2.0 + +## 3.1.0 + +### Added + +* Support for PHP 8 + +### Fixed + +* Return result from `Doctrine::clear()` ## 3.0.1 ### Changed -* Bumped versions on dependencies. +* Bumped versions on dependencies. ## 3.0.0 diff --git a/src/Bridge/Doctrine/Tests/DoctrineCacheBridgeTest.php b/src/Bridge/Doctrine/Tests/DoctrineCacheBridgeTest.php index 7fdec9d7..19dcf825 100644 --- a/src/Bridge/Doctrine/Tests/DoctrineCacheBridgeTest.php +++ b/src/Bridge/Doctrine/Tests/DoctrineCacheBridgeTest.php @@ -37,7 +37,7 @@ class DoctrineCacheBridgeTest extends TestCase */ private $itemMock; - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/src/Bridge/Doctrine/composer.json b/src/Bridge/Doctrine/composer.json index 979ef0d2..baf3679c 100644 --- a/src/Bridge/Doctrine/composer.json +++ b/src/Bridge/Doctrine/composer.json @@ -1,16 +1,13 @@ { "name": "cache/psr-6-doctrine-bridge", - "type": "library", "description": "PSR-6 Doctrine bridge", + "license": "MIT", + "type": "library", "keywords": [ "cache", "psr-6", "doctrine" ], - "homepage": "http://www.php-cache.com/en/latest/", - "license": "MIT", - "minimum-stability": "dev", - "prefer-stable": true, "authors": [ { "name": "Aaron Scherer", @@ -18,16 +15,19 @@ "homepage": "https://github.com/aequasi" } ], + "homepage": "http://www.php-cache.com/en/latest/", "require": { - "php": "^5.6 || ^7.0", + "php": ">=7.4", "doctrine/cache": "^1.6", "psr/cache-implementation": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.21", + "cache/doctrine-adapter": "^1.0", "mockery/mockery": "^1.0", - "cache/doctrine-adapter": "^1.0" + "phpunit/phpunit": "^7.5.20 || ^9.5.10" }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Cache\\Bridge\\Doctrine\\": "" diff --git a/src/Bridge/Doctrine/phpunit.xml.dist b/src/Bridge/Doctrine/phpunit.xml.dist index 61b3e0f8..9f2b91fd 100644 --- a/src/Bridge/Doctrine/phpunit.xml.dist +++ b/src/Bridge/Doctrine/phpunit.xml.dist @@ -1,35 +1,22 @@ - - + + + + ./ + + + ./Tests + ./vendor + + ./Tests/ - benchmark - - - - ./ - - ./Tests - ./vendor - - - diff --git a/src/Bridge/SimpleCache/.travis.yml b/src/Bridge/SimpleCache/.travis.yml deleted file mode 100644 index 942fe27e..00000000 --- a/src/Bridge/SimpleCache/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 7.0 - -cache: - directories: - - "$HOME/.composer/cache" - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/src/Bridge/SimpleCache/Changelog.md b/src/Bridge/SimpleCache/Changelog.md index f668ba97..9c49272e 100644 --- a/src/Bridge/SimpleCache/Changelog.md +++ b/src/Bridge/SimpleCache/Changelog.md @@ -1,9 +1,21 @@ # Change Log -The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. +The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. ## UNRELEASED +## 1.2.0 + +* Support for PHP 8.1 +* Drop support for PHP < 7.4 +* Allow psr/cache: ^1.0 || ^2.0 + +## 1.1.0 + +### Added + +* Support for PHP 8 + ## 1.0.0 * No changes since 0.1.1 diff --git a/src/Bridge/SimpleCache/README.md b/src/Bridge/SimpleCache/README.md index 3f7ead10..58ef5093 100644 --- a/src/Bridge/SimpleCache/README.md +++ b/src/Bridge/SimpleCache/README.md @@ -7,7 +7,7 @@ [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) This is a bridge that converts a PSR-6 cache implementation to PSR-16 (SimpleCache). It is a part of the PHP Cache organisation. To read about -features like tagging and hierarchy support please read the shared documentation at [www.php-cache.com](http://www.php-cache.com). +features like tagging and hierarchy support please read the shared documentation at [www.php-cache.com](https://www.php-cache.com). ### Install @@ -17,7 +17,7 @@ composer require cache/simple-cache-bridge ### Use -You need an existing PSR-6 pool as a cnstructor argument to the bridge. +You need an existing PSR-6 pool as a constructor argument to the bridge. ```php $psr6pool = new ArrayCachePool(); diff --git a/src/Bridge/SimpleCache/Tests/SimpleCacheBridgeTest.php b/src/Bridge/SimpleCache/Tests/SimpleCacheBridgeTest.php index 0f1f995a..f70b5c42 100644 --- a/src/Bridge/SimpleCache/Tests/SimpleCacheBridgeTest.php +++ b/src/Bridge/SimpleCache/Tests/SimpleCacheBridgeTest.php @@ -34,7 +34,7 @@ class SimpleCacheBridgeTest extends TestCase */ private $itemMock; - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/src/Bridge/SimpleCache/composer.json b/src/Bridge/SimpleCache/composer.json index c77f34cd..003eac5b 100644 --- a/src/Bridge/SimpleCache/composer.json +++ b/src/Bridge/SimpleCache/composer.json @@ -1,17 +1,14 @@ { "name": "cache/simple-cache-bridge", "description": "A PSR-6 bridge to PSR-16. This will make any PSR-6 cache compatible with SimpleCache.", - "type": "library", "license": "MIT", - "minimum-stability": "dev", - "prefer-stable": true, + "type": "library", "keywords": [ "cache", "psr-6", "psr-16", "bridge" ], - "homepage": "http://www.php-cache.com/en/latest/", "authors": [ { "name": "Magnus Nordlander", @@ -19,20 +16,23 @@ "homepage": "https://github.com/magnusnordlander" } ], + "homepage": "http://www.php-cache.com/en/latest/", "require": { - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", + "php": ">=7.4", + "psr/cache": "^1.0 || ^2.0", "psr/simple-cache": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.21", - "cache/integration-tests": "^0.16", + "cache/integration-tests": "^0.17", "mockery/mockery": "^1.0", + "phpunit/phpunit": "^7.5.20 || ^9.5.10", "symfony/cache": "^3.2" }, "provide": { "psr/simple-cache-implementation": "^1.0" }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Cache\\Bridge\\SimpleCache\\": "" diff --git a/src/Bridge/SimpleCache/phpunit.xml.dist b/src/Bridge/SimpleCache/phpunit.xml.dist index 61b3e0f8..9f2b91fd 100644 --- a/src/Bridge/SimpleCache/phpunit.xml.dist +++ b/src/Bridge/SimpleCache/phpunit.xml.dist @@ -1,35 +1,22 @@ - - + + + + ./ + + + ./Tests + ./vendor + + ./Tests/ - benchmark - - - - ./ - - ./Tests - ./vendor - - - diff --git a/src/Encryption/.travis.yml b/src/Encryption/.travis.yml deleted file mode 100644 index 942fe27e..00000000 --- a/src/Encryption/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 7.0 - -cache: - directories: - - "$HOME/.composer/cache" - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/src/Encryption/Changelog.md b/src/Encryption/Changelog.md index a4cf3328..1d73a43b 100644 --- a/src/Encryption/Changelog.md +++ b/src/Encryption/Changelog.md @@ -4,6 +4,18 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee ## UNRELEASED +## 1.3.0 + +* Support for PHP 8.1 +* Drop support for PHP < 7.4 +* Allow psr/cache: ^1.0 || ^2.0 + +## 1.2.0 + +### Added + +* Support for PHP 8 + ## 1.1.0 ### Added diff --git a/src/Encryption/Tests/IntegrationPoolTest.php b/src/Encryption/Tests/IntegrationPoolTest.php index 788afa2f..fd0fa78b 100644 --- a/src/Encryption/Tests/IntegrationPoolTest.php +++ b/src/Encryption/Tests/IntegrationPoolTest.php @@ -22,6 +22,10 @@ class IntegrationPoolTest extends CachePoolTest { + protected $skippedTests = [ + 'testBasicUsageWithLongKey' => 'Long keys are not supported.', + ]; + /** * @type Filesystem */ diff --git a/src/Encryption/composer.json b/src/Encryption/composer.json index 81776fe7..67e4f01d 100644 --- a/src/Encryption/composer.json +++ b/src/Encryption/composer.json @@ -1,17 +1,14 @@ { "name": "cache/encryption-cache", - "type": "library", "description": "Adds encryption support to your PSR-6 cache implementation", + "license": "MIT", + "type": "library", "keywords": [ "cache", "psr6", "encrypted", "encryption" ], - "homepage": "http://www.php-cache.com/en/latest/", - "license": "MIT", - "minimum-stability": "dev", - "prefer-stable": true, "authors": [ { "name": "Aaron Scherer", @@ -29,18 +26,21 @@ "homepage": "https://github.com/prisis" } ], + "homepage": "http://www.php-cache.com/en/latest/", "require": { - "php": "^5.6 || ^7.0", + "php": ">=7.4", "cache/adapter-common": "^1.1", "cache/tag-interop": "^1.0", "defuse/php-encryption": "^2.0", - "psr/cache": "^1.0" + "psr/cache": "^1.0 || ^2.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.21", - "cache/integration-tests": "^0.16", - "cache/filesystem-adapter": "^1.0" + "cache/filesystem-adapter": "^1.0", + "cache/integration-tests": "^0.17", + "phpunit/phpunit": "^7.5.20 || ^9.5.10" }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Cache\\Encryption\\": "" diff --git a/src/Encryption/phpunit.xml.dist b/src/Encryption/phpunit.xml.dist index 3a59138d..39afa9ca 100644 --- a/src/Encryption/phpunit.xml.dist +++ b/src/Encryption/phpunit.xml.dist @@ -1,36 +1,23 @@ - - + + + + ./ + + + ./Resources + ./Tests + ./vendor + + ./Tests/ - benchmark - - - - ./ - - ./Resources - ./Tests - ./vendor - - - diff --git a/src/Hierarchy/.travis.yml b/src/Hierarchy/.travis.yml deleted file mode 100644 index 942fe27e..00000000 --- a/src/Hierarchy/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 7.0 - -cache: - directories: - - "$HOME/.composer/cache" - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/src/Hierarchy/Changelog.md b/src/Hierarchy/Changelog.md index 612255c4..f13d7842 100644 --- a/src/Hierarchy/Changelog.md +++ b/src/Hierarchy/Changelog.md @@ -1,9 +1,21 @@ # Change Log -The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. +The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. ## UNRELEASED +## 1.2.0 + +* Support for PHP 8.1 +* Drop support for PHP < 7.4 +* Allow psr/cache: ^1.0 || ^2.0 + +## 1.1.0 + +### Added + +* Support for PHP 8 + ## 1.0.0 * No changes since 0.4.0 @@ -16,7 +28,7 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee ### Removed -* Dependency to `cache/taggable-cache`. +* Dependency to `cache/taggable-cache`. ## 0.3.0 diff --git a/src/Hierarchy/Tests/HierarchicalCachePoolTest.php b/src/Hierarchy/Tests/HierarchicalCachePoolTest.php index 9f9e9200..cd3afc8c 100644 --- a/src/Hierarchy/Tests/HierarchicalCachePoolTest.php +++ b/src/Hierarchy/Tests/HierarchicalCachePoolTest.php @@ -153,11 +153,11 @@ public function testExplodeKeyWithTags() $result = $method->invoke($pool, '|key|bar!hash'); $this->assertCount(3, $result); foreach ($result as $r) { - $this->assertRegExp('|.*!hash|s', $r, 'Tag hash must be on every level in hierarchy key'); + $this->assertMatchesRegularExpression('|.*!hash|s', $r, 'Tag hash must be on every level in hierarchy key'); } $result = $method->invoke($pool, '|!hash'); $this->assertCount(1, $result); - $this->assertRegExp('|.*!hash|s', $result[0], 'Tag hash must on root level in hierarchy key'); + $this->assertMatchesRegularExpression('|.*!hash|s', $result[0], 'Tag hash must on root level in hierarchy key'); } } diff --git a/src/Hierarchy/composer.json b/src/Hierarchy/composer.json index fe1585ab..6b81cc59 100644 --- a/src/Hierarchy/composer.json +++ b/src/Hierarchy/composer.json @@ -1,15 +1,14 @@ { "name": "cache/hierarchical-cache", "description": "A helper trait and interface to your PSR-6 cache to support hierarchical keys.", - "type": "library", "license": "MIT", + "type": "library", "keywords": [ "cache", "psr-6", "hierarchy", "hierarchical" ], - "homepage": "http://www.php-cache.com/en/latest/", "authors": [ { "name": "Aaron Scherer", @@ -22,14 +21,17 @@ "homepage": "https://github.com/nyholm" } ], + "homepage": "http://www.php-cache.com/en/latest/", "require": { - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", - "cache/adapter-common": "^1.0" + "php": ">=7.4", + "cache/adapter-common": "^1.0", + "psr/cache": "^1.0 || ^2.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.21" + "phpunit/phpunit": "^7.5.20 || ^9.5.10" }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Cache\\Hierarchy\\": "" @@ -38,8 +40,6 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "prefer-stable": true, "extra": { "branch-alias": { "dev-master": "1.1-dev" diff --git a/src/Hierarchy/phpunit.xml.dist b/src/Hierarchy/phpunit.xml.dist index 61b3e0f8..9f2b91fd 100644 --- a/src/Hierarchy/phpunit.xml.dist +++ b/src/Hierarchy/phpunit.xml.dist @@ -1,35 +1,22 @@ - - + + + + ./ + + + ./Tests + ./vendor + + ./Tests/ - benchmark - - - - ./ - - ./Tests - ./vendor - - - diff --git a/src/Namespaced/.travis.yml b/src/Namespaced/.travis.yml deleted file mode 100644 index 012f31b9..00000000 --- a/src/Namespaced/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 7.0 - -services: - - memcached - -cache: - directories: - - "$HOME/.composer/cache" - -before_install: - - mkdir -p ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d - - bash <(curl -s https://raw.githubusercontent.com/php-cache/cache/master/build/php/7.0/Memcached.sh) - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/src/Namespaced/Changelog.md b/src/Namespaced/Changelog.md index df83fd31..4eb5959e 100644 --- a/src/Namespaced/Changelog.md +++ b/src/Namespaced/Changelog.md @@ -4,6 +4,18 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee ## UNRELEASED +## 1.2.0 + +* Support for PHP 8.1 +* Drop support for PHP < 7.4 +* Allow psr/cache: ^1.0 || ^2.0 + +## 1.1.0 + +### Added + +* Support for PHP 8 + ## 1.0.0 ### Added diff --git a/src/Namespaced/Tests/IntegrationTest.php b/src/Namespaced/Tests/IntegrationTest.php index ce12792b..6f49471a 100644 --- a/src/Namespaced/Tests/IntegrationTest.php +++ b/src/Namespaced/Tests/IntegrationTest.php @@ -28,7 +28,7 @@ class IntegrationTest extends TestCase */ private $cache; - protected function setUp() + protected function setUp(): void { $cache = new Memcached(); $cache->addServer('localhost', 11211); @@ -36,7 +36,7 @@ protected function setUp() $this->cache = new MemcachedCachePool($cache); } - protected function tearDown() + protected function tearDown(): void { if ($this->cache !== null) { $this->cache->clear(); diff --git a/src/Namespaced/composer.json b/src/Namespaced/composer.json index f4b52e80..4dc01fa3 100644 --- a/src/Namespaced/composer.json +++ b/src/Namespaced/composer.json @@ -1,16 +1,13 @@ { "name": "cache/namespaced-cache", "description": "A decorator that makes your cache support namespaces", - "type": "library", "license": "MIT", - "minimum-stability": "dev", - "prefer-stable": true, + "type": "library", "keywords": [ "cache", "psr-6", "namespace" ], - "homepage": "http://www.php-cache.com/en/latest/", "authors": [ { "name": "Tobias Nyholm", @@ -18,15 +15,18 @@ "homepage": "https://github.com/nyholm" } ], + "homepage": "http://www.php-cache.com/en/latest/", "require": { - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", - "cache/hierarchical-cache": "^1.0" + "php": ">=7.4", + "cache/hierarchical-cache": "^1.0", + "psr/cache": "^1.0 || ^2.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.21", - "cache/memcached-adapter": "^1.0" + "cache/memcached-adapter": "^1.0", + "phpunit/phpunit": "^7.5.20 || ^9.5.10" }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Cache\\Namespaced\\": "" diff --git a/src/Namespaced/phpunit.xml.dist b/src/Namespaced/phpunit.xml.dist index 61b3e0f8..9f2b91fd 100644 --- a/src/Namespaced/phpunit.xml.dist +++ b/src/Namespaced/phpunit.xml.dist @@ -1,35 +1,22 @@ - - + + + + ./ + + + ./Tests + ./vendor + + ./Tests/ - benchmark - - - - ./ - - ./Tests - ./vendor - - - diff --git a/src/Prefixed/.travis.yml b/src/Prefixed/.travis.yml deleted file mode 100644 index 942fe27e..00000000 --- a/src/Prefixed/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 7.0 - -cache: - directories: - - "$HOME/.composer/cache" - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/src/Prefixed/Changelog.md b/src/Prefixed/Changelog.md index 2aa4e631..2ae1accb 100644 --- a/src/Prefixed/Changelog.md +++ b/src/Prefixed/Changelog.md @@ -1,18 +1,25 @@ # Change Log -The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. +The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. ## UNRELEASED +## 1.2.0 + +* Support for PHP 8.1 +* Drop support for PHP < 7.4 +* Allow psr/cache: ^1.0 || ^2.0 + ## 1.1.0 ### Added +* Support for PHP 8 * New decorator PrefixedSimpleCache to allow usage of PSR-16 compatible adapters. ## 1.0.0 -### Removed +### Removed * Dependency on `cache/hierarchical-cache` diff --git a/src/Prefixed/composer.json b/src/Prefixed/composer.json index 336b75bb..43f68f0a 100644 --- a/src/Prefixed/composer.json +++ b/src/Prefixed/composer.json @@ -1,16 +1,13 @@ { "name": "cache/prefixed-cache", "description": "A decorator that makes your cache support prefix", - "type": "library", "license": "MIT", - "minimum-stability": "dev", - "prefer-stable": true, + "type": "library", "keywords": [ "cache", "psr-6", "prefix" ], - "homepage": "http://www.php-cache.com/en/latest/", "authors": [ { "name": "Tobias Nyholm", @@ -18,16 +15,19 @@ "homepage": "https://github.com/nyholm" } ], - "require": { - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", - "psr/simple-cache": "^1.0", - "cache/hierarchical-cache": "^0.4" + "homepage": "http://www.php-cache.com/en/latest/", + "require": { + "php": ">=7.4", + "cache/hierarchical-cache": "^1.0", + "psr/cache": "^1.0 || ^2.0", + "psr/simple-cache": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.21", - "cache/integration-tests": "^0.16" + "cache/integration-tests": "^0.17", + "phpunit/phpunit": "^7.5.20 || ^9.5.10" }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Cache\\Prefixed\\": "" diff --git a/src/Prefixed/phpunit.xml.dist b/src/Prefixed/phpunit.xml.dist index 61b3e0f8..9f2b91fd 100644 --- a/src/Prefixed/phpunit.xml.dist +++ b/src/Prefixed/phpunit.xml.dist @@ -1,35 +1,22 @@ - - + + + + ./ + + + ./Tests + ./vendor + + ./Tests/ - benchmark - - - - ./ - - ./Tests - ./vendor - - - diff --git a/src/SessionHandler/.travis.yml b/src/SessionHandler/.travis.yml deleted file mode 100644 index 942fe27e..00000000 --- a/src/SessionHandler/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 7.0 - -cache: - directories: - - "$HOME/.composer/cache" - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/src/SessionHandler/Changelog.md b/src/SessionHandler/Changelog.md index a5cbf368..ec55703c 100644 --- a/src/SessionHandler/Changelog.md +++ b/src/SessionHandler/Changelog.md @@ -1,16 +1,22 @@ # Change Log -The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. +The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. ## UNRELEASED +## 1.2.0 + +* Support for PHP 8.1 +* Drop support for PHP < 7.4 +* Allow psr/cache: ^1.0 || ^2.0 + ## 1.1.0 ### Added -* new psr-16 SessionHandler -* implemented PHP 7.0's `SessionUpdateTimestampHandlerInterface` with a new - `AbstractSessionHandler` base class +* Support for PHP 8 +* New PSR-16 SessionHandler +* Implemented PHP 7.0's `SessionUpdateTimestampHandlerInterface` with a new `AbstractSessionHandler` base class ## 1.0.0 diff --git a/src/SessionHandler/Psr16SessionHandler.php b/src/SessionHandler/Psr16SessionHandler.php index 61cacf8a..2e6da6ac 100644 --- a/src/SessionHandler/Psr16SessionHandler.php +++ b/src/SessionHandler/Psr16SessionHandler.php @@ -48,7 +48,8 @@ public function __construct(CacheInterface $cache, array $options = []) if ($diff = array_diff(array_keys($options), ['prefix', 'ttl'])) { throw new \InvalidArgumentException(sprintf( - 'The following options are not supported "%s"', implode(', ', $diff) + 'The following options are not supported "%s"', + implode(', ', $diff) )); } diff --git a/src/SessionHandler/Psr6SessionHandler.php b/src/SessionHandler/Psr6SessionHandler.php index 5db023ed..f1fe59af 100644 --- a/src/SessionHandler/Psr6SessionHandler.php +++ b/src/SessionHandler/Psr6SessionHandler.php @@ -49,7 +49,8 @@ public function __construct(CacheItemPoolInterface $cache, array $options = []) if ($diff = array_diff(array_keys($options), ['prefix', 'ttl'])) { throw new \InvalidArgumentException(sprintf( - 'The following options are not supported "%s"', implode(', ', $diff) + 'The following options are not supported "%s"', + implode(', ', $diff) )); } diff --git a/src/SessionHandler/Tests/AbstractSessionHandlerTest.php b/src/SessionHandler/Tests/AbstractSessionHandlerTest.php index 0430adc8..f3781b11 100644 --- a/src/SessionHandler/Tests/AbstractSessionHandlerTest.php +++ b/src/SessionHandler/Tests/AbstractSessionHandlerTest.php @@ -11,12 +11,14 @@ namespace Cache\SessionHandler\Tests; +use PHPUnit\Framework\TestCase; + /** * @author Aaron Scherer * @author Tobias Nyholm * @author Daniel Bannert */ -abstract class AbstractSessionHandlerTest extends \PHPUnit_Framework_TestCase +abstract class AbstractSessionHandlerTest extends TestCase { const TTL = 100; const PREFIX = 'pre'; diff --git a/src/SessionHandler/Tests/Psr16SessionHandlerTest.php b/src/SessionHandler/Tests/Psr16SessionHandlerTest.php index ee0dddd1..996f83b3 100644 --- a/src/SessionHandler/Tests/Psr16SessionHandlerTest.php +++ b/src/SessionHandler/Tests/Psr16SessionHandlerTest.php @@ -25,7 +25,7 @@ class Psr16SessionHandlerTest extends AbstractSessionHandlerTest */ private $psr16; - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/src/SessionHandler/Tests/Psr6SessionHandlerTest.php b/src/SessionHandler/Tests/Psr6SessionHandlerTest.php index 2a7d609b..d9ecf658 100644 --- a/src/SessionHandler/Tests/Psr6SessionHandlerTest.php +++ b/src/SessionHandler/Tests/Psr6SessionHandlerTest.php @@ -28,7 +28,7 @@ class Psr6SessionHandlerTest extends AbstractSessionHandlerTest */ private $psr6; - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/src/SessionHandler/composer.json b/src/SessionHandler/composer.json index 723c60db..b9a95557 100644 --- a/src/SessionHandler/composer.json +++ b/src/SessionHandler/composer.json @@ -1,16 +1,13 @@ { "name": "cache/session-handler", - "type": "library", "description": "An implementation of PHP's SessionHandlerInterface that allows PSR-6", + "license": "MIT", + "type": "library", "keywords": [ "cache", "psr-6", "session handler" ], - "homepage": "http://www.php-cache.com/en/latest/", - "license": "MIT", - "minimum-stability": "dev", - "prefer-stable": true, "authors": [ { "name": "Aaron Scherer", @@ -23,20 +20,23 @@ "homepage": "https://github.com/nyholm" }, { - "name" : "Daniel Bannert", - "email" : "d.bannert@anolilab.de", + "name": "Daniel Bannert", + "email": "d.bannert@anolilab.de", "homepage": "https://github.com/prisis" } ], + "homepage": "http://www.php-cache.com/en/latest/", "require": { - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", + "php": ">=7.4", + "psr/cache": "^1.0 || ^2.0", "symfony/polyfill-php70": "^1.6" }, "require-dev": { - "phpunit/phpunit": "^5.7.21", - "cache/array-adapter": "^1.0" + "cache/array-adapter": "^1.0", + "phpunit/phpunit": "^7.5.20 || ^9.5.10" }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Cache\\SessionHandler\\": "" diff --git a/src/SessionHandler/phpunit.xml.dist b/src/SessionHandler/phpunit.xml.dist index 61b3e0f8..9f2b91fd 100644 --- a/src/SessionHandler/phpunit.xml.dist +++ b/src/SessionHandler/phpunit.xml.dist @@ -1,35 +1,22 @@ - - + + + + ./ + + + ./Tests + ./vendor + + ./Tests/ - benchmark - - - - ./ - - ./Tests - ./vendor - - - diff --git a/src/TagInterop/.travis.yml b/src/TagInterop/.travis.yml deleted file mode 100644 index 942fe27e..00000000 --- a/src/TagInterop/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 7.0 - -cache: - directories: - - "$HOME/.composer/cache" - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/src/TagInterop/Changelog.md b/src/TagInterop/Changelog.md index f0b18cb5..974da3e6 100644 --- a/src/TagInterop/Changelog.md +++ b/src/TagInterop/Changelog.md @@ -2,6 +2,15 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. +## 1.1.0 + +* Support PHP 8.1 +* Support for psr/cache v2 + +## 1.0.1 + +* Support PHP 8 + ## 1.0.0 * First release diff --git a/src/TagInterop/composer.json b/src/TagInterop/composer.json index aa1f5cf5..03dacbe8 100644 --- a/src/TagInterop/composer.json +++ b/src/TagInterop/composer.json @@ -1,15 +1,14 @@ { "name": "cache/tag-interop", - "type": "library", "description": "Framework interoperable interfaces for tags", + "license": "MIT", + "type": "library", "keywords": [ "cache", "psr6", "tag", "psr" ], - "homepage": "http://www.php-cache.com/en/latest/", - "license": "MIT", "authors": [ { "name": "Tobias Nyholm", @@ -22,9 +21,10 @@ "homepage": "https://github.com/nicolas-grekas" } ], + "homepage": "https://www.php-cache.com/en/latest/", "require": { - "php": "^5.5 || ^7.0", - "psr/cache": "^1.0" + "php": "^5.5 || ^7.0 || ^8.0", + "psr/cache": "^1.0 || ^2.0" }, "autoload": { "psr-4": { diff --git a/src/Taggable/.travis.yml b/src/Taggable/.travis.yml deleted file mode 100644 index 942fe27e..00000000 --- a/src/Taggable/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 7.0 - -cache: - directories: - - "$HOME/.composer/cache" - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/src/Taggable/Changelog.md b/src/Taggable/Changelog.md index ab36a67a..3af1396c 100644 --- a/src/Taggable/Changelog.md +++ b/src/Taggable/Changelog.md @@ -4,6 +4,18 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee ## UNRELEASED +## 1.2.0 + +* Support for PHP 8.1 +* Drop support for PHP < 7.4 +* Allow psr/cache: ^1.0 || ^2.0 + +## 1.1.0 + +### Added + +* Support for PHP 8 + ## 1.0.0 ### Added @@ -12,7 +24,7 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee ### Changed -* We do not throw `Cache\Adapter\Common\Exception\InvalidArgumentException` anymore. Instead we throw +* We do not throw `Cache\Adapter\Common\Exception\InvalidArgumentException` anymore. Instead we throw `Cache\Taggable\Exception\InvalidArgumentException`. Both exceptions do implement `Psr\Cache\InvalidArgumentException` * We do not require `cache/adapter-common` @@ -34,7 +46,7 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee ### Changed -* The behavior of `TaggablePSR6ItemAdapter::getTags()` has changed. It will not return the tags stored in the cache storage. +* The behavior of `TaggablePSR6ItemAdapter::getTags()` has changed. It will not return the tags stored in the cache storage. ### Removed diff --git a/src/Taggable/composer.json b/src/Taggable/composer.json index e0506640..10a9cdc8 100644 --- a/src/Taggable/composer.json +++ b/src/Taggable/composer.json @@ -1,17 +1,14 @@ { "name": "cache/taggable-cache", - "type": "library", "description": "Add tag support to your PSR-6 cache implementation", + "license": "MIT", + "type": "library", "keywords": [ "cache", "psr6", "tag", "taggable" ], - "homepage": "http://www.php-cache.com/en/latest/", - "license": "MIT", - "minimum-stability": "dev", - "prefer-stable": true, "authors": [ { "name": "Aaron Scherer", @@ -29,16 +26,19 @@ "homepage": "https://github.com/nyholm" } ], + "homepage": "http://www.php-cache.com/en/latest/", "require": { - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", - "cache/tag-interop": "^1.0" + "php": ">=7.4", + "cache/tag-interop": "^1.0", + "psr/cache": "^1.0 || ^2.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.21", - "cache/integration-tests": "^0.16", + "cache/integration-tests": "^0.17", + "phpunit/phpunit": "^7.5.20 || ^9.5.10", "symfony/cache": "^3.1" }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Cache\\Taggable\\": "" diff --git a/src/Taggable/phpunit.xml.dist b/src/Taggable/phpunit.xml.dist index 3a59138d..39afa9ca 100644 --- a/src/Taggable/phpunit.xml.dist +++ b/src/Taggable/phpunit.xml.dist @@ -1,36 +1,23 @@ - - + + + + ./ + + + ./Resources + ./Tests + ./vendor + + ./Tests/ - benchmark - - - - ./ - - ./Resources - ./Tests - ./vendor - - - diff --git a/src/Util/.travis.yml b/src/Util/.travis.yml deleted file mode 100644 index 942fe27e..00000000 --- a/src/Util/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 7.0 - -cache: - directories: - - "$HOME/.composer/cache" - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/src/Util/Tests/SimpleCacheUtilTest.php b/src/Util/Tests/SimpleCacheUtilTest.php index bb4a9b7d..89283418 100644 --- a/src/Util/Tests/SimpleCacheUtilTest.php +++ b/src/Util/Tests/SimpleCacheUtilTest.php @@ -13,8 +13,9 @@ use Cache\Adapter\PHPArray\ArrayCachePool; use Cache\Util; +use PHPUnit\Framework\TestCase; -class SimpleCacheUtilTest extends \PHPUnit_Framework_TestCase +class SimpleCacheUtilTest extends TestCase { public function testRememberCacheHit() { diff --git a/src/Util/composer.json b/src/Util/composer.json index dc1ba21d..b1631d9e 100644 --- a/src/Util/composer.json +++ b/src/Util/composer.json @@ -1,7 +1,8 @@ { "name": "cache/util", - "type": "library", "description": "PSR-6 and PSR-16 Caching Utilities", + "license": "MIT", + "type": "library", "keywords": [ "cache", "psr6", @@ -9,10 +10,6 @@ "utilities", "util" ], - "homepage": "http://www.php-cache.com/en/latest/", - "license": "MIT", - "minimum-stability": "dev", - "prefer-stable": true, "authors": [ { "name": "Tobias Nyholm", @@ -25,19 +22,24 @@ "homepage": "https://github.com/ragboyjr" } ], + "homepage": "http://www.php-cache.com/en/latest/", "require": { - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0" + "php": ">=7.4", + "psr/cache": "^1.0 || ^2.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.21", - "cache/array-adapter": "^1.0" + "cache/array-adapter": "^1.0", + "phpunit/phpunit": "^7.5.20 || ^9.5.10" }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Cache\\Util\\": "" }, - "files": ["SimpleCache/util.php"], + "files": [ + "SimpleCache/util.php" + ], "exclude-from-classmap": [ "/Tests/" ] diff --git a/src/Util/phpunit.xml.dist b/src/Util/phpunit.xml.dist index 3a59138d..39afa9ca 100644 --- a/src/Util/phpunit.xml.dist +++ b/src/Util/phpunit.xml.dist @@ -1,36 +1,23 @@ - - + + + + ./ + + + ./Resources + ./Tests + ./vendor + + ./Tests/ - benchmark - - - - ./ - - ./Resources - ./Tests - ./vendor - - -