deeplcom/deepl-php
Official PHP client for the DeepL translation API. Send text and documents for high-quality translation from PHP 7.3+ applications, with full API support and simple Composer installation.
Architecture fit
deeplcom/deepl-php is an official, framework-agnostic PHP SDK, not a Laravel package. It provides a DeepLClient for text translation, document translation, rephrasing, glossaries, and related API features, but no service provider, config publishing, facade, queue integration, or Laravel-native HTTP abstraction.TranslationService interface with a DeepL adapter. This isolates vendor coupling, simplifies testing, and preserves an exit path if a second provider is later required.Integration feasibility
composer require deeplcom/deepl-php. No database migrations or frontend assets.ext-curl/ext-json and outbound HTTPS egress from app and queue workers.config/deepl.php, a singleton binding for DeepLClient, optional facade, exception translation, structured logging, and a queued document-translation job..env or a secrets manager, never in source control, and restrict who can read production configuration.Technical risk
billedCharacters on text results, which should be captured for metering, tenant attribution, and budget alarms.DocumentTranslationException may include a document handle that allows recovery or cleanup; without handling, orphaned uploads and duplicate costs are possible.Key questions
Stack fit
DeepLClient instance. Avoid constructing clients per request unless tenant-specific keys require it.Migration path
TranslationService contract with methods such as translateText, translateBatch, and translateDocument. Implement DeepLTranslationService as the first adapter.Compatibility
TranslationService boundary rather than attempting to mock internals.Sequencing
DeepLClient binding.TranslationService adapter and map SDK exceptions to domain exceptions.billedCharacters, plus rate limiting and retry policy.Maintenance
composer audit and dependency updates on the normal cadence.Support
Scaling
Failure modes
billedCharacters, set budget alerts, and define whether to queue, fallback, or show source text.Ramp-up
How can I help you explore Laravel packages today?