Skip to content

Commit

Permalink
minor #33554 [DoctrineBridge] getMetadataDriverClass() is abstract no…
Browse files Browse the repository at this point in the history
…w (xabbuh)

This PR was merged into the 5.0-dev branch.

Discussion
----------

[DoctrineBridge] getMetadataDriverClass() is abstract now

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Commits
-------

b89b71f getMetadataDriverClass() is abstract now
  • Loading branch information
fabpot committed Sep 11, 2019
2 parents ee94e85 + b89b71f commit 3db419e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/Symfony/Bridge/Doctrine/CHANGELOG.md
Expand Up @@ -4,6 +4,7 @@ CHANGELOG
5.0.0
-----

* the `getMetadataDriverClass()` method is abstract and must be implemented by class extending `AbstractDoctrineExtension`
* passing an `IdReader` to the `DoctrineChoiceLoader` when the query cannot be optimized with single id field, throws an exception; pass `null` instead
* not explicitly passing an instance of `IdReader` to `DoctrineChoiceLoader` when it can optimize single id field, will not apply any optimization
* `DoctrineExtractor` now requires an `EntityManagerInterface` on instantiation
Expand Down
Expand Up @@ -417,12 +417,7 @@ abstract protected function getMappingResourceExtension();
/**
* The class name used by the various mapping drivers.
*/
protected function getMetadataDriverClass(string $driverType): string
{
@trigger_error(sprintf('Not declaring the "%s" method in class "%s" is deprecated since Symfony 4.4. This method will be abstract in Symfony 5.0.', __METHOD__, static::class), E_USER_DEPRECATED);

return '%'.$this->getObjectManagerElementName('metadata.'.$driverType.'.class%');
}
abstract protected function getMetadataDriverClass(string $driverType): string;

/**
* Search for a manager that is declared as 'auto_mapping' = true.
Expand Down
Expand Up @@ -37,6 +37,7 @@ protected function setUp(): void
'getObjectManagerElementName',
'getMappingObjectDefaultName',
'getMappingResourceExtension',
'getMetadataDriverClass',
'load',
])
->getMock()
Expand Down

0 comments on commit 3db419e

Please sign in to comment.