@@ -64,6 +64,15 @@ public function getIdentityGenerationPreferences(): array
6464 */
6565 public function setProxyDir (string $ dir ): void
6666 {
67+ if (PHP_VERSION_ID >= 80400 ) {
68+ Deprecation::triggerIfCalledFromOutside (
69+ 'doctrine/orm ' ,
70+ 'https://github.com/doctrine/orm/pull/12005 ' ,
71+ 'Calling %s is deprecated and will not be possible in Doctrine ORM 4.0. ' ,
72+ __METHOD__ ,
73+ );
74+ }
75+
6776 $ this ->attributes ['proxyDir ' ] = $ dir ;
6877 }
6978
@@ -72,6 +81,15 @@ public function setProxyDir(string $dir): void
7281 */
7382 public function getProxyDir (): string |null
7483 {
84+ if (PHP_VERSION_ID >= 80400 ) {
85+ Deprecation::trigger (
86+ 'doctrine/orm ' ,
87+ 'https://github.com/doctrine/orm/pull/12005 ' ,
88+ 'Calling %s is deprecated and will not be possible in Doctrine ORM 4.0. ' ,
89+ __METHOD__ ,
90+ );
91+ }
92+
7593 return $ this ->attributes ['proxyDir ' ] ?? null ;
7694 }
7795
@@ -82,6 +100,15 @@ public function getProxyDir(): string|null
82100 */
83101 public function getAutoGenerateProxyClasses (): int
84102 {
103+ if (PHP_VERSION_ID >= 80400 ) {
104+ Deprecation::trigger (
105+ 'doctrine/orm ' ,
106+ 'https://github.com/doctrine/orm/pull/12005 ' ,
107+ 'Calling %s is deprecated and will not be possible in Doctrine ORM 4.0. ' ,
108+ __METHOD__ ,
109+ );
110+ }
111+
85112 return $ this ->attributes ['autoGenerateProxyClasses ' ] ?? ProxyFactory::AUTOGENERATE_ALWAYS ;
86113 }
87114
@@ -92,6 +119,15 @@ public function getAutoGenerateProxyClasses(): int
92119 */
93120 public function setAutoGenerateProxyClasses (bool |int $ autoGenerate ): void
94121 {
122+ if (PHP_VERSION_ID >= 80400 ) {
123+ Deprecation::triggerIfCalledFromOutside (
124+ 'doctrine/orm ' ,
125+ 'https://github.com/doctrine/orm/pull/12005 ' ,
126+ 'Calling %s is deprecated and will not be possible in Doctrine ORM 4.0. ' ,
127+ __METHOD__ ,
128+ );
129+ }
130+
95131 $ this ->attributes ['autoGenerateProxyClasses ' ] = (int ) $ autoGenerate ;
96132 }
97133
@@ -100,6 +136,15 @@ public function setAutoGenerateProxyClasses(bool|int $autoGenerate): void
100136 */
101137 public function getProxyNamespace (): string |null
102138 {
139+ if (PHP_VERSION_ID >= 80400 ) {
140+ Deprecation::trigger (
141+ 'doctrine/orm ' ,
142+ 'https://github.com/doctrine/orm/pull/12005 ' ,
143+ 'Calling %s is deprecated and will not be possible in Doctrine ORM 4.0. ' ,
144+ __METHOD__ ,
145+ );
146+ }
147+
103148 return $ this ->attributes ['proxyNamespace ' ] ?? null ;
104149 }
105150
@@ -108,6 +153,15 @@ public function getProxyNamespace(): string|null
108153 */
109154 public function setProxyNamespace (string $ ns ): void
110155 {
156+ if (PHP_VERSION_ID >= 80400 ) {
157+ Deprecation::triggerIfCalledFromOutside (
158+ 'doctrine/orm ' ,
159+ 'https://github.com/doctrine/orm/pull/12005 ' ,
160+ 'Calling %s is deprecated and will not be possible in Doctrine ORM 4.0. ' ,
161+ __METHOD__ ,
162+ );
163+ }
164+
111165 $ this ->attributes ['proxyNamespace ' ] = $ ns ;
112166 }
113167
0 commit comments