Klein v2.1.2 Release Notes
Release Date: 2017-02-01 // about 8 years ago-
๐ Features
- ๐ป PHP 7
Throwable
s will now properly be caught and sent up the exception handling chain. - ๐ป Expanded compatibility with other exception types in some method signatures
๐ Bug fixes
- ๐ป Broad exception catch statements will now properly handle PHP 7
Throwable
types
โฌ๏ธ Upgrading
Interface Changes
- ๐ป The
RoutePathCompilationException::createFromRoute()
method signature has changed to allow bothException
andThrowable
types with dual support for PHP 5 and PHP 7 - ๐ The 4th parameter to the callbacks supported by
Klein#onError
will now be able to receiveThrowable
types under PHP 7
- ๐ป PHP 7
Previous changes from v2.1.1
-
๐ Features
- 0๏ธโฃ 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 theResponse
class has been updated to fix an issue found when run under PHP-FPM - The
file()
method in theResponse
class will no longer send theContent-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 toKlein#error_callbacks
and it's array data-structure was changed to use anSplStack
Klein#httpErrorCallbacks
was renamed toKlein#http_error_callbacks
and it's array data-structure was changed to use anSplStack
Klein#afterFilterCallbacks
was renamed toKlein#after_filter_callbacks
and it's array data-structure was changed to use anSplQueue
- 0๏ธโฃ
Validator#defaultAdded
was renamed toValidator#default_added