Skip to content

Commit b0f069d

Browse files
committed
fix(composer): allow psr/simple-cache 2
1 parent d383541 commit b0f069d

40 files changed

Lines changed: 179 additions & 52 deletions

‎README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
[![Static analysis](https://github.com/php-cache/cache/actions/workflows/static.yml/badge.svg)](https://github.com/php-cache/cache/actions/workflows/static.yml)
55
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
66

7-
PHP Cache provides PSR-6 and PSR-16 cache adapters, decorators, and integration tools. This monorepo is the source for the packages in the [PHP Cache organization](https://github.com/php-cache).
7+
PHP Cache provides PSR-6 and PSR-16 cache adapters, decorators, and integration tools. This repository contains the packages in the [PHP Cache organization](https://github.com/php-cache).
88

99
## Requirements
1010

11-
Version 2 requires PHP 8.2 or later and `psr/cache` 3.x. Packages that implement PSR-16 require `psr/simple-cache` 3.x.
11+
Version 2 requires PHP 8.2 or later and `psr/cache` 3.x. Packages that implement PSR-16 support `psr/simple-cache` 2.x and 3.x.
1212

1313
Some adapters also need a PHP extension or client library. Composer lists those requirements for each split package.
1414

@@ -20,7 +20,7 @@ Install the package for the backend you use:
2020
composer require cache/redis-adapter:^2.0
2121
```
2222

23-
You can install every adapter and library through the monorepo package:
23+
You can install every adapter and library through the aggregate package:
2424

2525
```bash
2626
composer require cache/cache:^2.0

‎composer.json‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
"league/flysystem": "^2.0 || ^3.0",
2727
"psr/cache": "^3.0",
2828
"psr/log": "^3.0",
29-
"psr/simple-cache": "^3.0"
29+
"psr/simple-cache": "^2.0 || ^3.0"
3030
},
3131
"require-dev": {
32-
"cache/integration-tests": "^1.0@dev",
32+
"cache/integration-tests": "^1.0.4@dev",
3333
"defuse/php-encryption": "^2.4",
3434
"illuminate/cache": "^11.0 || ^12.0 || ^13.0",
3535
"mockery/mockery": "^1.6",
@@ -49,7 +49,7 @@
4949
"cache/encryption-cache": "self.version",
5050
"cache/filesystem-adapter": "self.version",
5151
"cache/hierarchical-cache": "self.version",
52-
"cache/illuminate-adapter": "1.0.2",
52+
"cache/illuminate-adapter": "1.0.3",
5353
"cache/memcache-adapter": "self.version",
5454
"cache/memcached-adapter": "self.version",
5555
"cache/mongodb-adapter": "self.version",
@@ -62,12 +62,12 @@
6262
"cache/simple-cache-bridge": "self.version",
6363
"cache/tag-interop": "self.version",
6464
"cache/taggable-cache": "self.version",
65-
"cache/util": "1.0.2",
65+
"cache/util": "1.0.3",
6666
"cache/void-adapter": "self.version"
6767
},
6868
"provide": {
6969
"psr/cache-implementation": "3.0",
70-
"psr/simple-cache-implementation": "3.0"
70+
"psr/simple-cache-implementation": "2.0 || 3.0"
7171
},
7272
"suggest": {
7373
"ext-apcu": "APCu extension is required to use the APCu Adapter",
@@ -93,7 +93,7 @@
9393
},
9494
"extra": {
9595
"branch-alias": {
96-
"dev-master": "2.1-dev"
96+
"dev-master": "2.2-dev"
9797
}
9898
},
9999
"scripts": {

‎src/Adapter/Apcu/Changelog.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release.
44

5+
## 2.0.3
6+
7+
### Fixed
8+
9+
* Treat APCu payloads that reference unavailable classes or fail during deserialization as cache misses.
10+
* Allow installing with `psr/simple-cache` 2 or 3.
11+
512
## 2.0.0
613

714
### Changed

‎src/Adapter/Apcu/composer.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@
2323
"homepage": "https://www.php-cache.com/en/latest/",
2424
"require": {
2525
"php": "^8.2",
26-
"cache/adapter-common": "^2.0",
26+
"cache/adapter-common": "^2.0.3",
2727
"psr/cache": "^3.0",
28-
"psr/simple-cache": "^3.0"
28+
"psr/simple-cache": "^2.0 || ^3.0"
2929
},
3030
"require-dev": {
3131
"cache/integration-tests": "^1.0@dev",
3232
"phpunit/phpunit": "^11.5"
3333
},
3434
"provide": {
3535
"psr/cache-implementation": "3.0",
36-
"psr/simple-cache-implementation": "3.0"
36+
"psr/simple-cache-implementation": "2.0 || 3.0"
3737
},
3838
"suggest": {
3939
"ext-apcu": "The extension required to use this pool."

‎src/Adapter/Chain/Changelog.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
Each release groups changes under Added, Removed, Changed, or Fixed headings.
44

5+
## 2.0.4
6+
7+
### Fixed
8+
9+
* Allow installing with `psr/simple-cache` 2 or 3.
10+
511
## 2.0.3
612

713
### Fixed

‎src/Adapter/Chain/composer.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"cache/tag-interop": "^2.0",
3131
"psr/cache": "^3.0",
3232
"psr/log": "^3.0",
33-
"psr/simple-cache": "^3.0"
33+
"psr/simple-cache": "^2.0 || ^3.0"
3434
},
3535
"require-dev": {
3636
"cache/array-adapter": "^2.0",
@@ -40,7 +40,7 @@
4040
},
4141
"provide": {
4242
"psr/cache-implementation": "3.0",
43-
"psr/simple-cache-implementation": "3.0"
43+
"psr/simple-cache-implementation": "2.0 || 3.0"
4444
},
4545
"suggest": {
4646
"cache/void-adapter": "Provides a no-op final fallback for failed cache backends"

‎src/Adapter/Common/Changelog.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release.
44

5+
## 2.0.3
6+
7+
### Fixed
8+
9+
* Treat serialized payloads that reference unavailable PHP classes as cache misses.
10+
* Identify lazy storage failures as `getItem()` operations instead of anonymous closures.
11+
* Allow installing with `psr/simple-cache` 2 or 3.
12+
513
## 2.0.0
614

715
### Changed

‎src/Adapter/Common/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Application code should install a concrete adapter instead. Adapter authors can
1414
composer require cache/adapter-common:^2.0
1515
```
1616

17-
Version 2 requires PHP 8.2, `psr/cache` 3, and `psr/simple-cache` 3.
17+
Version 2 requires PHP 8.2 and `psr/cache` 3. Its PSR-16 API supports `psr/simple-cache` 2 and 3.
1818

1919
## Documentation
2020

‎src/Adapter/Common/composer.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"cache/tag-interop": "^2.0",
2727
"psr/cache": "^3.0",
2828
"psr/log": "^3.0",
29-
"psr/simple-cache": "^3.0"
29+
"psr/simple-cache": "^2.0 || ^3.0"
3030
},
3131
"require-dev": {
3232
"cache/integration-tests": "^1.0@dev",

‎src/Adapter/Doctrine/Changelog.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release.
44

5+
## 2.0.3
6+
7+
### Fixed
8+
9+
* Treat serialized payloads that reference unavailable PHP classes as cache misses.
10+
* Allow installing with `psr/simple-cache` 2 or 3.
11+
512
## 2.0.0
613

714
### Changed

0 commit comments

Comments
 (0)