ZF-12185: Zend/EventManager exceptions are not valid PHP 5.2

Description

Zend\EventManager\Exception\InvalidArgumentException.php


namespace Zend\EventManager\Exception;
use Zend\EventManager\Exception;

testcase:


+    
+    /**
+     * @expectedException Zend_EventManager_Exception_InvalidArgumentException
+     */
+    public function testExpectedExceptions1()
+    {
+        $this->events->attach('foo.bar');
+    }

PHP 5.2 output: PHP Parse error: syntax error, unexpected T_STRING in I:\xampp\zf\library\Zend\EventManager\Exception\InvalidArgumentException.php on line 24

However, is is probably broken even for PHP 5.3. PHP 5.3 output: Fatal error: Interface 'Zend\EventManager\Exception' not found in I:\xampp\zf\library\Zend\EventManager\Exception\InvalidArgumentException.php on line 38

//and can't choose EventManager as a component here in issue tracker - Zend_EventManager is not a valid component.

Comments

A quick grep of the source code shows a few namespace/use calls still exist:


[adam@zfdev library/Zend/EventManager]$ find . -type f | xargs grep -in -- "Zend\\\\"
./Exception/InvalidArgumentException.php:24:namespace Zend\EventManager\Exception;
./Exception/InvalidArgumentException.php:26:use Zend\EventManager\Exception;
./Exception.php:24:namespace Zend\EventManager;

Attached patch should resolve this issue.

Fixed in trunk (1.12.0): r24765