l3pp4rd/DoctrineExtensions — pull request #395 by ryanalane (2012-07-13 22:05:24+00:00)
Title: Fixes #394 - Error accessing getPaths() and getFileExtension() for YamlDriver and XmlDriver

The previously used `->getLocator()->getPaths()` syntax applies to the Doctrine\Common\Persistence\Mapping\Driver\FileDriver type. However, here in ExtensionMetadataFactory.php, 'FileDriver' is used as a namespace alias for Gedmo\Mapping\Driver\File. The original Doctrine drivers on which `->getLocator()->getPaths()` was called (instances of YamlDriver or XmlDriver) do not extend Doctrine's FileDriver, and thus have no `getLocator()` method nor `$locator` field. Fortunately, `YamlDriver` and `XmlDriver` *do* extend Doctrine's `AbstractFileDriver`, which defines `getPaths()` and `getFileExtension()` methods directly.

Examples of errors thrown prior to this fix:

```
PHP Fatal error: Call to undefined method Doctrine\ORM\Mapping\Driver\YamlDriver::getLocator()
```

And from Issue #394:
```
Fatal error: Call to undefined method Doctrine\ORM\Mapping\Driver\SimplifiedXmlDriver::getPaths()
```