rfc:throw_error_in_extensions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rfc:throw_error_in_extensions [2016/06/27 15:56] trowskirfc:throw_error_in_extensions [2017/09/22 13:28] (current) – external edit 127.0.0.1
Line 3: Line 3:
   * Date: 2016-06-14   * Date: 2016-06-14
   * Author: Aaron Piotrowski <aaron@trowski.com>   * Author: Aaron Piotrowski <aaron@trowski.com>
-  * Status: Voting+  * Status: Accepted
   * First Published at: http://wiki.php.net/rfc/throw_error_in_extensions   * First Published at: http://wiki.php.net/rfc/throw_error_in_extensions
  
Line 12: Line 12:
 This RFC proposes changing most conditions raising an ''E_ERROR'' or ''E_RECOVERABLE_ERROR'' errors to throw an instance of ''Error'' instead. Conditions due to memory errors or other unrecoverable errors will still remain fatal errors. This RFC proposes changing most conditions raising an ''E_ERROR'' or ''E_RECOVERABLE_ERROR'' errors to throw an instance of ''Error'' instead. Conditions due to memory errors or other unrecoverable errors will still remain fatal errors.
  
-Please see [[https://github.com/php/php-src/pull/1942|PR #1942]] for a complete diff of all the conditions changed to throw an ''Error''.+Below is a list of extensions and what conditions were changed to throw an instance of Error instead of a fatal or recoverable error. 
 + 
 +  * Date: 
 +      * Invalid serialization data for a DateTime or DatePeriod object will now throw an instance of Error from %%__wakeup()%% or %%__set_state()%% instead of resulting in a fatal error. 
 +      * Timezone initialization failure from serialized data will now throw an instance of Error from %%__wakeup()%% or %%__set_state()%% instead of resulting in a fatal error. 
 + 
 +  * DOM: 
 +      * Invalid schema or RelaxNG validation contexts will throw an instance of Error instead of resulting in a fatal error. 
 +      * Attempting to register a node class that does not extend the appropriate base class will now throw an instance of Error instead of resulting in a fatal error. 
 +      * Attempting to read an invalid or write to a readonly property will throw an instance of Error instead of resulting in a fatal error. 
 + 
 +  * IMAP: 
 +      * An email address longer than 16385 bytes will throw an instance of Error instead of resulting in a fatal error.  
 +  * Intl: 
 +      * Failure to call the parent constructor in a class extending Collator before invoking the parent methods will throw an instance of Error instead of resulting in a recoverable fatal error. 
 +      * Cloning a Transliterator object may will now throw an instance of Error instead of resulting in a fatal error if cloning the internal transliterator fails. 
 + 
 +  * LDAP: 
 +      * Providing an unknown modification type to ldap_batch_modify() will now throw an instance of Error instead of resulting in a fatal error. 
 + 
 +  * mbstring: 
 +      * mb_ereg() and mb_eregi() will now throw an instance of ParseError if an invalid PHP expression is provided and the 'eoption is used. 
 + 
 +  * mcrypt: 
 +      * mcrypt_encrypt() and mcrypt_decrypt() will throw an instance of Error instead of resulting in a fatal error if mcrypt cannot be initialized. 
 + 
 +  * mysqli: 
 +      * Attempting to read an invalid or write to a readonly property will throw an instance of Error instead of resulting in a fatal error. 
 + 
 +  * Reflection: 
 +      * Failure to retrieve a reflection object or retrieve an object property will now throw an instance of Error instead of resulting in a fatal error. 
 + 
 +  * Session: 
 +      * Custom session handlers that do not return strings for session IDs will now throw an instance of Error instead of resulting in a fatal error when a function is called that must generate a session ID. 
 +      * An invalid setting for session.hash_function will throw an instance of Error instead of resulting in a fatal error when a session ID is created. 
 + 
 +  * SimpleXML: 
 +      * Creating an unnamed or duplicate attribute will throw an instance of Error instead of resulting in a fatal error. 
 + 
 +  * SPL: 
 +      * Attempting to clone an SplDirectory object will throw an instance of Error instead of resulting in a fatal error. 
 +      * Calling ArrayIterator::append() when iterating over an object will throw an instance of Error instead of resulting in a fatal error. 
 + 
 +  * Standard: 
 +      * assert() will throw a ParseError when evaluating a string given as the first argument if the PHP code is invalid instead of resulting in a catchable fatal error. 
 +      * Calling forward_static_call() outside of a class scope will now throw an instance of Error instead of resulting in a fatal error. 
 + 
 +  * Tidy: 
 +      * Creating a tidyNode manually will now throw an instance of Error instead of resulting in a fatal error. 
 + 
 +  * WDDX: 
 +      * A circular reference when serializing will now throw an instance of Error instead of resulting in a fatal error. 
 + 
 +  * XML-RPC: 
 +      * A circular reference when serializing will now throw an instance of Error instead of resulting in a fatal error. 
 + 
 +  * Zip: 
 +      * ZipArchive::addGlob() will throw an instance of Error instead of resulting in a fatal error if glob support is not available.
  
 ===== Backward Incompatible Changes ===== ===== Backward Incompatible Changes =====
Line 23: Line 80:
 A majority of 50%+1 is required to approve this RFC. A majority of 50%+1 is required to approve this RFC.
  
-Voting opened on 6/27/16 at 4:00 pm GMT and will remain open until 7/4/16 at 11:59 pm GMT+Voting opened on 2016-06-27 at 4:00 pm GMT and will remain open until 2016-07-04 at 11:59 pm GMT
  
-<doodle title="Merge patch for PHP 7.1" auth="trowski" voteType="single" closed="false">+<doodle title="Merge patch for PHP 7.1" auth="trowski" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
rfc/throw_error_in_extensions.1467042990.txt.gz · Last modified: 2017/09/22 13:28 (external edit)