Skip to content

Commit e3f8c9d

Browse files
committed
v1.7.1 Fix curcular exception
1 parent 00dfe3f commit e3f8c9d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Proxy/ProxyFactory.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,8 @@ private function createProxyClass(
200200
string $methods,
201201
bool $isInterface,
202202
): string {
203-
$template = "final readonly class %s %s %s
203+
$template = "final %s class %s %s %s
204204
{
205-
private ?%s \$_proxiedObject;
206-
207205
public function __construct(
208206
private \Psr\Container\ContainerInterface \$container
209207
) {
@@ -222,11 +220,11 @@ private function _proxied(): %s
222220

223221
return \sprintf(
224222
$template,
223+
$classRef->isReadOnly() ? 'readonly' : '',
225224
$proxyClassName,
226225
$isInterface ? 'implements' : 'extends',
227226
$fullClassName,
228227
$fullClassName,
229-
$fullClassName,
230228
$this->createProxyClassConstructor($classRef),
231229
$methods
232230
);

0 commit comments

Comments
 (0)