Skip to content

build(deps-dev): bump zircote/swagger-php to 7.0 and keep OpenAPI 3.0.0 output - #4829

Open
DerManoMann wants to merge 1 commit into
thorsten:mainfrom
DerManoMann:swagger-php-hybrid
Open

DerManoMann wants to merge 1 commit into
thorsten:mainfrom
DerManoMann:swagger-php-hybrid

Conversation

@DerManoMann

@DerManoMann DerManoMann commented Oct 29, 2026 •

Copy link
Copy Markdown

Summary

Hi there,

swagger-php 7.0 makes hybrid the default mode. Hybrid scans the same OpenApi\Attributes as
before, but builds the document with the new spec pipeline. Classic attributes keep working
through v7 and are removed in 8.0.

This bumps zircote/swagger-php from ~6.18.0 to ~7.0.0 and adds --version 3.0.0 to
openapi:json and openapi:yaml. Hybrid defaults to OpenAPI 3.1.0, and the flag keeps the
documents at 3.0.0. With that, the generated docs/openapi.json and docs/openapi.yaml parse
equal to the committed ones. The raw output only differs in key order, so docs/ is left alone.

Reason for doing this ahead of the Dependabot bump: without --version 3.0.0, the next
composer openapi:json moves the documents to 3.1.0 without anyone asking for it.

v7 marks the classic attributes @deprecated, so composer check now reports 224
deprecated-class warnings. It still passes. The warnings go away with a move to the spec
attributes (OpenApi\Spec), which the
rector set does mostly
automatically. That touches every API controller, so it is probably better left for a major
release, and this PR does not start it.

I maintain swagger-php - any questions, feel free to ping me.

Checklist

  • composer check passes (format, lint, static analysis) - with the deprecation warnings above
  • composer test passes - all but two: SessionTest::testGetLast30DaysVisits and
    testGetLast30DaysVisitsIgnoresVisitsOutsideTheRange fail the same way on main with
    swagger-php 6.18, and look time-of-day dependent. pnpm test not run, no JS/TS changes
  • pnpm tsc and pnpm oxlint pass for TypeScript changes - n/a
  • New or changed behaviour is covered by tests - n/a, no code changes
  • Database schema changes ship with an upgrade step in phpMyFAQ\Setup\Update - n/a
  • CHANGELOG.md is updated for user-facing changes - n/a, dev dependency only
  • Dependency major version bumps: upstream changelog read, old APIs grepped for, build green

Cheers,
mano

Summary by CodeRabbit

  • Chores
    • OpenAPI specifications generated by the project scripts now target version 3.0.0. Existing JSON and YAML formats and output locations are unchanged.

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Walkthrough

The Swagger PHP development dependency changes to ~7.0.0. Both OpenAPI generation scripts now specify version 3.0.0; the JSON script retains its JSON output option.

Changes: OpenAPI tooling

Layer / File(s) Summary
Update OpenAPI generation configuration
composer.json
The Swagger PHP development dependency constraint changes to ~7.0.0. Both OpenAPI generation scripts specify version 3.0.0; the JSON script retains its -f json option.

Priority: Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Other

Suggested reviewers: thorsten

Merge Risk: Minimal · up to afa6b

The tooling update is compatible with the supported environments and preserves OpenAPI 3.0 output.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the two main changes: the zircote/swagger-php dev dependency bump from 6.18 to 7.0, and keeping OpenAPI 3.0.0 output via --version 3.0.0. The raw summary and objectives confirm both ch…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the two main changes: the zircote/swagger-php dev dependency bump from 6.18 to 7.0, and keeping OpenAPI 3.0.0 output via --version 3.0.0. The raw summary and objectives confirm both changes. The title is specific and matches the changeset, and it omits no major point. Minor wording note: the title says 'bump to 7.0' while the constraint is ~7.0.0, which is equivalent.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
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