[PR #445] [CLOSED] Allow to add non existing maped class #8201

Closed
opened 2026-01-22 15:58:52 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/445
Author: @goetas
Created: 9/13/2012
Status: Closed

Base: masterHead: class-metadata


📝 Commits (1)

  • bae3681 allow to add non existing maped class

📊 Changes

1 file changed (+1 additions, -4 deletions)

View changed files

📝 lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php (+1 -4)

📄 Description

I've extended Doctrine\ORM\Mapping\Driver\DatabaseDriver with a more complicated schema conversion tool (that supports inheritance too).

i'm generating xml metadata starting from databse schema, then i generate entities starting from xml.

inside DatabaseDriver::loadMetadataForClass() i wanna call
$metadata->addDiscriminatorMapClass($discriminatorValue, $myClassName);

$myClassName at this point, probably does not exists, so addDiscriminatorMapClass throws an exception. i've removed class existence check to allow this behaviour.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/doctrine/orm/pull/445 **Author:** [@goetas](https://github.com/goetas) **Created:** 9/13/2012 **Status:** ❌ Closed **Base:** `master` ← **Head:** `class-metadata` --- ### 📝 Commits (1) - [`bae3681`](https://github.com/doctrine/orm/commit/bae36813c83c203ffe5a33230adca7a72a5bc075) allow to add non existing maped class ### 📊 Changes **1 file changed** (+1 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php` (+1 -4) </details> ### 📄 Description I've extended `Doctrine\ORM\Mapping\Driver\DatabaseDriver` with a more complicated schema conversion tool (that supports inheritance too). i'm generating xml metadata starting from databse schema, then i generate entities starting from xml. inside `DatabaseDriver::loadMetadataForClass()` i wanna call `$metadata->addDiscriminatorMapClass($discriminatorValue, $myClassName);` `$myClassName` at this point, probably does not exists, so `addDiscriminatorMapClass` throws an exception. i've removed class existence check to allow this behaviour. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
admin added the pull-request label 2026-01-22 15:58:52 +01:00
admin closed this issue 2026-01-22 15:58:53 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#8201