Skip to content

Commit bbfea66

Browse files
committed
[TASK] Switch to indirect web-vision/deeplcom-deepl-php client extension
Direct PHP API Client package dependency is now replaced with the indirect dependency using `web-vision/deeplcom-deepl-php` as shared extension allowing to have more then one extension released in TER requiring that dependency and bundling client package for TER uploade is removed along the way. Used command(s): ```shell BIN_COMPOSER="$(which composer)" && \ ${BIN_COMPOSER} remove --no-update \ 'deeplcom/deepl-php' && \ ${BIN_COMPOSER} require --no-update \ 'web-vision/deeplcom-deepl-php':'^1.12.0' ```
1 parent 61dbb7d commit bbfea66

File tree

6 files changed

+9
-46
lines changed

6 files changed

+9
-46
lines changed

.github/workflows/publish.yml

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ jobs:
1010
if: startsWith(github.ref, 'refs/tags/')
1111
runs-on: ubuntu-latest
1212
env:
13-
TYPO3_EXTENSION_KEY: ${{ secrets.TYPO3_EXTENSION_KEY }}
1413
TYPO3_API_TOKEN: ${{ secrets.TYPO3_API_TOKEN }}
1514
permissions:
1615
contents: write
@@ -63,32 +62,6 @@ jobs:
6362
extensions: intl, mbstring, json, zip, curl
6463
tools: composer:v2
6564

66-
- name: Prepare vendor folder and autoload configuration for TER upload
67-
shell: bash
68-
run: |
69-
rm -rf vendor composer.lock composer.json.orig composer.json.pretty \
70-
&& mv composer.json composer.json.orig \
71-
&& composer init -n \
72-
--type=project \
73-
--license='GPL-2.0-or-later' \
74-
--name=release/draft \
75-
--description empty \
76-
--author='release' \
77-
&& composer config allow-plugins.php-http/discovery true \
78-
&& composer require "deeplcom/deepl-php":"$( cat composer.json.orig | jq -r '.require."deeplcom/deepl-php"' )" \
79-
&& rm -rf composer.lock \
80-
vendor/composer \
81-
vendor/nyholm \
82-
vendor/php-http/multipart-stream-builder \
83-
vendor/psr \
84-
vendor/symfony \
85-
vendor/autoload.php \
86-
vendor/bin \
87-
&& cat <<< $(jq --indent 4 '."autoload"."psr-4" += {"DeepL\\": "vendor/deeplcom/deepl-php/src", "Http\\Discovery\\": "vendor/php-http/discovery/src"}' composer.json.orig) > composer.json.pretty \
88-
&& rm -rf composer.json \
89-
&& mv composer.json.pretty composer.json \
90-
&& rm -rf composer.json.orig
91-
9265
- name: Install tailor
9366
run: composer global require typo3/tailor --prefer-dist --no-progress --no-suggest
9467

@@ -103,7 +76,9 @@ jobs:
10376
# Note that when release already exists for tag, only files will be uploaded and lets this acting as a
10477
# fallback to ensure that a real GitHub release is created for the tag along with extension artifacts.
10578
- name: Create release and upload artifacts in the same step
106-
uses: softprops/action-gh-release@v2
79+
# @todo Revert to release version when https://github.com/softprops/action-gh-release/issues/628 is fixed.
80+
uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631
81+
# uses: softprops/action-gh-release@v2
10782
if: ${{startsWith(github.ref, 'refs/tags/') }}
10883
with:
10984
name: "[RELEASE] ${{ env.version }}"
@@ -114,13 +89,7 @@ jobs:
11489
LICENSE
11590
fail_on_unmatched_files: true
11691

117-
# @todo Currently an issue exists with the TYPO3 Extension Repository (TER) tailor based uploads, which seems to
118-
# be WAF related and the T3O TER Team working on. Allow this step to fail (continue on error) for now until
119-
# issues has been sorted out.
120-
# https://github.com/TYPO3/tailor/issues/82
12192
- name: Publish to TER
122-
# @todo Remove `continue-on-error` after upload with tailor has been fixed.
123-
continue-on-error: true
12493
run: |
12594
php ~/.composer/vendor/bin/tailor ter:publish --comment "${{ env.terReleaseNotes }}" ${{ env.version }} \
12695
--artefact=tailor-version-artefact/${{ env.DETECTED_EXTENSION_KEY }}_${{ env.version }}.zip

Tests/Functional/AbstractDeepLTestCase.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ abstract class AbstractDeepLTestCase extends FunctionalTestCase
111111
*/
112112
protected array $testExtensionsToLoad = [
113113
'web-vision/deepl-base',
114+
'web-vision/deeplcom-deepl-php',
114115
'web-vision/deepltranslate-core',
115116
__DIR__ . '/Fixtures/Extensions/test_services_override',
116117
];

Tests/Functional/Container/ContentElementsInContainerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ final class ContentElementsInContainerTest extends AbstractDeepLTestCase
2222
protected array $testExtensionsToLoad = [
2323
'b13/container',
2424
'web-vision/deepl-base',
25+
'web-vision/deeplcom-deepl-php',
2526
'web-vision/deepltranslate-core',
2627
__DIR__ . '/../Fixtures/Extensions/test_services_override',
2728
__DIR__ . '/Fixtures/Extensions/test_container',

Tests/Functional/Regression/LocalizationInlineRegressionTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ final class LocalizationInlineRegressionTest extends AbstractDeepLTestCase
1919
*/
2020
protected array $testExtensionsToLoad = [
2121
'web-vision/deepl-base',
22+
'web-vision/deeplcom-deepl-php',
2223
'web-vision/deepltranslate-core',
2324
__DIR__ . '/../Fixtures/Extensions/test_services_override',
2425
];

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@
7676
"ext-curl": "*",
7777
"ext-json": "*",
7878
"ext-pdo": "*",
79-
"deeplcom/deepl-php": "^1.10.1",
8079
"typo3/cms-backend": "^12.4.2 || ^13.4",
8180
"typo3/cms-core": "^12.4.2 || ^13.4",
8281
"typo3/cms-extbase": "^12.4.2 || ^13.4",
8382
"typo3/cms-fluid": "^12.4.2 || ^13.4",
8483
"typo3/cms-setup": "^12.4.2 || ^13.4",
85-
"web-vision/deepl-base": "1.*.*@dev"
84+
"web-vision/deepl-base": "1.*.*@dev",
85+
"web-vision/deeplcom-deepl-php": "^1.12.0"
8686
},
8787
"require-dev": {
8888
"b13/container": "^2.3.6 || ^3.1.1",

ext_emconf.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
'fluid' => '12.4.0-13.4.99',
1919
'setup' => '12.4.0-13.4.99',
2020
'deepl_base' => '1.0.0-1.99.99',
21+
'deeplcom_deeplphp' => '1.12.0-1.99.99',
2122
],
2223
'conflicts' => [
2324
'recordlist_thumbnail' => '*',
@@ -33,14 +34,4 @@
3334
'gridelements' => '*',
3435
],
3536
],
36-
// @todo Autoload section in `ext_emconf.php` should not be needed anymore since TYPO3 v12, and in first test it
37-
// showed to work without it. This should be verified debugging TYPO3 core to be really sure about that and
38-
// making additional tests. Scheduled to be removed if removal can be considered safe.
39-
'autoload' => [
40-
'psr-4' => [
41-
'WebVision\\Deepltranslate\\Core\\' => 'Classes',
42-
'DeepL\\' => 'vendor/deeplcom/deepl-php/src',
43-
'Http\\Discovery\\' => 'vendor/php-http/discovery/src',
44-
],
45-
],
4637
];

0 commit comments

Comments
 (0)