Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a47ae10

Browse files
[ProxyManager] fix generating proxies for root-namespaced classes
1 parent f11a282 commit a47ae10

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ public function getProxyFactoryCode(Definition $definition, $id, $factoryCode =
9797
public function getProxyCode(Definition $definition)
9898
{
9999
$code = $this->classGenerator->generate($this->generateProxyClass($definition));
100+
$code = preg_replace('/^(class [^ ]++ extends )([^\\\\])/', '$1\\\\$2', $code);
100101

101102
$code = preg_replace(
102103
'/(\$this->initializer[0-9a-f]++) && \1->__invoke\(\$this->(valueHolder[0-9a-f]++), (.*?), \1\);/',

src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service_structure.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ class LazyServiceProjectServiceContainer extends Container
2121
}
2222
}
2323

24-
class stdClass_%s extends %SstdClass implements \ProxyManager\%s
24+
class stdClass_%s extends \stdClass implements \ProxyManager\%s
2525
{%a}%A

0 commit comments

Comments
 (0)