Skip to content

Version 2.1.1 - PHP 7 and HHVM compatibility

Compare
Choose a tag to compare
@Rican7 Rican7 released this 01 Nov 06:06
· 13 commits to master since this release

Features

  • Header keys are now normalized, by default, to their canonical MIME format for consistency
  • Header key normalization is now customizable
  • Internal callback data-structures were moved from arrays to more appropriate SplQueue and SplStack instances, providing performance and memory footprint improvements
  • The PHPUnit version used for tests has been updated for HHVM compatibility
  • PHP 7.0 and HHVM compatibility!

Bug fixes

  • A few internal property/attribute names have been updated for consistency
  • An iteration bug effecting tests run under certain HHVM runtime versions has been fixed
  • The README document has been updated to fix a few errors
  • The file() method in the Response class has been updated to fix an issue found when run under PHP-FPM
  • The file() method in the Response class will no longer send the Content-Length header when the response has been chunked, to comply with the HTTP requirements defined in RFC 2616
  • References to the old https://github.com/chriso/klein.php repository URL have been updated to the new repository URL home of Klein: https://github.com/klein/klein.php
  • Tests were updated to pass under an expanded number of PHP runtime versions and configurations
  • A potential output buffer stack miss-handling in the dispatch process has been fixed

Upgrading

Deprecations

  • The HeaderDataCollection::normalizeName() method has been deprecated in favor of using new normalization options (via constant switches) and other more specific methods on the same class

Interface Changes

  • Three of the Klein internal callback attributes have changed both name and data structure. These attributes are protected, so the effect will only be felt by users that have extended and/or overwritten Klein's internal behaviors. The following changes were made:
    • Klein#errorCallbacks was renamed to Klein#error_callbacks and it's array data-structure was changed to use an SplStack
    • Klein#httpErrorCallbacks was renamed to Klein#http_error_callbacks and it's array data-structure was changed to use an SplStack
    • Klein#afterFilterCallbacks was renamed to Klein#after_filter_callbacks and it's array data-structure was changed to use an SplQueue
  • Validator#defaultAdded was renamed to Validator#default_added