Skip to content

Clean supported metadata driver types - #948

Merged
GromNaN merged 2 commits into
doctrine:5.5.xfrom
GromNaN:driver-types
Nov 14, 2025
Merged

Clean supported metadata driver types#948
GromNaN merged 2 commits into
doctrine:5.5.xfrom
GromNaN:driver-types

Conversation

@GromNaN

@GromNaN GromNaN commented Nov 14, 2025

Copy link
Copy Markdown
Member

After #923, we can cleanup some legacy.

  • The yml format isn't supported since MongoDB ODM v2
  • The php and staticphp format have never been supported by the bundle itself. They require a custom driver configuration (see Static PHP config #936)

@GromNaN GromNaN added this to the 5.5.0 milestone Nov 14, 2025
@GromNaN
GromNaN requested review from greg0ire and jmikola November 14, 2025 16:42
@GromNaN GromNaN added the DX label Nov 14, 2025
throw new InvalidArgumentException(sprintf('Specified non-existing directory "%s" as Doctrine mapping source.', $mappingConfig['dir']));
}

if (! in_array($mappingConfig['type'], ['xml', 'php', 'staticphp', 'attribute'])) {

@GromNaN GromNaN Nov 14, 2025

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using php or static php currently fails in

protected function getMetadataDriverClass(string $driverType): string
{
return match ($driverType) {
'driver_chain' => MappingDriverChain::class,
'attribute' => AttributeDriver::class,
'xml' => XmlDriver::class,
default => throw new InvalidArgumentException(sprintf('Metadata driver not supported: "%s"', $driverType))
};
}

@GromNaN
GromNaN merged commit da3bfe0 into doctrine:5.5.x Nov 14, 2025
11 checks passed
@GromNaN
GromNaN deleted the driver-types branch November 14, 2025 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants