Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 5facac4

Browse files
committed
Add $glossaryId to translate-Function as requested by @larzuk91 and @KaiOnGitHub
Add PHP 8.1 to composer.json and travis.yml
1 parent fbca545 commit 5facac4

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ matrix:
55
- php: 7.3
66
- php: 7.4
77
- php: 8.0
8+
- php: 8.1
89
- php: nightly
910
allow_failures:
1011
- php: nightly

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
}
2020
],
2121
"require": {
22-
"php": ">=7.3 <8.1",
22+
"php": ">=7.3 <8.2",
2323
"ext-json": "*",
2424
"ext-curl": "*"
2525
},

src/DeepL.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public function languages($type = null)
6464
* @param array|null $nonSplittingTags
6565
* @param null $outlineDetection
6666
* @param array|null $splittingTags
67+
* @param string|null $glossaryId
6768
*
6869
* @return array
6970
*
@@ -82,7 +83,8 @@ public function translate(
8283
$preserveFormatting = null,
8384
array $nonSplittingTags = null,
8485
$outlineDetection = null,
85-
array $splittingTags = null
86+
array $splittingTags = null,
87+
string $glossaryId = null
8688
) {
8789
if (is_array($tagHandling)) {
8890
throw new InvalidArgumentException('$tagHandling must be of type String in V2 of DeepLLibrary');
@@ -99,6 +101,7 @@ public function translate(
99101
'split_sentences' => $splitSentences,
100102
'preserve_formatting' => $preserveFormatting,
101103
'outline_detection' => $outlineDetection,
104+
'glossary_id' => $glossaryId
102105
);
103106

104107
$paramsArray = $this->removeEmptyParams($paramsArray);

0 commit comments

Comments
 (0)