Skip to content

Commit dfb74c2

Browse files
committed
ACPT-1688: Fix Static Tests failures on Application-Server branch
1 parent 7b5b588 commit dfb74c2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

lib/internal/Magento/Framework/Interception/Code/InterfaceValidator.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ class InterfaceValidator
2929
*/
3030
protected $_argumentsReader;
3131

32+
/**
33+
* List of optional packages
34+
*
35+
* @var array
36+
*/
37+
private array $optionalPackages = [
38+
'Swoole',
39+
'OpenSwoole'
40+
];
41+
3242
/**
3343
* @param ArgumentsReader $argumentsReader
3444
*/
@@ -50,6 +60,12 @@ public function __construct(ArgumentsReader $argumentsReader = null)
5060
*/
5161
public function validate($pluginClass, $interceptedType)
5262
{
63+
// check if $interceptedType is a part of optional package
64+
$interceptedPackage = strstr(trim((string)$interceptedType), "\\", true);
65+
if (in_array($interceptedPackage, $this->optionalPackages)) {
66+
return;
67+
}
68+
5369
$interceptedType = '\\' . trim((string)$interceptedType, '\\');
5470
$pluginClass = '\\' . trim((string)$pluginClass, '\\');
5571
$plugin = new \ReflectionClass($pluginClass);

0 commit comments

Comments
 (0)