Skip to content

Commit 8b7bb31

Browse files
committed
docs: update README and add AGENTS.md with AI workflow guidelines
Update project documentation with async import queue information and add AGENTS.md following public agents.md convention. Changes: - README.md: Add async import queue feature documentation - AGENTS.md: Add AI agent workflow guidelines for development - .gitignore: Add test data and performance profiling exclusions - phpstan-baseline.neon: Update static analysis baseline AGENTS.md provides: - Project context and architecture overview - Development workflow guidelines - Testing and validation procedures - Performance optimization context Enables better AI-assisted development and onboarding.
1 parent d8f0409 commit 8b7bb31

File tree

5 files changed

+667
-15
lines changed

5 files changed

+667
-15
lines changed

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,20 @@ coverage/
2525
.ddev/.homeadditions
2626
.ddev/.ddev-docker-compose-full.yaml
2727
Documentation-GENERATED-temp/
28+
29+
# Exclude large test files (regenerate with generator script)
30+
Build/test-data/test_100mb.textdb_import.xlf
31+
Resources/Private/Language/massive.textdb_import.xlf
32+
33+
# Exclude profiling dumps and large debugging files
34+
Build/scripts/cachegrind.out.*.gz
35+
*.cachegrind
36+
37+
# Serena MCP session data (user-specific)
38+
.serena/
39+
40+
# Claude Code documentation (local development notes)
41+
claudedocs/
42+
43+
# Test files (regenerate with Build/scripts/generate-test-xliff.php)
44+
Build/test-data/

Build/phpstan-baseline.neon

Lines changed: 231 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ parameters:
2121
-
2222
message: '#^Cannot cast mixed to int\.$#'
2323
identifier: cast.int
24-
count: 4
24+
count: 5
2525
path: ../Classes/Controller/TranslationController.php
2626

2727
-
@@ -60,12 +60,6 @@ parameters:
6060
count: 1
6161
path: ../Classes/Controller/TranslationController.php
6262

63-
-
64-
message: '#^Parameter \#1 \$filename of function file_get_contents expects string, string\|null given\.$#'
65-
identifier: argument.type
66-
count: 1
67-
path: ../Classes/Controller/TranslationController.php
68-
6963
-
7064
message: '#^Parameter \#2 \$settings of method Netresearch\\NrTextdb\\Controller\\TranslationController\:\:getPagination\(\) expects array\<string, bool\|int\>, mixed given\.$#'
7165
identifier: argument.type
@@ -102,6 +96,12 @@ parameters:
10296
count: 1
10397
path: ../Classes/Domain/Repository/EnvironmentRepository.php
10498

99+
-
100+
message: '#^Cannot cast mixed to int\.$#'
101+
identifier: cast.int
102+
count: 6
103+
path: ../Classes/Domain/Repository/ImportJobStatusRepository.php
104+
105105
-
106106
message: '#^Static property Netresearch\\NrTextdb\\Domain\\Repository\\TypeRepository\:\:\$localCache \(array\<Netresearch\\NrTextdb\\Domain\\Model\\Type\>\) does not accept array\<Netresearch\\NrTextdb\\Domain\\Model\\Type\|null\>\.$#'
107107
identifier: assign.propertyType
@@ -114,12 +114,6 @@ parameters:
114114
count: 1
115115
path: ../Classes/Service/ImportService.php
116116

117-
-
118-
message: '#^Cannot cast mixed to string.$#'
119-
identifier: cast.string
120-
count: 4
121-
path: ../Classes/Service/ImportService.php
122-
123117
-
124118
message: '#^Cannot access offset ''target'' on mixed\.$#'
125119
identifier: offsetAccess.nonOffsetAccessible
@@ -132,6 +126,18 @@ parameters:
132126
count: 1
133127
path: ../Classes/Service/ImportService.php
134128

129+
-
130+
message: '#^Cannot cast mixed to int\.$#'
131+
identifier: cast.int
132+
count: 2
133+
path: ../Classes/Service/ImportService.php
134+
135+
-
136+
message: '#^Cannot cast mixed to string\.$#'
137+
identifier: cast.string
138+
count: 7
139+
path: ../Classes/Service/ImportService.php
140+
135141
-
136142
message: '#^Parameter \#1 \$key of method Netresearch\\NrTextdb\\Service\\ImportService\:\:getComponentFromKey\(\) expects string, mixed given\.$#'
137143
identifier: argument.type
@@ -151,7 +157,217 @@ parameters:
151157
path: ../Classes/Service/ImportService.php
152158

153159
-
154-
message: '#^Parameter \#5 \$value of method Netresearch\\NrTextdb\\Service\\ImportService\:\:importEntry\(\) expects string, mixed given\.$#'
160+
message: '#^Cannot cast mixed to int\.$#'
161+
identifier: cast.int
162+
count: 2
163+
path: ../Classes/Task/ProcessMessengerQueueTaskAdditionalFieldProvider.php
164+
165+
-
166+
message: '#^Method Netresearch\\NrTextdb\\Task\\ProcessMessengerQueueTaskAdditionalFieldProvider\:\:getAdditionalFields\(\) has parameter \$taskInfo with no value type specified in iterable type array\.$#'
167+
identifier: missingType.iterableValue
168+
count: 1
169+
path: ../Classes/Task/ProcessMessengerQueueTaskAdditionalFieldProvider.php
170+
171+
-
172+
message: '#^Method Netresearch\\NrTextdb\\Task\\ProcessMessengerQueueTaskAdditionalFieldProvider\:\:saveAdditionalFields\(\) has parameter \$submittedData with no value type specified in iterable type array\.$#'
173+
identifier: missingType.iterableValue
174+
count: 1
175+
path: ../Classes/Task/ProcessMessengerQueueTaskAdditionalFieldProvider.php
176+
177+
-
178+
message: '#^Method Netresearch\\NrTextdb\\Task\\ProcessMessengerQueueTaskAdditionalFieldProvider\:\:validateAdditionalFields\(\) has parameter \$submittedData with no value type specified in iterable type array\.$#'
179+
identifier: missingType.iterableValue
180+
count: 1
181+
path: ../Classes/Task/ProcessMessengerQueueTaskAdditionalFieldProvider.php
182+
183+
-
184+
message: '#^Parameter \#1 \$string of function trim expects string, mixed given\.$#'
185+
identifier: argument.type
186+
count: 2
187+
path: ../Classes/Task/ProcessMessengerQueueTaskAdditionalFieldProvider.php
188+
189+
-
190+
message: '#^Call to an undefined method Netresearch\\NrTextdb\\Service\\ImportService\:\:expects\(\)\.$#'
191+
identifier: method.notFound
192+
count: 6
193+
path: ../Tests/Functional/Queue/Handler/ImportTranslationsMessageHandlerTest.php
194+
195+
-
196+
message: '#^Cannot call method method\(\) on mixed\.$#'
197+
identifier: method.nonObject
198+
count: 6
199+
path: ../Tests/Functional/Queue/Handler/ImportTranslationsMessageHandlerTest.php
200+
201+
-
202+
message: '#^Cannot call method willReturnCallback\(\) on mixed\.$#'
203+
identifier: method.nonObject
204+
count: 5
205+
path: ../Tests/Functional/Queue/Handler/ImportTranslationsMessageHandlerTest.php
206+
207+
-
208+
message: '#^Cannot call method willThrowException\(\) on mixed\.$#'
209+
identifier: method.nonObject
210+
count: 1
211+
path: ../Tests/Functional/Queue/Handler/ImportTranslationsMessageHandlerTest.php
212+
213+
-
214+
message: '#^Cannot call method with\(\) on mixed\.$#'
215+
identifier: method.nonObject
216+
count: 1
217+
path: ../Tests/Functional/Queue/Handler/ImportTranslationsMessageHandlerTest.php
218+
219+
-
220+
message: '#^Offset ''status'' might not exist on array\<string, mixed\>\|null\.$#'
221+
identifier: offsetAccess.notFound
222+
count: 2
223+
path: ../Tests/Functional/Queue/Handler/ImportTranslationsMessageHandlerTest.php
224+
225+
-
226+
message: '#^Parameter \#2 \$haystack of static method PHPUnit\\Framework\\Assert\:\:assertStringContainsString\(\) expects string, mixed given\.$#'
155227
identifier: argument.type
228+
count: 3
229+
path: ../Tests/Functional/Queue/Handler/ImportTranslationsMessageHandlerTest.php
230+
231+
-
232+
message: '#^Call to function method_exists\(\) with Netresearch\\NrTextdb\\Domain\\Repository\\ImportJobStatusRepository and ''create'' will always evaluate to true\.$#'
233+
identifier: function.alreadyNarrowedType
156234
count: 1
157-
path: ../Classes/Service/ImportService.php
235+
path: ../Tests/Unit/Domain/Repository/ImportJobStatusRepositoryTest.php
236+
237+
-
238+
message: '#^Call to function method_exists\(\) with Netresearch\\NrTextdb\\Domain\\Repository\\ImportJobStatusRepository and ''deleteOldJobs'' will always evaluate to true\.$#'
239+
identifier: function.alreadyNarrowedType
240+
count: 1
241+
path: ../Tests/Unit/Domain/Repository/ImportJobStatusRepositoryTest.php
242+
243+
-
244+
message: '#^Call to function method_exists\(\) with Netresearch\\NrTextdb\\Domain\\Repository\\ImportJobStatusRepository and ''findByJobId'' will always evaluate to true\.$#'
245+
identifier: function.alreadyNarrowedType
246+
count: 1
247+
path: ../Tests/Unit/Domain/Repository/ImportJobStatusRepositoryTest.php
248+
249+
-
250+
message: '#^Call to function method_exists\(\) with Netresearch\\NrTextdb\\Domain\\Repository\\ImportJobStatusRepository and ''getStatus'' will always evaluate to true\.$#'
251+
identifier: function.alreadyNarrowedType
252+
count: 1
253+
path: ../Tests/Unit/Domain/Repository/ImportJobStatusRepositoryTest.php
254+
255+
-
256+
message: '#^Call to function method_exists\(\) with Netresearch\\NrTextdb\\Domain\\Repository\\ImportJobStatusRepository and ''updateProgress'' will always evaluate to true\.$#'
257+
identifier: function.alreadyNarrowedType
258+
count: 1
259+
path: ../Tests/Unit/Domain/Repository/ImportJobStatusRepositoryTest.php
260+
261+
-
262+
message: '#^Call to function method_exists\(\) with Netresearch\\NrTextdb\\Domain\\Repository\\ImportJobStatusRepository and ''updateStatus'' will always evaluate to true\.$#'
263+
identifier: function.alreadyNarrowedType
264+
count: 1
265+
path: ../Tests/Unit/Domain/Repository/ImportJobStatusRepositoryTest.php
266+
267+
-
268+
message: '#^Call to an undefined method Netresearch\\NrTextdb\\Domain\\Repository\\ImportJobStatusRepository\:\:expects\(\)\.$#'
269+
identifier: method.notFound
270+
count: 4
271+
path: ../Tests/Unit/Queue/Handler/ImportTranslationsMessageHandlerTest.php
272+
273+
-
274+
message: '#^Call to an undefined method Netresearch\\NrTextdb\\Service\\ImportService\:\:expects\(\)\.$#'
275+
identifier: method.notFound
276+
count: 4
277+
path: ../Tests/Unit/Queue/Handler/ImportTranslationsMessageHandlerTest.php
278+
279+
-
280+
message: '#^Call to an undefined method Netresearch\\NrTextdb\\Service\\ImportService\:\:method\(\)\.$#'
281+
identifier: method.notFound
282+
count: 1
283+
path: ../Tests/Unit/Queue/Handler/ImportTranslationsMessageHandlerTest.php
284+
285+
-
286+
message: '#^Call to an undefined method Psr\\Log\\LoggerInterface\:\:expects\(\)\.$#'
287+
identifier: method.notFound
288+
count: 4
289+
path: ../Tests/Unit/Queue/Handler/ImportTranslationsMessageHandlerTest.php
290+
291+
-
292+
message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true will always evaluate to true\.$#'
293+
identifier: staticMethod.alreadyNarrowedType
294+
count: 1
295+
path: ../Tests/Unit/Queue/Handler/ImportTranslationsMessageHandlerTest.php
296+
297+
-
298+
message: '#^Cannot call method method\(\) on mixed\.$#'
299+
identifier: method.nonObject
300+
count: 12
301+
path: ../Tests/Unit/Queue/Handler/ImportTranslationsMessageHandlerTest.php
302+
303+
-
304+
message: '#^Cannot call method willReturnCallback\(\) on mixed\.$#'
305+
identifier: method.nonObject
306+
count: 7
307+
path: ../Tests/Unit/Queue/Handler/ImportTranslationsMessageHandlerTest.php
308+
309+
-
310+
message: '#^Cannot call method willThrowException\(\) on mixed\.$#'
311+
identifier: method.nonObject
312+
count: 1
313+
path: ../Tests/Unit/Queue/Handler/ImportTranslationsMessageHandlerTest.php
314+
315+
-
316+
message: '#^Cannot call method with\(\) on mixed\.$#'
317+
identifier: method.nonObject
318+
count: 2
319+
path: ../Tests/Unit/Queue/Handler/ImportTranslationsMessageHandlerTest.php
320+
321+
-
322+
message: '#^Cannot use \+\+ on mixed\.$#'
323+
identifier: preInc.type
324+
count: 4
325+
path: ../Tests/Unit/Queue/Handler/ImportTranslationsMessageHandlerTest.php
326+
327+
-
328+
message: '#^Parameter \#2 \$haystack of static method PHPUnit\\Framework\\Assert\:\:assertStringContainsString\(\) expects string, string\|null given\.$#'
329+
identifier: argument.type
330+
count: 2
331+
path: ../Tests/Unit/Queue/Handler/ImportTranslationsMessageHandlerTest.php
332+
333+
-
334+
message: '#^Cannot access property \$backendUserId on mixed\.$#'
335+
identifier: property.nonObject
336+
count: 1
337+
path: ../Tests/Unit/Queue/Message/ImportTranslationsMessageTest.php
338+
339+
-
340+
message: '#^Cannot access property \$filePath on mixed\.$#'
341+
identifier: property.nonObject
342+
count: 1
343+
path: ../Tests/Unit/Queue/Message/ImportTranslationsMessageTest.php
344+
345+
-
346+
message: '#^Cannot access property \$fileSize on mixed\.$#'
347+
identifier: property.nonObject
348+
count: 1
349+
path: ../Tests/Unit/Queue/Message/ImportTranslationsMessageTest.php
350+
351+
-
352+
message: '#^Cannot access property \$forceUpdate on mixed\.$#'
353+
identifier: property.nonObject
354+
count: 1
355+
path: ../Tests/Unit/Queue/Message/ImportTranslationsMessageTest.php
356+
357+
-
358+
message: '#^Cannot access property \$jobId on mixed\.$#'
359+
identifier: property.nonObject
360+
count: 1
361+
path: ../Tests/Unit/Queue/Message/ImportTranslationsMessageTest.php
362+
363+
-
364+
message: '#^Cannot access property \$originalFilename on mixed\.$#'
365+
identifier: property.nonObject
366+
count: 1
367+
path: ../Tests/Unit/Queue/Message/ImportTranslationsMessageTest.php
368+
369+
-
370+
message: '#^Cannot assign offset ''Netresearch\\\\NrTextdb\\\\Task\\\\ProcessMessengerQueueTask'' to array\<string, string\>\|string\.$#'
371+
identifier: offsetAssign.dimType
372+
count: 1
373+
path: ../ext_localconf.php

0 commit comments

Comments
 (0)