Date:      Wed Feb 13 14:38:21 CET 2008
User:      Derick Rethans
Directory: xdebug
Log Message:
[0.50]
- MFH: Fixed abstract method detection.
Modified files:
           xdebug/xdebug_code_coverage.c    (version: 1.32.2.7)
Added files:
           xdebug/tests/coverage4.inc       (new version: 1.1.2.2)
           xdebug/tests/coverage4.phpt      (new version: 1.1.2.2)
[FILE: /xdebug/xdebug_code_coverage.c]
===================================================================
RCS file: cvstemp,v
retrieving revision 1.32.2.6
retrieving revision 1.32.2.7
diff -u -r1.32.2.6 -r1.32.2.7
--- xdebug/xdebug_code_coverage.c:1.32.2.6 Mon Nov 12 21:27:50 2007 GMT
+++ xdebug/xdebug_code_coverage.c Wed Feb 13 12:38:21 2008 GMT
@@ -234,7 +234,11 @@
 #ifdef ZEND_ENGINE_2
         /* Check for abstract methods and simply return from this function in those
          * cases. */
+#if PHP_VERSION_ID >= 50300
+	if (opa->size >= 3 && opa->opcodes[opa->size - 3].opcode == ZEND_RAISE_ABSTRACT_ERROR)
+#else
         if (opa->size >= 4 && opa->opcodes[opa->size - 4].opcode == ZEND_RAISE_ABSTRACT_ERROR)
+#endif
         {
                 return;
         }	
[FILE: /xdebug/tests/coverage4.inc]
<?php
interface ezcFeedParser                                                         
{                                                                               
    /**                                                                         
     * Returns true if the parser can parse the provided XML document object,   
     * false otherwise.                                                         
     *                                                                          
     * @param DOMDocument $xml The XML document object to check for parseability
     * @return bool                                                             
     */                                                                         
    public static function canParse( DOMDocument $xml );                        
                                                                                
    /**                                                                         
     * Parses the provided XML document object and returns an ezcFeed object    
     * from it.                                                                 
     *                                                                          
     * @throws ezcFeedParseErrorException                                       
     *         If an error was encountered during parsing.                      
     *                                                                          
     * @param DOMDocument $xml The XML document object to parse                 
     * @return ezcFeed                                                          
     */                                                                         
    public function parse( DOMDocument $xml );                                  
}                                                                               
?>     
[FILE: /xdebug/tests/coverage4.phpt]
--TEST--
Test with Code Coverage with abstract methods (ZE2)
--SKIPIF--
<?php if (!extension_loaded("xdebug")) print "skip"; ?>
<?php if(version_compare(zend_version(), "2.0.0-dev", '<')) echo "skip Zend Engine 2 needed\n"; ?>
--INI--
xdebug.default_enable=1
xdebug.auto_trace=0
xdebug.trace_options=0
xdebug.trace_output_dir=/tmp
xdebug.collect_params=1
xdebug.collect_return=0
xdebug.auto_profile=0
xdebug.profiler_enable=0
xdebug.dump_globals=0
xdebug.show_mem_delta=0
xdebug.trace_format=0
xdebug.extended_info=1
--FILE--
<?php
    xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE);
        include 'coverage4.inc';
    xdebug_stop_code_coverage(false);
    var_dump(xdebug_get_code_coverage());
?>
--EXPECTF--
array(2) {
  ["%scoverage4.inc"]=>
  array(2) {
    [2]=>
    int(1)
    [26]=>
    int(1)
  }
  ["%scoverage4.php"]=>
  array(2) {
    [4]=>
    int(1)
    [6]=>
    int(1)
  }
}
Received on Wed Feb 13 2008 - 14:38:25 GMT
This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST