File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
lib/internal/Magento/Framework/Interception/Code Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,16 @@ class InterfaceValidator
29
29
*/
30
30
protected $ _argumentsReader ;
31
31
32
+ /**
33
+ * List of optional packages
34
+ *
35
+ * @var array
36
+ */
37
+ private array $ optionalPackages = [
38
+ 'Swoole ' ,
39
+ 'OpenSwoole '
40
+ ];
41
+
32
42
/**
33
43
* @param ArgumentsReader $argumentsReader
34
44
*/
@@ -50,6 +60,12 @@ public function __construct(ArgumentsReader $argumentsReader = null)
50
60
*/
51
61
public function validate ($ pluginClass , $ interceptedType )
52
62
{
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
+
53
69
$ interceptedType = '\\' . trim ((string )$ interceptedType , '\\' );
54
70
$ pluginClass = '\\' . trim ((string )$ pluginClass , '\\' );
55
71
$ plugin = new \ReflectionClass ($ pluginClass );
You can’t perform that action at this time.
0 commit comments