PHPackages                             spiral/csrf - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. spiral/csrf

ActiveLibrary

spiral/csrf
===========

Spiral Framework: CSRF Middleware

3.16.1(2mo ago)07.1k1MITPHPPHP &gt;=8.1CI failing

Since Jun 7Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/spiral/csrf)[ Packagist](https://packagist.org/packages/spiral/csrf)[ Docs](https://spiral.dev)[ GitHub Sponsors](https://github.com/sponsors/spiral)[ RSS](/packages/spiral-csrf/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (8)Versions (88)Used By (0)

Spiral Framework: CSRF Middleware
=================================

[](#spiral-framework-csrf-middleware)

[![PHP Version Require](https://camo.githubusercontent.com/7273493b27792aa31ce0e33d2ba9003b47b448c831dc84726cb73da1aed25d21/68747470733a2f2f706f7365722e707567782e6f72672f73706972616c2f637372662f726571756972652f706870)](https://packagist.org/packages/spiral/csrf)[![Latest Stable Version](https://camo.githubusercontent.com/8159c100051a07e9290276a372a11a94ebc05a4cc3de807e4badc7910b83f30d/68747470733a2f2f706f7365722e707567782e6f72672f73706972616c2f637372662f762f737461626c65)](https://packagist.org/packages/spiral/csrf)[![phpunit](https://github.com/spiral/csrf/actions/workflows/phpunit.yml/badge.svg)](https://github.com/spiral/csrf/actions)[![psalm](https://github.com/spiral/csrf/actions/workflows/psalm.yml/badge.svg)](https://github.com/spiral/csrf/actions)[![Codecov](https://camo.githubusercontent.com/62c58f08518f7e59fab8c05e55c6f8cb59ca8a1a556aae85474b4d0274685256/68747470733a2f2f636f6465636f762e696f2f67682f73706972616c2f637372662f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/spiral/csrf/)[![Total Downloads](https://camo.githubusercontent.com/024a03d7c39b60bae7a84745b407cbbf8ddd8da94de1691fa51e429f3c8b3095/68747470733a2f2f706f7365722e707567782e6f72672f73706972616c2f637372662f646f776e6c6f616473)](https://packagist.org/packages/spiral/csrf)[![type-coverage](https://camo.githubusercontent.com/f8a768c3e935a5111e1c6a7e7497a549cfb83ede65894c8cc8943f332a62a671/68747470733a2f2f73686570686572642e6465762f6769746875622f73706972616c2f637372662f636f7665726167652e737667)](https://shepherd.dev/github/spiral/csrf)[![psalm-level](https://camo.githubusercontent.com/8ad0ff71b432f2a3e3300ebc9a89105a149cdfa2dfdf059b4b69387bacf761c1/68747470733a2f2f73686570686572642e6465762f6769746875622f73706972616c2f637372662f6c6576656c2e737667)](https://shepherd.dev/github/spiral/csrf)[![](https://camo.githubusercontent.com/4442b73a11753b80fdd7b442ddbfaf8383902c8b9ffa66ed1718e8c62e102f2e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646973636f72642d636861742d6d6167656e74612e737667)](https://discord.gg/8bZsjYhVVk)

**[Documentation](https://spiral.dev/docs/http-csrf)** | [Framework Bundle](https://github.com/spiral/framework)

License:
--------

[](#license)

MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maintained by [Spiral Scout](https://spiralscout.com).

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance84

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity84

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 83.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~29 days

Recently: every ~82 days

Total

85

Last Release

81d ago

Major Versions

v1.1.0 → v2.6.02020-09-02

2.14.1 → 3.0.02022-09-13

PHP version history (5 changes)v1.0.0PHP ^7.1

v1.1.0PHP ^7.2

2.7.0PHP &gt;=7.2

2.10.0PHP &gt;=7.4

3.0.0PHP &gt;=8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/796136?v=4)[Anton Tsitou](/maintainers/wolfy-j)[@wolfy-j](https://github.com/wolfy-j)

---

Top Contributors

[![spiralbot](https://avatars.githubusercontent.com/u/100867204?v=4)](https://github.com/spiralbot "spiralbot (121 commits)")[![SerafimArts](https://avatars.githubusercontent.com/u/2461257?v=4)](https://github.com/SerafimArts "SerafimArts (17 commits)")[![butschster](https://avatars.githubusercontent.com/u/773481?v=4)](https://github.com/butschster "butschster (3 commits)")[![roxblnfk](https://avatars.githubusercontent.com/u/4152481?v=4)](https://github.com/roxblnfk "roxblnfk (2 commits)")[![samsonasik](https://avatars.githubusercontent.com/u/459648?v=4)](https://github.com/samsonasik "samsonasik (2 commits)")

---

Tags

csrfmiddlewarepsr15spiral

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/spiral-csrf/health.svg)

```
[![Health](https://phpackages.com/badges/spiral-csrf/health.svg)](https://phpackages.com/packages/spiral-csrf)
```

###  Alternatives

[cakephp/cakephp

The CakePHP framework

8.8k18.5M1.6k](/packages/cakephp-cakephp)[cycle/orm

PHP DataMapper ORM and Data Modelling Engine

1.3k835.4k65](/packages/cycle-orm)[thecodingmachine/graphqlite

Write your GraphQL queries in simple to write controllers (using webonyx/graphql-php).

5723.1M30](/packages/thecodingmachine-graphqlite)[cakephp/authentication

Authentication plugin for CakePHP

1153.6M67](/packages/cakephp-authentication)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[cakephp/authorization

Authorization abstraction layer plugin for CakePHP

742.2M34](/packages/cakephp-authorization)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
