PHPackages                             edsi-tech/gandi-bundle - 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. edsi-tech/gandi-bundle

ActiveSymfony-bundle[API Development](/categories/api)

edsi-tech/gandi-bundle
======================

Gandi Bundle by EDSI-Tech for the Gandi V3 API

v1.2(8y ago)1342[1 issues](https://github.com/EDSI-Tech/GandiBundle/issues)PHPPHP ^5.4 || ^7.0

Since Jan 24Pushed 5y ago2 watchersCompare

[ Source](https://github.com/EDSI-Tech/GandiBundle)[ Packagist](https://packagist.org/packages/edsi-tech/gandi-bundle)[ RSS](/packages/edsi-tech-gandi-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

EDSI-Tech Gandi Bundle
======================

[](#edsi-tech-gandi-bundle)

Gandi API v3

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

[](#installation)

1. Install the bundle with composer

`composer require edsi-tech/gandi-bundle`

2. Register the Bundle

Add in your AppKernel.php `new EdsiTech\GandiBundle\EdsiTechGandiBundle(),`

3. Add the mandatory configurations options

In your app/config/config.yml :

```
 edsitech_gandi:
    server_url: "https://rpc.ote.gandi.net/xmlrpc/"
    api_key:
    default_nameservers:
        - dns1.edsi-tech.com
        - dns2.edsi-tech.com
        - dns3.edsi-tech.com
    default_handles:
        bill: XYZ-GANDI
        tech: XYZ-GANDI
        admin: XYZ-GANDI
        owner: XYZ-GANDI

```

Note that the test server is `https://rpc.ote.gandi.net/xmlrpc/` and the production server is `https://rpc.gandi.net/xmlrpc/`

Usage examples
--------------

[](#usage-examples)

### Get all domains names and expiration date

[](#get-all-domains-names-and-expiration-date)

```
$currentHandle = "MYHANDLE-GANDI";

$domainRepository = $this->get('edsitech_gandi.domain_repository');
$domains_api = $domainRepository->findBy(['handle' => $currentHandle]);
foreach($domains_api as $domain) {
    $fqdn = $domain->getFqdn();
    echo $fqdn.": ".$domain->getExpire()->format('Y-m-d')."\n";
}
```

### Get a domain name

[](#get-a-domain-name)

```
use EdsiTech\GandiBundle\Model\Domain;

$fqdn = "example.com";

$domainRepository = $this->get('edsitech_gandi.domain_repository');
$domain = $domainRepository->find($fqdn);

if($domain instanceof Domain) {
    print_r($domain);
}
```

### Get available extensions

[](#get-available-extensions)

```
$gandi = $this->get('edsitech_gandi.domain_availibility');
print_r($gandi->getExtensions());
```

### Check domain availibility

[](#check-domain-availibility)

```
$domain = "example.com";

$domainAPI = $this->get('edsitech_gandi.domain_availibility');
$domain = idn_to_ascii($domain); //needed for special chars domains

$result = $domainAPI->isAvailable([$domain]); //this is an array, you can pass multiple domains

print_r($result); //the result is also an array, the key is the domain name and the value is the result.
```

### Register a domain name

[](#register-a-domain-name)

```
use EdsiTech\GandiBundle\Model\Domain;
use EdsiTech\GandiBundle\Model\Contact;
use EdsiTech\GandiBundle\Model\Operation;
use EdsiTech\GandiBundle\Exception\APIException;

$fqdn = "example.com";
$myHandle = "XYZ-GANDI";

$domain = new Domain($fqdn);
$domain->setDuration(1) //years
       ->setAutorenew(true)
       ->setOwnerContact(new Contact($myHandle))
       ;
//others contact informations are taken from the default_handles config keys.

$domainRepository = $this->get('edsitech_gandi.domain_repository');

try {
    $result = $domainRepository->register($domain);

     if($result instanceof Operation) {

         echo "Operation in progress";

     }

 } catch (APIException $e) {

     $message = $e->getMessage();

     echo "Error: ".$message;

 }
```

### Transfer a domain name

[](#transfer-a-domain-name)

```
use EdsiTech\GandiBundle\Model\Operation;

$domain = "example.com";
$authcode = "test";

$domainRepository = $this->get('edsitech_gandi.domain_repository');
$result = $domainRepository->transfert($domain, $authcode);

if($result instanceof Operation) {
    echo "Operation in progress";
}

```

### Enable auto-renew

[](#enable-auto-renew)

```
use EdsiTech\GandiBundle\Exception\APIException;

$fqdn = "example.com";

$domainRepository = $this->get('edsitech_gandi.domain_repository');

$domain = $domainRepository->find($fqdn);

try {
    $domainRepository->enableAutorenew($domain);
} catch (APIException $e) {

    echo "That's an error";

}
```

### Disable lock on domain

[](#disable-lock-on-domain)

```
use EdsiTech\GandiBundle\Exception\APIException;

$fqdn = "example.com";

$domainRepository = $this->get('edsitech_gandi.domain_repository');

$domain = $domainRepository->find($fqdn);

try {
    $domain->setLock(false);
    $domainRepository->update($domain);

} catch (APIException $e) {

    echo "That's an error";

}
```

### Create a Symfony2 form for the contact

[](#create-a-symfony2-form-for-the-contact)

```
use EdsiTech\GandiBundle\Form\ContactType;
use EdsiTech\GandiBundle\Model\Contact;
use EdsiTech\GandiBundle\Exception\APIException;

$contactRepository = $this->get('edsitech_gandi.contact_repository');

$contact = $contactRepository->find($currentHandle);

$form = $this->createForm(new ContactType(), $contact);

//....

if ($form->isValid()) {

    try {

        $result = $contactRepository->persist($contact);

    } catch (APIException $e) {

		//...

    }
}
```

Disclamer
---------

[](#disclamer)

- The API requires some extras informations for specific tld that are not implemented in this bundle.
- The DNSSEC support is in development and not fully implemented.
- You may need to add a cache layer (like redis for instance) to the domain and extension lists as it take 10-15 seconds to get the results.

Testing
-------

[](#testing)

Run `bin/phpunit Tests/`

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

3036d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6e8d37633b647e4da17d1cd0d9371e01299a329d98bc01a271579bbe0e775f31?d=identicon)[galphanet](/maintainers/galphanet)

---

Top Contributors

[![galphanet](https://avatars.githubusercontent.com/u/897689?v=4)](https://github.com/galphanet "galphanet (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/edsi-tech-gandi-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/edsi-tech-gandi-bundle/health.svg)](https://phpackages.com/packages/edsi-tech-gandi-bundle)
```

###  Alternatives

[jacobsteringa/odoo-client

A PHP Client for Odoo

1324.1k](/packages/jacobsteringa-odoo-client)[narno/gandi-api

Simple PHP library for the Gandi API.

1622.3k](/packages/narno-gandi-api)[components-web-app/api-components-bundle

Creates a flexible API for a website's structure, reusable components and common functionality.

322.8k](/packages/components-web-app-api-components-bundle)

PHPackages © 2026

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