Entry Kind Origin
F1.1 The unit suite for the lookup fails: 6 of 41 tests blocks introduced by this change
F2.1 A missing key caches null for the whole request sent back introduced by this change
F3.1 The reader is a new instance per call worth a change older than the change
F4.1 The key stays the file’s own identifier checked —

To do

To do Kind
T1.1 Adapt the four tests that expect the second read, and run the suite. blocks
T2.1 Say so in the docblock, or read again on a miss. sent back
T3.1 Construct the reader once, in the constructor. worth a change

Blocks submission

F1.1

The unit suite for the lookup fails: 6 of 41 tests

Every case that resolves one key twice fails. Four of them expect the second read the change removes on purpose. The other two are 1.2.

bash
$ vendor/bin/phpunit tests/Unit/Lookup
Tests: 41, Assertions: 97, Failures: 6.

T1.1Adapt the four tests that expect the second read, and run the suite.

Sent back

F2.1

A missing key caches null for the whole request

The docblock says a lookup reads again. It does not: null goes into the array like any answer. Right for a request, and worth one sentence where the docblock says otherwise.

T2.1Say so in the docblock, or read again on a miss.

Worth a change

F3.1

The reader is a new instance per call

LabelLookup constructs its reader in resolve(). The service is a singleton, so one reader in the constructor is the same object with one construction fewer per label.

T3.1Construct the reader once, in the constructor.

Checked and correct

F4.1

The key stays the file’s own identifier

Checked against a catalogue with a dotted key: the cache keys on the string the file names, with no normalisation in between.

THE REGISTER NUMBERS AND GROUPS · THE OVERVIEW AND THE WORK ARE TABLES · THE NUMBER IN A RAIL · THE KIND IS A WORD