Download the PHP package tourze/cloudflare-dns-bundle without Composer
On this page you can find all versions of the php package tourze/cloudflare-dns-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package cloudflare-dns-bundle
Cloudflare DNS Bundle
中文
A comprehensive Symfony bundle for managing Cloudflare DNS records, domains, and analytics with full ORM support, CLI tools, and EasyAdmin integration.
Table of Contents
- Features
- Requirements
- Installation
- Configuration
- Quick Start
- 1. Add IAM Key
- 2. Sync Domains
- 3. Manage DNS Records
- 4. Analytics
- Service Usage
- Entities
- CLI Commands
- Admin Interface
- Event System
- Advanced Features
- Testing
- Contributing
- License
Features
- Complete DNS Management: Create, update, delete, and sync DNS records with Cloudflare API
- Domain Synchronization: Sync domains between Cloudflare and local database
- Analytics Integration: Fetch and store DNS query analytics data
- Multi-Account Support: Manage multiple Cloudflare accounts with IAM key management
- EasyAdmin Integration: Full CRUD operations with admin UI
- Batch Operations: Support for bulk DNS record operations
- CLI Tools: Comprehensive command-line tools for all operations
- Event System: Pre/post sync events for custom business logic
- Audit Trail: Automatic tracking of created/updated timestamps
Installation
Requirements
- PHP >= 8.1
- Symfony >= 7.3
- Doctrine ORM >= 3.0
- Cloudflare account with API credentials
Install via Composer
Configuration
Bundle Registration
The bundle and its dependencies will be automatically registered if using Symfony Flex. Otherwise, add to your config/bundles.php:
Database Setup
-
Update your database schema:
- Load initial data fixtures (optional):
Quick Start
1. Add IAM Key
First, add your Cloudflare API credentials to the database:
2. Sync Domains
3. Manage DNS Records
4. Analytics
Service Usage
DNS Record Service
Domain Service
Entities
DnsDomain
Represents a domain managed in Cloudflare:
name: Domain name (e.g., example.com)zoneId: Cloudflare Zone IDstatus: Domain status (active, pending, etc.)iamKey: Associated IAM key
DnsRecord
Represents a DNS record:
domain: Associated domaintype: Record type (A, AAAA, CNAME, MX, TXT, NS, URI)record: Full record namecontent: Record valuettl: Time to liveproxy: Whether Cloudflare proxy is enabledrecordId: Cloudflare record ID
IamKey
Stores Cloudflare API credentials:
name: Descriptive nameemail: Cloudflare account emailaccessKey: API keyaccountId: Cloudflare account ID
DnsAnalytics
Stores DNS query analytics:
domain: Associated domainqueryCount: Number of queriesqueryName: Queried hostnamequeryType: DNS query typeresponseCode: DNS response codedatetime: Analytics timestamp
CLI Commands
| Command | Description |
|---|---|
cloudflare:sync-domains |
Sync domains from Cloudflare |
cloudflare:sync-domain-info |
Update domain zone information |
cloudflare:sync-domain-record-to-local |
Sync DNS records from Cloudflare to local DB |
cloudflare:sync-dns-domain-record-to-remote |
Sync DNS records from local DB to Cloudflare |
cloudflare:sync-dns-analytics |
Sync DNS analytics data |
Admin Interface
The bundle provides EasyAdmin CRUD controllers for all entities:
- DnsDomainCrudController: Manage domains
- DnsRecordCrudController: Manage DNS records
- IamKeyCrudController: Manage API credentials
- DnsAnalyticsCrudController: View analytics data
Access via your EasyAdmin dashboard configuration.
Event System
The bundle dispatches events during sync operations:
Advanced Features
Batch Operations
The bundle supports batch operations via the Cloudflare API:
Message Queue Integration
Async operations are supported via Symfony Messenger:
SyncDnsDomainsFromRemoteMessage: Async domain syncSyncDnsRecordToRemoteMessage: Async DNS record sync
Service Layer Architecture
- BaseCloudflareService: Abstract base for all services
- DomainSynchronizer: Handles single domain sync
- DomainBatchSynchronizer: Handles bulk domain operations
- CloudflareHttpClient: Low-level API client with logging
Testing
The bundle includes comprehensive test coverage:
Contributing
Contributions are welcome! Please:
- Follow PSR-12 coding standards
- Add tests for new features
- Update documentation as needed
- Submit a pull request
License
MIT License. See LICENSE for more information.
All versions of cloudflare-dns-bundle with dependencies
ext-date Version *
ext-json Version *
doctrine/collections Version ^2.3
doctrine/data-fixtures Version ^2.0
doctrine/dbal Version ^4.0
doctrine/doctrine-bundle Version ^2.13
doctrine/doctrine-fixtures-bundle Version ^4.0
doctrine/orm Version ^3.0
doctrine/persistence Version ^4.1
easycorp/easyadmin-bundle Version ^4
knplabs/knp-menu Version ^3.7
monolog/monolog Version ^3.1
psr/log Version ^3|^2|^1
symfony/config Version ^7.3
symfony/console Version ^7.3
symfony/dependency-injection Version ^7.3
symfony/doctrine-bridge Version ^7.3
symfony/form Version ^7.3
symfony/framework-bundle Version ^7.4
symfony/http-client Version ^7.3
symfony/http-client-contracts Version ^3.6
symfony/http-foundation Version ^7.4
symfony/http-kernel Version ^7.3
symfony/messenger Version ^7.3
symfony/property-access Version ^7.3
symfony/serializer Version ^7.3
symfony/twig-bundle Version ^7.3
symfony/yaml Version ^7.3
tourze/bundle-dependency Version 1.*
tourze/ddns-contracts Version 0.0.*
tourze/doctrine-indexed-bundle Version 1.0.*
tourze/doctrine-timestamp-bundle Version 1.1.*
tourze/doctrine-track-bundle Version 1.1.*
tourze/doctrine-user-bundle Version 1.0.*
tourze/easy-admin-menu-bundle Version 1.0.*
tourze/enum-extra Version 1.0.*
tourze/symfony-dependency-service-loader Version 1.0.*