PHPackages                             tourze/tencent-cloud-dns-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tourze/tencent-cloud-dns-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

tourze/tencent-cloud-dns-bundle
===============================

腾讯云DNS域名解析服务Symfony Bundle集成

1.0.1(6mo ago)00MITPHPCI passing

Since Nov 4Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/tourze/tencent-cloud-dns-bundle)[ Packagist](https://packagist.org/packages/tourze/tencent-cloud-dns-bundle)[ RSS](/packages/tourze-tencent-cloud-dns-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (45)Versions (3)Used By (0)

Tencent Cloud DNS Bundle
========================

[](#tencent-cloud-dns-bundle)

[![Latest Version](https://camo.githubusercontent.com/3ea3d82910b03e64ca9fd1554254d80c6631941a175bbb6fc3383e8a15d4a32a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f75727a652f74656e63656e742d636c6f75642d646e732d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/tencent-cloud-dns-bundle)[![Total Downloads](https://camo.githubusercontent.com/99cc583a3138edf7ba1ee450ba640e06e840465dcc3ddf944f37c3466e055a56/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f75727a652f74656e63656e742d636c6f75642d646e732d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/tencent-cloud-dns-bundle)[![PHP Version](https://camo.githubusercontent.com/9c75e33a0e58c6344535c1a21bdc879d607f6922c3e1ba7efabe55d7bd0af788/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f746f75727a652f74656e63656e742d636c6f75642d646e732d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/tencent-cloud-dns-bundle)[![License](https://camo.githubusercontent.com/6111aacf709376e5abccffbade040b54830c636ac48a4378f36cecc4a5d973c4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f746f75727a652f74656e63656e742d636c6f75642d646e732d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/tencent-cloud-dns-bundle)[![Build Status](https://camo.githubusercontent.com/0346e18af1343d739d0405776c07b83798d5bb0200e3efcfdf657e5e662f6403/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f746f75727a652f7068702d6d6f6e6f7265706f2f63692e796d6c3f7374796c653d666c61742d737175617265)](https://github.com/tourze/php-monorepo/actions)[![Coverage Status](https://camo.githubusercontent.com/73ee3bab50824f778cedc6b4b3f78bcdab621eef812a979ec388b8ad692a4bff/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f746f75727a652f7068702d6d6f6e6f7265706f2e7376673f7374796c653d666c61742d737175617265)](https://codecov.io/gh/tourze/php-monorepo)

[English](README.md) | [中文](README.zh-CN.md)

A Symfony bundle that provides integration with Tencent Cloud DNS (DNSPod) service for managing domain records.

Features
--------

[](#features)

- Manage Tencent Cloud DNS accounts
- Create and manage DNS domains
- Create, update, and delete DNS records
- Synchronize DNS records between Tencent Cloud and local database
- Support for various DNS record types (A, MX, TXT, CNAME, NS, URI)
- Command line tools for DNS management

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- Symfony 7.3 or higher
- Doctrine ORM 3.0 or higher
- Tencent Cloud account with DNS service enabled

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

[](#installation)

```
composer require tourze/tencent-cloud-dns-bundle
```

The bundle uses Symfony's auto-configuration, so it will be automatically enabled once installed.

Configuration
-------------

[](#configuration)

This bundle doesn't require any specific configuration in your Symfony application. It uses Doctrine entities to store configuration and data.

Usage
-----

[](#usage)

### Setting up a Tencent Cloud Account

[](#setting-up-a-tencent-cloud-account)

Before using the DNS features, you need to add a Tencent Cloud account:

```
use TencentCloudDnsBundle\Entity\Account;

// Create a new account
$account = new Account();
$account->setName('My Tencent Cloud Account');
$account->setSecretId('your-secret-id'); // From Tencent Cloud Console
$account->setSecretKey('your-secret-key'); // From Tencent Cloud Console

// Save the account
$entityManager->persist($account);
$entityManager->flush();
```

### Managing Domains

[](#managing-domains)

```
use TencentCloudDnsBundle\Entity\DnsDomain;

// Create a new domain
$domain = new DnsDomain();
$domain->setName('example.com');
$domain->setAccount($account); // Link to your Tencent Cloud account

// Save the domain
$entityManager->persist($domain);
$entityManager->flush();
```

### Managing DNS Records

[](#managing-dns-records)

```
use TencentCloudDnsBundle\Entity\DnsRecord;
use TencentCloudDnsBundle\Enum\DnsRecordType;

// Create a new DNS record
$record = new DnsRecord();
$record->setDomain($domain); // Link to your domain
$record->setName('www'); // Subdomain
$record->setType(DnsRecordType::A);
$record->setValue('192.168.1.1'); // IP address for A record
$record->setTtl(600); // Time to live in seconds

// Save the record
$entityManager->persist($record);
$entityManager->flush();

// The record will be synchronized with Tencent Cloud DNS
```

### Synchronizing Records from Tencent Cloud

[](#synchronizing-records-from-tencent-cloud)

You can use the provided command to synchronize DNS records from Tencent Cloud to your local database:

```
bin/console tencent-cloud-dns:sync-domain-record-to-local
```

How It Works
------------

[](#how-it-works)

The bundle provides a set of Doctrine entities to store DNS configuration and records. It uses the Tencent Cloud SDK to communicate with the DNSPod API for creating, updating, and deleting DNS records.

The workflow is as follows:

1. Create an Account entity with your Tencent Cloud credentials
2. Create a DnsDomain entity linked to the account
3. Create DnsRecord entities linked to the domain
4. The bundle will automatically synchronize the records with Tencent Cloud DNS

Advanced Usage
--------------

[](#advanced-usage)

### Using the DNS Service

[](#using-the-dns-service)

You can inject the DNS service to programmatically manage DNS records:

```
use TencentCloudDnsBundle\Service\DnsService;

class MyDnsController
{
    public function __construct(private DnsService $dnsService)
    {
    }

    public function updateRecord(): Response
    {
        // Use the service to interact with Tencent Cloud DNS
        $result = $this->dnsService->updateRecord($record);
        // Handle the result
    }
}
```

### Custom Domain Parser

[](#custom-domain-parser)

The bundle includes a domain parser factory for handling domain validation:

```
use TencentCloudDnsBundle\Service\DomainParserFactory;

$parser = $this->domainParserFactory->create();
$domain = $parser->parse('example.com');
```

Security
--------

[](#security)

- **API Keys**: Store your Tencent Cloud API keys securely. Never commit them to version control.
- **Validation**: All entity properties include validation constraints to prevent invalid data.
- **Access Control**: Implement proper access control in your application to restrict DNS management operations.

### Security Best Practices

[](#security-best-practices)

1. Use environment variables for API credentials
2. Implement proper user authentication and authorization
3. Validate all user inputs before processing
4. Use HTTPS for all API communications
5. Regularly rotate your API keys

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to this project.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance66

Regular maintenance activity

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 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

Every ~44 days

Total

2

Last Release

198d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13899502?v=4)[tourze](/maintainers/tourze)[@tourze](https://github.com/tourze)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tourze-tencent-cloud-dns-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/tourze-tencent-cloud-dns-bundle/health.svg)](https://phpackages.com/packages/tourze-tencent-cloud-dns-bundle)
```

###  Alternatives

[sylius/sylius

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

8.5k5.9M737](/packages/sylius-sylius)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)[contao/core-bundle

Contao Open Source CMS

1231.6M2.8k](/packages/contao-core-bundle)

PHPackages © 2026

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