Make the cspell and phpstan jobs green (project word list, aliased controller parent)

Two jobs failed on every pipeline on 1.0.x, and both failed on committed content rather than on anything a contributor had just changed, which trains everyone to ignore a red pipeline.

cspell reported 68 findings across 28 files. None were defects: British spellings in archived OpenSpec documents, French and Italian test-fixture vocabulary, and Drupal or project terms the dictionary does not carry. The legitimate words move into .cspell-project-words.txt. Two cases are reworded instead, because a word-list entry legitimizes a spelling everywhere and this codebase otherwise writes American English: four "behaviour" occurrences in active source become "behavior", and the coinages "ambiently" and "storability" become plain phrasings. Archived documents and fixture strings are historical record and are left alone.

phpstan reported 32 errors, which were one root cause plus its cascade: EntityResource extends EntityResourceBase, a name created at runtime by class_alias(), and phpstan cannot evaluate class_alias(), so it saw a parent-less class and every inherited member reference errored. A bootstrapFiles entry recreates the alias for real inside phpstan's own PHP process, which is phpstan's documented fix for class_alias(). It is read only by phpstan and never loaded by Drupal at runtime, and the class_exists() guard means a context where core's controller is unavailable degrades instead of fataling the run.

Two alternatives were rejected. A stub file declaring the parent cannot work: phpstan resolves stub files in symbol isolation, so the stub's own parent reference would need stubbing too, and that empty shell then shadows the real class's members (measured: the stub alone made it 33 errors, the stub plus companion shell returned to 32 with the cascade intact). Regenerating phpstan-baseline.neon would turn the job green while permanently blinding phpstan to the class most likely to drift against core's @internal internals, so the baseline is left untouched.

Also documents the OpenAPI submodule's separate test command, which the AGENTS.md verify path could not reach, and adds a "Running the tests" section to CONTRIBUTING.md.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com

Closes #3614380

Merge request reports

Loading