PackageTrack
Sign in Get early access

slim/csrf

Slim Framework 4 CSRF protection PSR-15 middleware

1.5.1 2.2M downloads/mo #4315 most downloaded on Packagist slimphp/Slim-Csrf

What this package is like to depend on

Last release 9 months ago

02 Nov 2025

Release timing varies

gaps range from 1 weeks to 1.8 years

Some releases are documented

notes for 12 of 22 stable releases

Nothing withdrawn

no release was ever pulled

11 years old

22 releases · first in 2015

1 release in the last 12 months

see the full history below

Release timeline

22 releases · Mar 2015 to Nov 2025
2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 22
  1. 1.5.1 02 Nov 2025
    Release notes

    What's Changed

    Full Changelog: 1.5.0...1.5.1

    Open source →
    Release notes
    • Added: Support for PHP 8.4 and 8.5
    Open source →
  2. 1.5.0 08 Jun 2024
    Release notes

    What's Changed

    • Bump psr/http-message requirement from '^1.0' to '^1.0 || ^2.0' by @odan in #184
    • Support PHP 8.2 and 8.3 by @akrabat in #177

    New Contributors

    • @odan made their first contribution in #184

    Full Changelog: 1.4.0...1.5.0

    Open source →
    Release notes
    • Added: Support for PHP 8.2 and 8.3
    • Added: Support for psr/http-message 2.0 in addition to 1.0
    Open source →
  3. 1.4.0 22 Jan 2024
    Release notes

    What's Changed

    • Update phpspec/prophecy requirement from ^1.15 to ^1.16 by @dependabot in #167
    • Update phpspec/prophecy requirement from ^1.16 to ^1.17 by @dependabot in #169
    • Update phpunit/phpunit requirement from ^9.5 to ^9.6 by @dependabot in #170
    • Update phpspec/prophecy-phpunit requirement from ^2.0 to ^2.1 by @dependabot in #172
    • Update squizlabs/php_codesniffer requirement from ^3.7 to ^3.8 by @dependabot in #173
    • Update phpspec/prophecy requirement from ^1.17 to ^1.18 by @dependabot in #174
    • Allow tokens via header by @blizzz in #175

    New Contributors

    Full Changelog: 1.3.0...1.4.0

    Open source →
    Release notes
    • Added: Allow to set token name and value in header
    Open source →
  4. 1.3.0 05 Nov 2022
    Release notes Open source →
    Release notes
    • Added: Support for PSR-12
    • Added: Add XOR to token to avoid BREACH attack
    • Change: PHP 7.3 is no longer supported
    Open source →
  5. 1.2.1 04 Feb 2021
    Release notes

    This release makes using an Interator for the backing storage much better.

    Total issues resolved: 3

    Open source →
    Release notes
    • Added: Implement iterator support for getLastKeyPair
    Open source →
  6. 1.2.0 18 Jan 2021
    Release notes

    Total issues resolved: 1

    Open source →
    Release notes
    • Added: Support PHP 8
    • Changed: Remove support for PHP 7.1 and 7.2
    Open source →
  7. 1.1.0 08 Jan 2021
    Release notes Open source →
    Release notes
    • Changed: remoteTokenFromStorage() is now public
    • Changed: Don't allow token in the body of a GET request
    • Fixed: Prevent replay attack by removing token on valdiation
    Open source →
  8. 1.0.0 13 Sep 2019
    Release notes

    Total issues resolved: 1

    Open source →
    Release notes
    • Added: PSR-15 support
    Open source →
  9. 0.8.3 22 Aug 2018
    Release notes Open source →
    Release notes
    • Fixed: Widen random_compat constraint in composer.json
    Open source →
  10. 0.8.2 14 Oct 2017
    Release notes Open source →
    Release notes
    • Fixed: Attach token name and value to request when persist mode is on
    Open source →
  11. 0.8.1 20 Dec 2016
    Release notes
    • Fixed: Default stroageis now $_SESSION again
    Open source →
  12. 0.8.0 06 Dec 2016
    Release notes
    • 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 setPersistentTokenMode
      • public getPersistentTokenMode

      Note 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.

    Open source →
  13. 0.7.0 08 Jun 2016

    Nothing published for this version

  14. 0.6.0 22 Dec 2015

    Nothing published for this version

  15. 0.5.0 09 Nov 2015

    Nothing published for this version

  16. 0.4.0 04 Sep 2015

    Nothing published for this version

  17. 0.3.3 18 Aug 2015

    Nothing published for this version

  18. 0.3.2 17 Aug 2015

    Nothing published for this version

  19. 0.3.1 16 Aug 2015

    Nothing published for this version

  20. 0.3.0 16 Aug 2015

    Nothing published for this version

  21. 0.2.0 16 Aug 2015

    Nothing published for this version

  22. 0.1.0 31 Mar 2015

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive