Skip to content

chore(docblock): declare server config shape once via @phpstan-type (closes #594) - #820

Merged
s2x merged 5 commits into
masterfrom
chore/issue-594-server-config-array-shape-is-duplicated
Sep 13, 2026
Merged

s2x merged 5 commits into
masterfrom
chore/issue-594-server-config-array-shape-is-duplicated

Conversation

@s2x

@s2x s2x commented Sep 13, 2026

Copy link
Copy Markdown
Member

Description

Closes #594

Changes

  • Declare the 11-key server-configuration array shape once as a @phpstan-type ServerConfig alias on CrazyGoat\WorkermanBundle\Worker\ServerWorker.
  • Import it into WorkermanBundle with @phpstan-import-type; servers? is now list<ServerConfig>.
  • Replace the three duplicated inline shapes on ServerWorker::{__construct,configureHandler,createSslContext} and the nested shape on WorkermanBundle::loadExtension with the alias.
  • Mark serve_files, root_dir and static_files as deprecated inside the alias, naming StaticFilesMiddleware and removal in 1.0 (consistent with UPGRADE.md).
  • Docblock-only: zero executable lines changed; no runtime behaviour difference.

Changelog

Entry added under [Unreleased] > Changed.

Proof of Work

docs/proof_of_work/0594-server-config-phpstan-type/ — 3 review round(s), 0 open findings.

Code Review

  • Passed subagent code review (rounds 1-3)
  • Every finding answered

@s2x s2x self-assigned this Sep 13, 2026
@s2x
s2x merged commit 0ef3007 into master Sep 13, 2026
26 of 28 checks passed
@s2x
s2x deleted the chore/issue-594-server-config-array-shape-is-duplicated branch September 13, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Chore] Server config array shape is duplicated four times; no PHPStan type aliases anywhere

1 participant