packagist zircote/swagger-php 6.20.0

5 hours ago

Spec pipeline

Rector set

The classic-to-spec set migrates more classic arguments that spec does not take. Before, each of these stayed in place and the migrated attribute threw Unknown named parameter once it loaded.

  • Encoding's property: is renamed to encoding:, and a Property with encoding: becomes Property\Encoded, keeping its schema keywords (#2317)
  • A parameter's spaceDelimited:, pipeDelimited: and deepObject: are rewritten to style:. Classic writes them into the document as keys OpenAPI does not define, so the migrated document gains the style and loses the stray key (#2319)
  • in: is dropped where it matches the parameter class, and allowEmptyValue:, allowReserved: and styles are dropped where OpenAPI does not define them (#2320)
  • ComponentsHolderRector no longer makes a class a components holder for a Response keyed by a status code (#2318)

The arguments the set leaves for the author are listed in Migrating to spec.

Hybrid and spec output

  • Hybrid no longer gives the class docblock to every nested property without a description. Nested properties take none, as in spec (#2312)
  • Hybrid converts a class-level #[OA\Examples] and #[OA\Webhook]. Before, both were dropped with a warning, and a $ref to such an example was left dangling (#2313)
  • A schema with allOf and an empty properties: [] gets no extra allOf entry holding only type: object, as in classic (#2314)

All modes

  • symfony/console below 5.4.35, symfony/finder below 5.3.7 and symfony/string below 5.4.41 conflict. Those releases print PHP deprecations into the output of bin/openapi wherever display_errors is on, which breaks its YAML and JSON (#2310)
  • A class-level @template is recognised in docblock types, so list<T> no longer logs "Unsupported docblock type". The document was not affected (#2316, reported in #2315)

Full Changelog: 6.19.0...6.20.0

Don't miss a new swagger-php release

NewReleases is sending notifications on new releases.