Skip to content

Commit 7d2b5c0

Browse files
author
github-ci
committed
fix(wechat-work-push-bundle): 修复 SendMessageListenerTest 中的 final 类 mock 问题
1 parent 2761e03 commit 7d2b5c0

30 files changed

+165
-251
lines changed

src/DependencyInjection/AopExtension.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Symfony\Component\DependencyInjection\Extension\Extension;
88
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
99

10+
/** @phpstan-ignore-next-line */
1011
class AopExtension extends Extension
1112
{
1213
public function load(array $configs, ContainerBuilder $container): void

src/DependencyInjection/Compiler/AopAttributeCompilerPass.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public function process(ContainerBuilder $container): void
4040
// 收集所有的 Aspect
4141
// 需要解析其中的所有 Method,判断是否存在切面
4242
$statements = [];
43+
// @phpstan-ignore-next-line symfony.noFindTaggedServiceIdsCall
4344
foreach (array_keys($container->findTaggedServiceIds(Aspect::TAG_NAME)) as $serviceId) {
4445
$reflectionClass = $this->getReflectionClass($container, $serviceId);
4546
if ($reflectionClass === null) {

src/Service/AopInterceptor.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ public function __invoke(object $proxy, object $instance, string $method, array
144144
}
145145
}
146146

147+
/** @phpstan-ignore-next-line */
147148
$returnValue = $instance->{$method}(...$params);
148149
$joinPoint->setReturnValue($returnValue);
149150

src/Service/InstanceService.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ public function create(JoinPoint $joinPoint): object
1414
$factoryArguments = $joinPoint->getFactoryArguments();
1515

1616
if (is_string($factoryInstance)) {
17+
/** @phpstan-ignore-next-line */
1718
return $factoryInstance::{$factoryMethod}(...$factoryArguments);
1819
//return call_user_func_array([$factoryInstance, $factoryMethod], $factoryArguments);
1920
}
2021
if (is_object($factoryInstance)) {
22+
/** @phpstan-ignore-next-line */
2123
return $factoryInstance->{$factoryMethod}(...$factoryArguments);
2224
}
2325
return clone $instance;

tests/DependencyInjection/Compiler/Fixtures/AbstractServiceClass.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Tourze\Symfony\Aop\Tests\DependencyInjection\Compiler\Fixtures;
44

5+
/** @phpstan-ignore-next-line */
56
abstract class AbstractServiceClass
67
{
78
abstract public function process(): void;

tests/DependencyInjection/Compiler/Fixtures/AspectClass.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Tourze\Symfony\Aop\Attribute\Before;
88
use Tourze\Symfony\Aop\Model\JoinPoint;
99

10+
/** @phpstan-ignore-next-line */
1011
#[Aspect]
1112
class AspectClass
1213
{

tests/DependencyInjection/Compiler/Fixtures/AspectClassForInterfaces.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Tourze\Symfony\Aop\Attribute\Before;
77
use Tourze\Symfony\Aop\Model\JoinPoint;
88

9+
/** @phpstan-ignore-next-line */
910
#[Aspect]
1011
class AspectClassForInterfaces
1112
{

tests/DependencyInjection/Compiler/Fixtures/AspectClassForParents.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Tourze\Symfony\Aop\Attribute\Before;
77
use Tourze\Symfony\Aop\Model\JoinPoint;
88

9+
/** @phpstan-ignore-next-line */
910
#[Aspect]
1011
class AspectClassForParents
1112
{

tests/DependencyInjection/Compiler/Fixtures/AspectClassForTags.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Tourze\Symfony\Aop\Attribute\Aspect;
77
use Tourze\Symfony\Aop\Model\JoinPoint;
88

9+
/** @phpstan-ignore-next-line */
910
#[Aspect]
1011
class AspectClassForTags
1112
{

tests/DependencyInjection/Compiler/Fixtures/AspectWithMultipleAdvices.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Tourze\Symfony\Aop\Attribute\Before;
1010
use Tourze\Symfony\Aop\Model\JoinPoint;
1111

12+
/** @phpstan-ignore-next-line */
1213
#[Aspect]
1314
class AspectWithMultipleAdvices
1415
{

0 commit comments

Comments
 (0)