File tree Expand file tree Collapse file tree 3 files changed +3
-7
lines changed
src/Symfony/Bridge/ProxyManager Expand file tree Collapse file tree 3 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -119,8 +119,6 @@ private function getProxyClassName(Definition $definition)
119
119
}
120
120
121
121
/**
122
- * @param Definition $definition
123
- *
124
122
* @return ClassGenerator
125
123
*/
126
124
private function generateProxyClass (Definition $ definition )
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Bridge \ProxyManager \Tests \LazyProxy \Dumper ;
13
13
14
+ use ProxyManager \ProxyGenerator \LazyLoading \MethodGenerator \StaticProxyConstructor ;
14
15
use Symfony \Bridge \ProxyManager \LazyProxy \PhpDumper \ProxyDumper ;
15
16
use Symfony \Component \DependencyInjection \ContainerBuilder ;
16
17
use Symfony \Component \DependencyInjection \Dumper \PhpDumper ;
@@ -49,8 +50,7 @@ public function testDumpContainerWithProxyService()
49
50
*/
50
51
public function testDumpContainerWithProxyServiceWillShareProxies ()
51
52
{
52
- // detecting ProxyManager v2
53
- if (class_exists ('ProxyManager\ProxyGenerator\LazyLoading\MethodGenerator\StaticProxyConstructor ' )) {
53
+ if (class_exists (StaticProxyConstructor::class)) { // detecting ProxyManager v2
54
54
require_once __DIR__ .'/../Fixtures/php/lazy_service_with_hints.php ' ;
55
55
} else {
56
56
require_once __DIR__ .'/../Fixtures/php/lazy_service.php ' ;
Original file line number Diff line number Diff line change @@ -38,10 +38,8 @@ public function __construct()
38
38
public function getFooService ($ lazyLoad = true )
39
39
{
40
40
if ($ lazyLoad ) {
41
- $ container = $ this ;
42
-
43
41
return $ this ->services ['foo ' ] = new stdClass_c1d194250ee2e2b7d2eab8b8212368a8 (
44
- function (&$ wrappedInstance , \ProxyManager \Proxy \LazyLoadingInterface $ proxy ) use ( $ container ) {
42
+ function (&$ wrappedInstance , \ProxyManager \Proxy \LazyLoadingInterface $ proxy ) {
45
43
$ wrappedInstance = $ this ->getFooService (false );
46
44
47
45
$ proxy ->setProxyInitializer (null );
You can’t perform that action at this time.
0 commit comments