chore(deps): update swoole/phpx dependency to version ~2.6.1

- Updated swoole/phpx from ~2.6.0 to ~2.6.1 in composer.json
- Incremented version number in version.txt from 1108 to 1109
- Bumped package version constant in Translator.php from 0.6.0 to 0.6.1
- Added new test file for request root shutdown cleanup functionality
master
韩天峰 6 days ago
parent 0d0e62fbc7
commit 729000fa0c
  1. 2
      composer.json
  2. 2
      src/Translator.php
  3. 38
      tests/compiler/closure/request-root-shutdown-cleanup.phpt
  4. 2
      version.txt

@ -12,7 +12,7 @@
"marcj/topsort": "^2.0",
"symfony/var-dumper": "^8.0",
"symfony/yaml": "^8.0",
"swoole/phpx": "~2.6.0",
"swoole/phpx": "~2.6.1",
"ajaxray/ansikit": "^0.3.1"
},
"require-dev": {

@ -64,7 +64,7 @@ class Translator extends Preprocessor
use ResourceCompilationTrait;
use ClassConstantValueTrait;
public const string VERSION = '0.6.0';
public const string VERSION = '0.6.1';
public const string APP_NAME = 'TypePHP Compiler (AOT)';
protected string $targetName = 'app';

@ -0,0 +1,38 @@
--TEST--
request shutdown releases compiled globals, static properties and closure cycles
--FILE--
<?php
class RequestRootNode
{
public ?RequestRootNode $next = null;
}
class RequestRootCache
{
public static array $objects = [];
public static ?Closure $callback = null;
}
function main(): void
{
global $requestRootObjects;
$first = new RequestRootNode();
$second = new RequestRootNode();
$first->next = $second;
$second->next = $first;
$requestRootObjects = [$first, $second];
RequestRootCache::$objects = [$first, $second];
$callback = null;
$callback = static function () use (&$callback): void {
};
RequestRootCache::$callback = $callback;
echo "done\n";
}
?>
--EXPECT--
done

@ -1 +1 @@
1108
1109
Loading…
Cancel
Save