Skip to content

Commit 7acd517

Browse files
committed
Version 3.0.0
1 parent 776f816 commit 7acd517

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1501
-131
lines changed

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 4

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/.github export-ignore
2+
/tests export-ignore
3+
/phpstan.neon.dist export-ignore
4+
/phpunit.xml.dist export-ignore
5+
/phpcs.xml export-ignore
6+
/.editorconfig export-ignore

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: iprodev
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
labels: bug
5+
---
6+
7+
**Describe the bug**
8+
9+
**To Reproduce**
10+
11+
**Expected behavior**
12+
13+
**Environment**
14+
- PHP version:
15+
- OS:
16+
- Drivers order:
17+
18+
**Additional context**
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
labels: enhancement
5+
---
6+
7+
**Problem**
8+
9+
**Solution**
10+
11+
**Alternatives**
12+
13+
**Additional context**

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Summary
2+
3+
## Motivation
4+
5+
## How to test
6+
7+
## Checklist
8+
- [ ] Tests pass
9+
- [ ] Static analysis clean
10+
- [ ] Code style
11+
- [ ] Updated docs/CHANGELOG

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: composer
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
- package-ecosystem: github-actions
8+
directory: /
9+
schedule:
10+
interval: weekly

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: CI
2+
on: [push, pull_request]
3+
jobs:
4+
test:
5+
runs-on: ubuntu-latest
6+
strategy:
7+
matrix:
8+
php: ['8.1', '8.2', '8.3', '8.4']
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: shivammathur/setup-php@v2
12+
with:
13+
php-version: ${{ matrix.php }}
14+
- run: composer install --prefer-dist --no-interaction
15+
- run: composer cs
16+
- run: composer stan
17+
- run: composer test

.gitignore

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/vendor/
2-
/tmp/
2+
/composer.lock
3+
/.phpunit.cache/
4+
/build/
35
/cache/
4-
/.idea/
5-
/.vscode/
6-
composer.lock
6+
/coverage/
7+
.DS_Store
8+
.idea/

CHANGELOG.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
# Changelog
22

3-
## v2.0.0 – 2025-10-07
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [3.0.0] - 2025-10-09
48
### Added
5-
- File locking for thread-safe writes
6-
- Per-key TTL support
7-
- Automatic expired cache cleanup
8-
- Input sanitization for keys
9-
- Optional compression and logging
10-
- PHPUnit test suite
11-
- Composer autoload support
9+
- Full **PSR‑16** implementation with multi‑key operations.
10+
- Multi‑backend tiers: **APCu, Redis, File, PDO (MySQL/PostgreSQL/SQLite)**.
11+
- **Full SWR**: `getOrSetSWR()` with *stale‑while‑revalidate* and *stale‑if‑error*, non‑blocking per‑key locks, and `defer` mode.
12+
- **Pluggable Serializer/Compressor**: `NativeSerializer` & `JsonSerializer`; `Null/Gzip/Zstd`.
13+
- **Backfill**: hits from lower tiers are written back to faster tiers.
14+
- **Laravel Service Provider** with auto‑discovery, `EasyCache` Facade, and `config/easycache.php`.
15+
- Atomic file writes + read locks; directory sharding for file backend.
16+
17+
### Changed
18+
- Record header upgraded to **EC02**; serializer and compressor names are stored for forward compatibility.
1219

13-
### Improved
14-
- Modular structure for easier extension (e.g., Redis backend)
15-
- Better error handling
16-
- More robust README with usage examples
20+
### Fixed
21+
- Eliminated race conditions on file writes with `tmp + rename` and read/write locks.

0 commit comments

Comments
 (0)