packagist azjezz/psl 6.3.0
Hevlaska 6.3.0

7 hours ago

PSL 6.3.0

This release adds Type\numeric(), fixes HTTP header validation, and updates the documentation site.

Type System

  • Type\numeric(): A new type for integers, floats, and numeric strings. It preserves the input’s type, so numeric strings remain strings. Coercion also accepts Stringable objects whose string value is numeric. (by @gsteel in #793)
use Psl\Type;

Type\numeric()->assert(42);     // 42
Type\numeric()->assert(3.14);   // 3.14
Type\numeric()->assert('1.23'); // '1.23'

Fixes

  • HTTP\Client: Validates all Transfer-Encoding response fields, including repeated fields. Invalid or unsupported transfer codings now raise a ProtocolException instead of falling back to Content-Length. Valid chunked responses still take precedence over Content-Length. (by @azjezz in #806)
  • HTTP\Client and H2: Reject conflicting Content-Length fields in HTTP/1.1 responses and HTTP/2 headers while accepting identical duplicates. (by @azjezz in #800)
  • Dict\diff(): Corrects the PHPDoc value type bound to scalar|null|resource|Stringable, matching the string conversion used for comparisons. Runtime behavior is unchanged. (by @azjezz in #796)

Documentation

  • Static pages: The documentation site now serves pre-rendered HTML pages. (by @veewee in #782)
  • Section permalinks: Added direct links to section headings (by @erikgaal in #784), with GitHub-style anchors on hover (by @veewee in #785).
  • Deployment: Documentation builds now preserve the custom domain across deployments and rebuilds. (by @veewee in #783)
  • Iter\last_key_opt(): Corrected the description to say that the function returns the last key. (by @klifoth in #803)
  • Compression guide: Fixed heading formatting. (by @94noni in #801)

Install: composer require php-standard-library/php-standard-library:^6.3


New Contributors

Full Changelog: 6.2.1...6.3.0

Don't miss a new psl release

NewReleases is sending notifications on new releases.