[PR #315] Allowing proxies to be passed to ORM public API #8019

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

Original Pull Request: https://github.com/doctrine/orm/pull/315

State: closed
Merged: Yes


Basically, following happens:

$proxy = some_unserialization();
$em->persist($proxy); // exception because the class name is not recognized

This change forces loading of metadata even with proxy class names passed to the ClassMetadataFactory API.

I need some feedback on the test cases. All three tests fail without the patch, while Build Status with it applied.

What is a bit tricky is the status of the proxies.

Cases where $__initialized__ = false; && $_identifier = array(); and others fail because of notices and weird issues that are very difficult to hunt down. That is because of the strange nature of proxies obviously. I just wanted to know if this should be somehow fixed in here.

**Original Pull Request:** https://github.com/doctrine/orm/pull/315 **State:** closed **Merged:** Yes --- Basically, following happens: ``` php $proxy = some_unserialization(); $em->persist($proxy); // exception because the class name is not recognized ``` This change forces loading of metadata even with proxy class names passed to the `ClassMetadataFactory` API. I need some feedback on the test cases. All three tests fail without the patch, while [![Build Status](https://secure.travis-ci.org/Ocramius/doctrine2.png?branch=getclass-on-proxies-refactoring)](http://travis-ci.org/Ocramius/doctrine2) with it applied. What is a bit tricky is the status of the proxies. Cases where `$__initialized__ = false;` && `$_identifier = array();` and others fail because of notices and weird issues that are very difficult to hunt down. That is because of the strange nature of proxies obviously. I just wanted to know if this should be somehow fixed in here.
admin added the pull-request label 2026-01-22 15:58:00 +01:00
admin closed this issue 2026-01-22 15:58:00 +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#8019