packagist zircote/swagger-php 7.4.0

38 minutes ago

7.4 is a fixes and performance release. Scanning no longer reads a class's source again for every property, which matters most on slow filesystems such as Docker Desktop bind mounts.

Two changes affect the generated document. Changed output in 7.4 has the details.

Changed output

  • A public property with neither a property nor a schema attribute no longer puts its class in components. Where nothing else adds the class, a type that used it is left out, with a warning (#2361)
  • Classic: a docblock @example is cast by the property's type, so @example 1 on an int writes 1 rather than '1'. #[OA\Examples(value:)] keeps false and floats as given (#2368)

New

  • Warnings for schema keywords dropped beside a $ref, under 3.0 and 3.1 (#2362)
  • 3.0 schema warnings name where the schema was declared (#2370)
  • Builder::createSpecification(), so a subclass can supply its own specification (#2366)

Changed

  • Resolver::getTypedReflectors() is replaced by getPropertyTypes(). A subclass overriding it overrides getPropertyTypes() instead (#2361, docs)

Performance

  • One TypeContextFactory per TypeResolver, and TokenScanner::detailsFor() answered from the cache for a scanned file. Thanks @leo-pansonato (#2364, #2365)

What's Changed

New Contributors

Full Changelog: 7.3.0...7.4.0

Don't miss a new swagger-php release

NewReleases is sending notifications on new releases.