PHP-CPP 2.2.0
Pre-release
Pre-release
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