PHPackages                             silverback/iubenda-consent-solution - 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. [API Development](/categories/api)
4. /
5. silverback/iubenda-consent-solution

ActiveLibrary[API Development](/categories/api)

silverback/iubenda-consent-solution
===================================

PHP client for Iubenda Consent Solution HTTP API

1.0.0(7y ago)04811[1 PRs](https://github.com/silverbackstudio/php-iubenda-consent-solution/pulls)BSD-3-ClausePHPPHP &gt;=5.6

Since Jul 24Pushed 4y ago1 watchersCompare

[ Source](https://github.com/silverbackstudio/php-iubenda-consent-solution)[ Packagist](https://packagist.org/packages/silverback/iubenda-consent-solution)[ RSS](/packages/silverback-iubenda-consent-solution/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

Iubenda Consent Solution PHP client library
===========================================

[](#iubenda-consent-solution-php-client-library)

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

[](#installation)

Install this package in Yii project root with [Composer](https://getcomposer.org/).

`composer require silverback/iubenda-consent-solution`

Usage
-----

[](#usage)

### Create a new consent

[](#create-a-new-consent)

```
use Iubenda\ConsentSolution\Client;
use Iubenda\ConsentSolution\Consent;

$consentSolution = new ConsentSolution\Client( 'your-private-api-key' );
$consent = new ConsentSolution\Consent;

$user_id = 10;

$consent->setSubject(
    [
        'id' => sha1( 'my_application_' . $user_id ), // you can omit this field
        'email' => 'user@example.com',
        'first_name' => 'John',
        'last_name' => 'Doe',
        'full_name' => 'John Doe',
        'verified' => false
    ]
);

$consent->addLegalNotice( [ 'identifier' => 'privacy_policy' ] );

$consent->addProof( [
    'content' => json_encode( [
        'first_name' => 'John',
        'last_name' => 'Doe',
        // other useful form fields
    ] ),
    'form' => '[...]',
] );

$consent->preferences['privacy_policy'] = true;
$consent->preferences['third_party'] = false;
$consent->preferences['newsletter'] = true;

try {
    $saved_consent = $consentSolution->createConsent( $consent );
    echo "Successfully saved consent: " . $saved_consent->id;
} catch (\Exception $e) {
    echo "An error occurred: " . $e->getMessage();
}
```

Testing
-------

[](#testing)

This class uses [PHPUnit](https://phpunit.de/) as test suite, to test the classes and functions follow this steps.

Copy the file `phpunit.xml.dist` in `phpunit.xml` in the library folder and define Api-Key and addresses inside it:

```

        ...

```

Launch a `composer update` to install all the dependencies and test suite.

Run the test with the following commands

```
./vendor/bin/phpunit  tests/  # all tests
./vendor/bin/phpunit  tests/ClientTest # single test
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

2853d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7a82a47436ceac89bbaeb95a8367354273e56082b8bbbaa8c50ababaf6032d77?d=identicon)[brandomeniconi](/maintainers/brandomeniconi)

---

Tags

phpclientgdpriubendaconsent-solutionpsr3-log

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/silverback-iubenda-consent-solution/health.svg)

```
[![Health](https://phpackages.com/badges/silverback-iubenda-consent-solution/health.svg)](https://phpackages.com/packages/silverback-iubenda-consent-solution)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69333.0M114](/packages/algolia-algoliasearch-client-php)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[resend/resend-php

Resend PHP library.

564.7M21](/packages/resend-resend-php)[mozex/anthropic-laravel

Anthropic PHP for Laravel is a supercharged PHP API client that allows you to interact with the Anthropic API

71226.4k1](/packages/mozex-anthropic-laravel)[optiosteam/payconiq-client-php

Payconiq API client library for PHP developed by Optios.

1273.4k](/packages/optiosteam-payconiq-client-php)

PHPackages © 2026

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