Skip to content

Upgrade documentation generator dependencies and require PHP 8.2 - #350

Merged
LordSimal merged 1 commit into
2.xfrom
chore/upgrade-generator-dependencies
Nov 29, 2026
Merged

LordSimal merged 1 commit into
2.xfrom
chore/upgrade-generator-dependencies

Conversation

@LordSimal

Copy link
Copy Markdown
Member

Summary

Upgrade the generator's outdated direct dependencies and adapt the parser, templates, and build image so historical and current documentation still builds.

composer.json + lock file
  → current stable dependencies
  → PHPDoc Parser 2.x initialization and invalid-tag handling
  → Twig-compatible namespace macro
  → CodeSniffer 5.x formatting
  → Docker with iconv
  • Update CakePHP Collection and Console to 5.4, Composer to 2.11, Parsedown to 1.8, PHPDoc Parser to 2.5, Twig and Markdown Extra to 3.31, and CakePHP CodeSniffer to 5.3. Raise the PHP-Parser constraint to 5.10.
  • Require PHP 8.2 to match CakePHP 5.4 and the existing Docker/CI runtime; document the requirement.
  • Use the shared PHPDoc Parser ParserConfig and initialize the parser objects once. Ignore malformed @return and @var tags so native types remain available.
  • Remove a duplicate Twig macro argument rejected by newer Twig.
  • Apply the newer coding standard, add Docker's required iconv extension, and run new PHPDoc regression checks in CI.

Evidence

  • Before: Newer Twig rejected the duplicated type argument in showClassLikes; the updated dependency graph required an extension missing from the Docker image.
    After: The full Docker build generated all 37 configured documentation releases without parser warnings or fatal errors; production-image HTTP routing checks passed.
  • PHPDoc, loader, generator, release-manifest, and release-cache regression checks passed. Focused PHP checks also passed under PHP 8.5.
  • PHP CodeSniffer and ShellCheck passed.
  • Composer validation and platform checks passed. Composer reports no outdated direct dependencies and no security vulnerability advisories. Validation retains the existing missing-license metadata warning.

Merge Danger

Door: two-way

Revert the commit and redeploy to restore the previous dependency graph.

Blast Radius: documentation

Affects generator execution and formatting across all documentation releases. The generator now requires PHP 8.2 or newer; older CakePHP source remains supported through parsing without execution.

Update direct constraints and the lock file to current stable versions, requiring PHP 8.2 to match CakePHP 5.4 and the build runtime. Migrate PHPDoc Parser 2 initialization, ignore invalid return and var tags, and remove a duplicate Twig macro argument rejected by newer Twig. Apply CodeSniffer 5 formatting, add iconv to Docker, and cover PHPDoc parsing in CI. All 37 configured documentation releases and production-image HTTP checks pass.
@LordSimal LordSimal mentioned this pull request Nov 29, 2026
@LordSimal
LordSimal merged commit 0962dab into 2.x Nov 29, 2026
2 checks passed
@LordSimal
LordSimal deleted the chore/upgrade-generator-dependencies branch November 29, 2026 10:51
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.

1 participant