PHPackages                             datadome/fraud-sdk-symfony - 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. datadome/fraud-sdk-symfony

ActiveLibrary

datadome/fraud-sdk-symfony
==========================

DataDome Fraud Protection for Symfony PHP applications

1.2.0(2mo ago)132.7k↓14.4%1proprietaryPHPPHP ^8.1CI failing

Since Nov 2Pushed 2mo ago3 watchersCompare

[ Source](https://github.com/DataDome/fraud-sdk-symfony-package)[ Packagist](https://packagist.org/packages/datadome/fraud-sdk-symfony)[ RSS](/packages/datadome-fraud-sdk-symfony/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (9)Used By (1)

DataDome Fraud Protection - PHP Symfony integration
===================================================

[](#datadome-fraud-protection---php-symfony-integration)

Module for supporting DataDome Fraud Protection in Symfony PHP applications.

Installation
------------

[](#installation)

This package can be installed through composer by running the following command:

```
composer require datadome/fraud-sdk-symfony

```

Then proceed to run the below command to generate an autoloader containing the main class and options:

```
composer dump-autoload

```

Usage
-----

[](#usage)

Update the .env files with your preferred configuration. Please note that the `DATADOME_FRAUD_API_KEY` is mandatory, while the other two settings are optional.

```
DATADOME_FRAUD_API_KEY=my-datadome-client-side-sdk-key
DATADOME_TIMEOUT=1500
DATADOME_ENDPOINT='https://account-api.datadome.co'

```

To make use of the DataDome SDK in your controller, first add the required imports:

```
use DataDome\FraudSdkSymfony\Config\DataDomeOptions;
use DataDome\FraudSdkSymfony\DataDome;
use DataDome\FraudSdkSymfony\Models\Address;
use DataDome\FraudSdkSymfony\Models\LoginEvent;
use DataDome\FraudSdkSymfony\Models\StatusType;
use DataDome\FraudSdkSymfony\Models\RegistrationEvent;
use DataDome\FraudSdkSymfony\Models\Session;
use DataDome\FraudSdkSymfony\Models\User;
use DataDome\FraudSdkSymfony\Models\ResponseAction;
```

Then proceed to create a private DataDome object as follows:

```
$key = $_ENV['DATADOME_FRAUD_API_KEY'];
$timeout = $_ENV['DATADOME_TIMEOUT'];
$endpoint = $_ENV['DATADOME_ENDPOINT'];

$options = new DataDomeOptions($key, $timeout, $endpoint);
$this->dataDome = new DataDome($options);
```

Finally, invoke the validate and collect methods as required:

```
if ($this->validateLogin("account_guid_to_check")) {
    $loginEvent = new LoginEvent("account_guid_to_check", StatusType::Succeeded);
    $loginResponse = $this->dataDome->validate($request, $loginEvent);

    if ($loginResponse != null && $loginResponse->action == ResponseAction::Allow->jsonSerialize()) {
        // Valid login attempt
        return new JsonResponse([true]);
    } else {
        // Business Logic here
        // MFA
        // Challenge
        // Notification email
        // Temporarily lock account
        return new JsonResponse(["Login denied"]);
    }
}
else {
    $loginEvent = new LoginEvent("account_guid_to_check", StatusType::Failed);
    $this->dataDome->collect($request, $loginEvent);
}
```

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance84

Actively maintained with recent releases

Popularity30

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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 ~120 days

Recently: every ~195 days

Total

8

Last Release

82d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ad5c2a41354a3e2930711510557fe37e34a17f91740755f4ca73c109a2f0a3da?d=identicon)[datadome](/maintainers/datadome)

---

Top Contributors

[![actions-user](https://avatars.githubusercontent.com/u/65916846?v=4)](https://github.com/actions-user "actions-user (6 commits)")[![datadome-integrations-release[bot]](https://avatars.githubusercontent.com/in/1034200?v=4)](https://github.com/datadome-integrations-release[bot] "datadome-integrations-release[bot] (4 commits)")[![darahak-datadome](https://avatars.githubusercontent.com/u/88320149?v=4)](https://github.com/darahak-datadome "darahak-datadome (2 commits)")

---

Tags

fraudphpsdksymphony

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/datadome-fraud-sdk-symfony/health.svg)

```
[![Health](https://phpackages.com/badges/datadome-fraud-sdk-symfony/health.svg)](https://phpackages.com/packages/datadome-fraud-sdk-symfony)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)

PHPackages © 2026

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