Readded doctrine_extensions.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | --
| Fixed tickets | #820, #882
| License       | MIT
| Doc PR        | --