Instructions for coding agents working in this repository. CLAUDE.md
imports this file. Read CONTRIBUTING.md first: its rules
apply to you in full. This file adds what an agent needs on top of it.
This file belongs to the branch main: deepl-write 2.x, TYPO3 13.4 and
14.3, PHP 8.2 to 8.5. The branch you work on decides the rules. For work
on 1 (1.x, TYPO3 12.4 and 13.4), switch to that branch and follow its own
AGENTS.md and CONTRIBUTING.md, never this one. A backport is written for
the target branch, it is not a copy of the change on main.
Check before you start:
git branch --show-current
git status -sb- Never write to a remote (push, pull request, issue, comment, review, merge) unless the maintainer asks for exactly that.
- Never credit a tool or a model in commits, pull requests, issues, code
comments or documentation. No
Co-authored-byfor it, no "Generated with" line. The human who submits the change is its author. - Scratch files, plans, reports and downloads go into
.agent/(git ignored), never into the tracked tree and never into/tmp. - Verify by running, not by recalling: the suites below,
git,composer. Say what you ran and what you did not run. - An issue reference (
DPL-123,#12) is written only when it is known to exist. Do not invent one.
-
Set
CI=true. Without a terminal,runTests.shfails with "the input device is not a TTY" unlessCIistrue:export CI=true Build/Scripts/runTests.sh -b docker -t 13 -s composerUpdate Build/Scripts/runTests.sh -b docker -t 13 -s cgl -n Build/Scripts/runTests.sh -b docker -t 13 -s phpstan Build/Scripts/runTests.sh -b docker -t 13 -s unit Build/Scripts/runTests.sh -b docker -t 13 -s functional -
One TYPO3 version at a time.
.Build/holds the installation of the lastcomposerUpdate. Run all suites of v13, thencomposerUpdate -t 14and the suites of v14. Never run tworunTests.shcalls of this checkout in parallel. -
composerUpdaterewritescomposer.jsonwhile it runs and restores it afterwards (composer.json.orig). Do not interrupt it, and never commit acomposer.jsonchanged by it. -
-s cglchanges files,-s cgl -nonly checks. Run the check before you commit, the fix only on purpose. -
Pass test filters behind
--:-s unit -- --filter VersionTest. -
The functional tests use a DeepL mock server. Never put a real DeepL key into a file, a command line or a log.
-
Done means: the suites of the changed area green on both v13 and v14,
cgl -nandphpstangreen on both,checkContribComposerwhencomposer.jsonorcontrib/changed,renderDocumentationwhenDocumentation/changed.
Classes/is shared by both TYPO3 versions. A difference between v13 and v14 goes intoCore13/andCore14/. Never add a new TYPO3 version check to a class.- The localization runs through the DataHandler command
deeplwrite(Classes/Hooks/WriteHook.php): localize the record, then rephrase its translatable fields with DeepL Write. On v13 the mode comes from the localization wizard of deepl-base (listeners inCore13/Event/Listener/), on v14 from the TYPO3 localization handlerCore14/Backend/Localization/DeeplWriteLocalizationHandler.php. - deepl-write has its own client and configuration on the DeepL SDK. Do not
add a dependency on
web-vision/deepltranslate-core. The places that work with it when it is installed areClasses/Configuration/Configuration.php(API key fallback) andConfiguration/SiteConfiguration/Overrides/sites.php(display conditions on core'sdeeplTargetLanguageanddeeplFormality). The listener identifiers of deepl-base and deepltranslate-core named inafter:must keep matching theirs. org_heigl/hyphenatorhas to stay in sync withcontrib/, see CONTRIBUTING.md.
- One commit per pull request, following the commit rules in CONTRIBUTING.md.
Amend and force push (
--force-with-lease) when asked to update a pull request, do not add fix-up commits. - Rebase onto
origin/main, never merge it in. - When a change also needs a pull request in another DeepL extension, say so, and name the order in which they have to be merged.