PHP Package: symfony/security-csrf

Symfony Security CSRF component provides Cross-Site Request Forgery protection for PHP applications using token-based security.

Current Version: 7.3.0
Last Updated: 2025-05-29
PHP Requirement: >=8.2
Dependencies:
symfony/security-core
⚠️ To ensure full functionality, the above dependencies might be required.

Package Description

Symfony Security CSRF component is a powerful tool that safeguards PHP web applications against CSRF attacks by generating and validating unique tokens. It seamlessly integrates with Symfony's security system, ensuring a secure user experience. With customizable token generation and validation, this component enhances the overall security posture of Symfony applications.

📦 Show all available classes🔗 View on GitHub

Download Latest Version: 7.3.0

Download Download v7.3.0

Previous Versions

Code Integration Example

Make sure to include the correct namespace and class paths for proper usage.

<?php
// Example from PHPlibraries.com
require_once 'libs/symfony/security-csrf/7.3.0/loader.php';
require_once 'libs/symfony/security-core/7.3.0/loader.php';

use Symfony\Component\Security\Core\Csrf\CsrfToken;
use Symfony\Component\Security\Core\Csrf\CsrfTokenManagerInterface;

$obj = new CsrfToken();
echo '✅ Test OK: ' . get_class($obj);
?>

We aim to make using PHP packages easier without Composer. If something doesn't work, let us know — we'll fix it promptly.

Community Discussion

Ask questions, share tips, or report issues below.