chore(deps): 更新 swoole/phpx 依赖版本

- 将 swoole/phpx 从 ~2.1.3 更新到 ~2.1.5
- 添加动态调用方法测试用例 method-002.phpt
- 新增命名参数调用功能的测试验证
- 添加对象动态方法调用的相关测试代码
pull/1/head
韩天峰 4 months ago
parent 2c041ab8e1
commit 436e09f6ae
  1. 2
      composer.json
  2. 32
      tests/aot/dynamic_call/method-002.phpt

@ -7,7 +7,7 @@
"marcj/topsort": "^2.0",
"symfony/var-dumper": "^8.0",
"symfony/yaml": "^8.0",
"swoole/phpx": "~2.1.3"
"swoole/phpx": "~2.1.5"
},
"require-dev": {
"phpunit/phpunit": "^10.4",

@ -0,0 +1,32 @@
--TEST--
named args
--FILE--
<?php
class FooObject
{
public function bar($args)
{
var_dump($args);
}
public function run() {
$array['handler'] = 'bar';
$this->{$array['handler']}([2026, 'ae86', 'bmw']);
}
}
function main()
{
$object = new FooObject;
$object->run();
}
?>
--EXPECT--
array(3) {
[0]=>
int(2026)
[1]=>
string(4) "ae86"
[2]=>
string(3) "bmw"
}
Loading…
Cancel
Save