| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| 6.9.0 source code.tar.gz | 2026-09-13 | 155.1 kB | |
| 6.9.0 source code.zip | 2026-09-13 | 310.3 kB | |
| README.md | 2026-09-13 | 7.2 kB | |
| Totals: 3 Items | 472.5 kB | 0 | |
Classic can now express the parts of OpenAPI 3.1 it always claimed to model: the full Header Object, a parameter's content, mutualTLS, the Info Object's summary, and the ten JSON Schema keywords 3.1 added.
src/Annotations and src/Attributes are closed to new capabilities, but an OpenAPI construct classic claims to model and cannot express is a defect rather than a missing feature, and v6 is the last major where classic is the primary API. A field-by-field diff of every classic annotation against the 3.1 object tables found eight such gaps; this release closes seven of them.
Upgrading from 6.8.x
3.0 documents lose two keywords they should never have carried. contentMediaType and contentEncoding were emitted into 3.0 output, where neither keyword exists — the 3.0 branch of @OA\Schema stripped only examples and const. They are dropped now, together with the other 3.1-only keywords:
:::diff
Attachment:
type: string
- contentMediaType: image/png
- contentEncoding: base64
Nothing changes for 3.1 and 3.2.
The spec pipeline emits trait members in use order. Each trait used to be prepended separately, so two traits came out in reverse order and three reversed completely — declaring T1, T2, T3 emitted p3, p2, p1. Classic and hybrid were always right. Key order carries no meaning in OpenAPI, so no document was invalid, but regenerated files will diff.
Three classes moved, all spec-pipeline internals:
| Was | Is |
|---|---|
OpenApi\Utils\CollectingLogger |
OpenApi\Loggers\CollectingLogger |
OpenApi\Utils\SpecificationWalker |
OpenApi\Specification\Walker |
OpenApi\Utils\TypeMapper |
OpenApi\Type\TypeMapper |
TypeMapper keeps a deprecated subclass at the old name, since a custom type resolver reaches it through AbstractTypeResolver. The other two have no shim.
Classic: the 3.1 object set
- The Header Object is complete.
@OA\Headerand#[OA\Header]gainstyle,explode,example,examplesandcontent, so a header can finally carry an example or a media type instead of a bare schema.schemaandcontentare mutually exclusive and saying both now warns. - A parameter's
contentaccepts a plain@OA\MediaType. The@OA\JsonContent/@OA\XmlContentshortcuts already worked; the verbose form was dropped silently, so a parameter written that way produced nocontentat all. mutualTLSis a valid@OA\SecuritySchemetype. The enum rejected it outright. In 3.0 documents, where the type does not exist, the scheme warns and is omitted.@OA\Infogainssummary. Dropped silently from 3.0 output, matching howLicense::$identifieris handled.- Ten JSON Schema keywords arrive on every schema annotation —
@OA\Schema,@OA\Property,@OA\Items,@OA\JsonContent,@OA\XmlContentand@OA\AdditionalProperties:
if, then, else, prefixItems, dependentRequired, dependentSchemas, minContains, maxContains, unevaluatedItems, contentSchema
Classic had adopted the 3.1 keywords partway — contains without minContains, unevaluatedProperties without unevaluatedItems — so the families were half-expressible. contentSchema was missing from the spec pipeline too and is added there as well.
php
#[OA\Schema(
type: 'array',
prefixItems: [new OA\Schema(type: 'string'), new OA\Schema(type: 'integer')],
contains: new OA\Schema(type: 'string'),
minContains: 1,
)]
A 3.1 array schema described by prefixItems or contains no longer demands items; 3.0 still warns, since the keywords do not survive there.
Fixed
- A schema whose
allOfnamed its parent by class-string emitted the same$reftwice in the spec and hybrid pipelines — dedup compared the raw values, and ran before class-strings resolved (#2185) - Hybrid unwraps
@OA\JsonContent/@OA\XmlContentthrough the bridge rather than by running two classic processors over a mapping it already knows (#2184)
New diagnostics
Generating 3.0 now warns for prefixItems, unevaluatedProperties, unevaluatedItems and if/then/else, with the same message text the spec compiler uses. contains, minContains, maxContains, patternProperties, propertyNames, dependentRequired, dependentSchemas, contentSchema, contentMediaType and contentEncoding drop silently.
A root @OA\Response whose component key looks like a status code (response: "404") is almost always a response meant for an operation, and now says so.
Documentation
Every reference page is generated through one set of section classes, so the annotation, attribute and spec-attribute pages stay in the same shape. CONTRIBUTING.md states the commit subject format and what a Changes entry is for.
What's Changed
- docs(Contributing): state the commit subject format and the allowed types by @DerManoMann in https://github.com/zircote/swagger-php/pull/2181
- fix(Augmenter): report a response component named after a status code by @DerManoMann in https://github.com/zircote/swagger-php/pull/2182
- fix(Tests): prefer spec expectations for hybrid in ExamplesTest and DocSnippetsTest by @DerManoMann in https://github.com/zircote/swagger-php/pull/2183
- refactor(HybridBridge): unwrap JsonContent/XmlContent without classic processors by @DerManoMann in https://github.com/zircote/swagger-php/pull/2184
- docs(Contributing): set the altitude for a Changes entry by @DerManoMann in https://github.com/zircote/swagger-php/pull/2188
- refactor(Docs): render every reference page through the section classes by @DerManoMann in https://github.com/zircote/swagger-php/pull/2187
- fix(Augmenter): deduplicate allOf refs after resolving class-strings by @DerManoMann in https://github.com/zircote/swagger-php/pull/2185
- refactor(Utils): move three classes to the subsystem that owns them by @DerManoMann in https://github.com/zircote/swagger-php/pull/2189
- fix(Augmenter): keep merged member order when expanding traits by @DerManoMann in https://github.com/zircote/swagger-php/pull/2186
- docs(Agents): carve spec-compliance defects out of the classic freeze by @DerManoMann in https://github.com/zircote/swagger-php/pull/2190
- fix(Annotations): model the full Header Object by @DerManoMann in https://github.com/zircote/swagger-php/pull/2191
- fix(Annotations): accept mutualTLS as a SecurityScheme type by @DerManoMann in https://github.com/zircote/swagger-php/pull/2193
- fix(Annotations): add the Info Object's summary field by @DerManoMann in https://github.com/zircote/swagger-php/pull/2194
- fix(Annotations): merge a plain MediaType into Parameter content by @DerManoMann in https://github.com/zircote/swagger-php/pull/2192
- fix(Annotations): model the JSON Schema keywords 3.1 added by @DerManoMann in https://github.com/zircote/swagger-php/pull/2195
Full Changelog: https://github.com/zircote/swagger-php/compare/6.8.1...6.9.0