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

Skip to content

Commit 939d3bf

Browse files
bug #35049 [ProxyManager] fix generating proxies for root-namespaced classes (nicolas-grekas)
This PR was merged into the 3.4 branch. Discussion ---------- [ProxyManager] fix generating proxies for root-namespaced classes | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #34863 | License | MIT | Doc PR | - Commits ------- a47ae10 [ProxyManager] fix generating proxies for root-namespaced classes
2 parents f11a282 + a47ae10 commit 939d3bf

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)