From 22ec3799d79b1b7be69b48081ab137f397f34379 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 24 Jan 2023 15:02:24 +0100 Subject: [PATCH 1/3] Update license years (last time) --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 0083704..0138f8f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2023 Fabien Potencier +Copyright (c) 2004-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From a1ac84c9a905d696a690e2ee65335dc6988422a6 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Wed, 14 Dec 2022 15:42:16 +0100 Subject: [PATCH 2/3] Migrate to `static` data providers using `rector/rector` --- Tests/LazyProxy/PhpDumper/ProxyDumperTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php b/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php index e787da9..65c74c0 100644 --- a/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php +++ b/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php @@ -93,7 +93,7 @@ public function testCorrectAssigning(Definition $definition, $access) $this->assertStringMatchesFormat('%A$this->'.$access.'[\'foo\'] = %A', $code); } - public function getPrivatePublicDefinitions() + public static function getPrivatePublicDefinitions() { return [ [ @@ -164,7 +164,7 @@ protected function createProxy(\$class, \Closure \$factory) $this->assertSame(123, @$foo->dynamicProp); } - public function getProxyCandidates(): array + public static function getProxyCandidates(): array { $definitions = [ [new Definition(__CLASS__), true], From a4cf96f3acfa252503a216bea877478f9621c7c0 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 16 Feb 2023 10:33:00 +0100 Subject: [PATCH 3/3] CS fix --- Tests/LazyProxy/ContainerBuilderTest.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Tests/LazyProxy/ContainerBuilderTest.php b/Tests/LazyProxy/ContainerBuilderTest.php index 69b7239..cf3d2cd 100644 --- a/Tests/LazyProxy/ContainerBuilderTest.php +++ b/Tests/LazyProxy/ContainerBuilderTest.php @@ -15,7 +15,6 @@ use PHPUnit\Framework\TestCase; use ProxyManager\Proxy\LazyLoadingInterface; -use ProxyManagerBridgeFooClass; use Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator; use Symfony\Component\DependencyInjection\ContainerBuilder; @@ -33,7 +32,7 @@ public function testCreateProxyServiceWithRuntimeInstantiator() $builder->setProxyInstantiator(new RuntimeInstantiator()); - $builder->register('foo1', ProxyManagerBridgeFooClass::class)->setFile(__DIR__.'/Fixtures/includes/foo.php')->setPublic(true); + $builder->register('foo1', \ProxyManagerBridgeFooClass::class)->setFile(__DIR__.'/Fixtures/includes/foo.php')->setPublic(true); $builder->getDefinition('foo1')->setLazy(true); $builder->compile(); @@ -45,7 +44,7 @@ public function testCreateProxyServiceWithRuntimeInstantiator() $this->assertSame(0, $foo1::$destructorCount); $this->assertSame($foo1, $builder->get('foo1'), 'The same proxy is retrieved on multiple subsequent calls'); - $this->assertInstanceOf(ProxyManagerBridgeFooClass::class, $foo1); + $this->assertInstanceOf(\ProxyManagerBridgeFooClass::class, $foo1); $this->assertInstanceOf(LazyLoadingInterface::class, $foo1); $this->assertFalse($foo1->isProxyInitialized()); @@ -53,7 +52,7 @@ public function testCreateProxyServiceWithRuntimeInstantiator() $this->assertSame($foo1, $builder->get('foo1'), 'The same proxy is retrieved after initialization'); $this->assertTrue($foo1->isProxyInitialized()); - $this->assertInstanceOf(ProxyManagerBridgeFooClass::class, $foo1->getWrappedValueHolderValue()); + $this->assertInstanceOf(\ProxyManagerBridgeFooClass::class, $foo1->getWrappedValueHolderValue()); $this->assertNotInstanceOf(LazyLoadingInterface::class, $foo1->getWrappedValueHolderValue()); $foo1->__destruct();