You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Use lazy ghosts unconditionally
* Stop extending proxy factory from doctrine/common
Extending it no longer serves any purpose.
* Transform annotation into actual method
Copy file name to clipboardExpand all lines: lib/Doctrine/ORM/Proxy/ProxyFactory.php
+7-174Lines changed: 7 additions & 174 deletions
Original file line number
Diff line number
Diff line change
@@ -5,11 +5,6 @@
5
5
namespaceDoctrine\ORM\Proxy;
6
6
7
7
useClosure;
8
-
useDoctrine\Common\Proxy\AbstractProxyFactory;
9
-
useDoctrine\Common\Proxy\ProxyasCommonProxy;
10
-
useDoctrine\Common\Proxy\ProxyDefinition;
11
-
useDoctrine\Common\Proxy\ProxyGenerator;
12
-
useDoctrine\Deprecations\Deprecation;
13
8
useDoctrine\ORM\EntityManagerInterface;
14
9
useDoctrine\ORM\EntityNotFoundException;
15
10
useDoctrine\ORM\ORMInvalidArgumentException;
@@ -20,7 +15,6 @@
20
15
useDoctrine\Persistence\Proxy;
21
16
useReflectionProperty;
22
17
useSymfony\Component\VarExporter\ProxyHelper;
23
-
useThrowable;
24
18
25
19
usefunctionarray_combine;
26
20
usefunctionarray_flip;
@@ -51,12 +45,11 @@
51
45
usefunctionucfirst;
52
46
53
47
useconstDIRECTORY_SEPARATOR;
54
-
useconstPHP_VERSION_ID;
55
48
56
49
/**
57
50
* This factory is used to create proxy objects for entities at runtime.
58
51
*/
59
-
class ProxyFactoryextends AbstractProxyFactory
52
+
class ProxyFactory
60
53
{
61
54
/**
62
55
* Never autogenerate a proxy and rely that it was generated by some
@@ -137,9 +130,6 @@ public function __serialize(): array
137
130
/** @var array<class-string, Closure> */
138
131
private$proxyFactories = [];
139
132
140
-
/** @var bool */
141
-
private$isLazyGhostObjectEnabled = true;
142
-
143
133
/**
144
134
* Initializes a new instance of the <tt>ProxyFactory</tt> class that is
145
135
* connected to the given <tt>EntityManager</tt>.
@@ -155,23 +145,6 @@ public function __construct(
155
145
privatereadonlystring$proxyNs,
156
146
bool|int$autoGenerate = self::AUTOGENERATE_NEVER,
157
147
) {
158
-
if (! $em->getConfiguration()->isLazyGhostObjectEnabled()) {
159
-
if (PHP_VERSION_ID >= 80100) {
160
-
Deprecation::trigger(
161
-
'doctrine/orm',
162
-
'https://github.com/doctrine/orm/pull/10837/',
163
-
'Not enabling lazy ghost objects is deprecated and will not be supported in Doctrine ORM 3.0. Ensure Doctrine\ORM\Configuration::setLazyGhostObjectEnabled(true) is called to enable them.',
0 commit comments