NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #4079 most downloaded on Packagist
Slim Framework 4 CSRF protection PSR-15 middleware
Latest stable
1.5.1
Last release 1 years ago
02 Nov 2025
Release timing varies
gaps range from 1 weeks to 1.8 years
Some releases are documented
notes for 13 of 22 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
22 releases · first in 2015
Drag across the ruler to compare, or tap a release to open it.
Support PHP 8.4 & 8.5 by @akrabat in https://github.com/slimphp/Slim-Csrf/pull/195
Full Changelog: https://github.com/slimphp/Slim-Csrf/compare/1.5.0...1.5.1
Bump psr/http-message requirement from '^1.0' to '^1.0 || ^2.0' by @odan in https://github.com/slimphp/Slim-Csrf/pull/184
Full Changelog: https://github.com/slimphp/Slim-Csrf/compare/1.4.0...1.5.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Update phpspec/prophecy requirement from ^1.15 to ^1.16 by @dependabot in https://github.com/slimphp/Slim-Csrf/pull/167
Full Changelog: https://github.com/slimphp/Slim-Csrf/compare/1.3.0...1.4.0
133: Upgrade to GitHub-native Dependabot thanks to @dependabot-preview[bot]
Total issues resolved: 13
This release makes using an Interator for the backing storage much better.
This release makes using an Interator for the backing storage much better.
Total issues resolved: 3
129: Support PHP 8 and remove 7.1 and 7.2 thanks to @akrabat
Total issues resolved: 1
Note that this release includes a fix for replay attacks when using Slim-Csrf in non-persistent mode. Upgrading to this version is recommended.
Note that this release includes a fix for replay attacks when using Slim-Csrf in non-persistent mode. Upgrading to this version is recommended.
Total issues resolved: 10
remoteTokenFromStorage() is now public105: PSR-15 Support thanks to @l0gicgate
Total issues resolved: 1
87: Widen random_compat constraint to include versions 9.99.X thanks to @ethanbray
Total issues resolved: 1
68: just adding sixth constructor param to phpdoc
61: Document sample Twig deployment
Total issues resolved: 2
55: Validate storage when invoked. Allow other middlewares to start session.
Added: Now supports "persistence mode", to persist a single CSRF name/value pair throughout the life of a user's session. Added the following methods:
protected getLastKeyPair - gets the most recently generated key/value pair from storage.protected loadLastKeyPair - gets the most recently generated key/value pair from storage, and assign it to $this->keyPair.public setPersistentTokenModepublic getPersistentTokenModeNote that if CSRF token validation fails, then the token should be renewed regardless of the persistence setting.
The methods getTokenName and getTokenValue now return null if $this->keyPair has not yet been set.
56: Allow paragonie/random_compat 2.0.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.