v0.5.1 — Foundation: PHPStan + security hardening
No-behaviour-change maintenance release. Defensive cleanup that pairs with gds-assistant v0.4.3.
Foundation (CI)
- PHPStan level 5 added to the lint job. 97 pre-existing errors fixed:
RestDelegationnamespace fallback (rest_namespaceis typedbool|string, nevernull— the??defaulted to the wrong branch), dropped two unused constructor args fromPostTypeAbility/TaxonomyAbility, tightened return types onRestoreSnapshot::deleteTerm+::bulk(they can't returnWP_Error), removed?? []on always-array fields and a redundantcount > 0guard. New static-analysis regressions now fail the lint job.
Security hardening
- XPath DoS guards on
gds/web-fetch. Expressions over 1000 chars are rejected with a clear error, and the pathological//.//.//.//recursive-descent pattern is short-circuited before libxml gets a chance to OOM. Stops a class of input-driven worst-case parsing. - Try/finally on media temp files in
MediaUploadAbility::sideloadAndRespond— orphans no longer leak when the sideload fails partway through.
Misc
- Dynamic-block guard in
PatchBlockAbilitysimplified to a singleis_callablecheck (the prior chain confused PHPStan into emitting unreachable-branch warnings). - Test fixture:
PostTypeAbilityTest/DeleteAbilitiesTest/AcfIntegrationTestupdated to the 3-arg constructor signature (extras were being silently dropped, masking the test fixture drift in CI).
Full changelog: v0.5.0...v0.5.1