diff --git a/composer.json b/composer.json index 1022d46e..b58e82b0 100644 --- a/composer.json +++ b/composer.json @@ -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": { diff --git a/src/Translator.php b/src/Translator.php index ac88f05f..6fe05ff5 100644 --- a/src/Translator.php +++ b/src/Translator.php @@ -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'; diff --git a/tests/compiler/closure/request-root-shutdown-cleanup.phpt b/tests/compiler/closure/request-root-shutdown-cleanup.phpt new file mode 100644 index 00000000..3fb631ec --- /dev/null +++ b/tests/compiler/closure/request-root-shutdown-cleanup.phpt @@ -0,0 +1,38 @@ +--TEST-- +request shutdown releases compiled globals, static properties and closure cycles +--FILE-- +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 diff --git a/version.txt b/version.txt index 8770aa24..304a6a57 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1108 \ No newline at end of file +1109 \ No newline at end of file