PHP CPP v2.2.0 Release Notes

Release Date: 2019-04-05 // about 5 years ago
  • โš  WARNING: Breaking changes to the ABI and API regarding the Error class

    ๐Ÿš€ Warning: commit dfe4a94 breaks build on PHP7.0 and PHP7.1. Needs fix before proper release

    • ๐Ÿ‘ป Renamed exception to throwable
    • Enumeration Php::Error has been renamed to Php::ErrorType to make room for the new Php::Error class
    • โž• Added new class Php::Error that can be used for throwing errors (PHP7 normally throws errors instead of reporting fatal errors, which is what PHP5 did)
    • ๐Ÿ‘ป Php::Exception is now only used for exceptions and no longer for errors (so extensions can be written to only catch exceptions, and not the errors)
    • โœ‚ Removed support for Exception::file() and Exception::line()
    • A couple of functions that used to report fatal errors, now throw an Php::Error object instead
    • ๐Ÿ›  fixed exception handling for class methods and functions (uncaught Error objects caused a full crash, now they cause a fatal error)
    • ๐Ÿ‘ป when calling an invalid function we no longer throw an exception, but an error
    • ๐Ÿ“‡ renamed ErrorType to Message
    • ๐Ÿ‘ป closures now get an empty string as name because exception handling functions sometimes need access to the name
    • ๐Ÿ›  fixed issue when dealing with optional object parameters

Previous changes from v2.1.4

    • โž• added Php::Stream class