diff --git a/.gitignore b/.gitignore index d8ebdcc..18849f0 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ app/**/temporal.exe app/tests/**/*.log app/runtime app/vendor +app/**/temporal-test-server +.DS_Store diff --git a/app/composer.json b/app/composer.json index fc9b985..09ebfd4 100644 --- a/app/composer.json +++ b/app/composer.json @@ -1,9 +1,15 @@ { "minimum-stability": "dev", "prefer-stable": true, + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/temporalio/sdk-php" + } + ], "require": { "spiral/tokenizer": "^3.16.0", - "temporal/sdk": "^2.17", + "temporal/sdk": "dev-nexus-new as 2.20.0", "temporal/open-telemetry-interceptors": "^1.0", "open-telemetry/exporter-otlp": "^1.3", "open-telemetry/transport-grpc": "^1.1", @@ -12,7 +18,8 @@ "require-dev": { "buggregator/trap": "^1.15", "internal/dload": "^1.8.0", - "phpunit/phpunit": "^10.5" + "phpunit/phpunit": "^10.5", + "phpstan/phpstan": "^2.2" }, "autoload": { "psr-4": { @@ -33,6 +40,7 @@ }, "scripts": { "get:binaries": "dload get --no-interaction -vv", - "test:feat": "phpunit --testsuite=Feature --color=always --testdox" + "test:feat": "phpunit --testsuite=Feature --color=always --testdox", + "phpstan": "phpstan analyse --memory-limit=2G" } } diff --git a/app/composer.lock b/app/composer.lock index 5da7a68..5cbafcd 100644 --- a/app/composer.lock +++ b/app/composer.lock @@ -4,28 +4,28 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e6e2a963ef95741e5a7bfe40d9478877", + "content-hash": "401b54840f3047ea5e072edb0890bc13", "packages": [ { "name": "brick/math", - "version": "0.14.1", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "f05858549e5f9d7bb45875a75583240a38a281d0" + "reference": "2effe05d2177c451b86c6a073196a4034c02f211" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/f05858549e5f9d7bb45875a75583240a38a281d0", - "reference": "f05858549e5f9d7bb45875a75583240a38a281d0", + "url": "https://api.github.com/repos/brick/math/zipball/2effe05d2177c451b86c6a073196a4034c02f211", + "reference": "2effe05d2177c451b86c6a073196a4034c02f211", "shasum": "" }, "require": { "php": "^8.2" }, "require-dev": { - "php-coveralls/php-coveralls": "^2.2", - "phpstan/phpstan": "2.1.22", + "phpstan/phpstan": "2.2.13", + "phpstan/phpstan-phpunit": "2.0.18", "phpunit/phpunit": "^11.5" }, "type": "library", @@ -56,7 +56,7 @@ ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.14.1" + "source": "https://github.com/brick/math/tree/1.0.0" }, "funding": [ { @@ -64,20 +64,20 @@ "type": "github" } ], - "time": "2025-11-24T14:40:29+00:00" + "time": "2026-09-12T10:28:18+00:00" }, { "name": "carbonphp/carbon-doctrine-types", - "version": "3.2.0", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/CarbonPHP/carbon-doctrine-types.git", - "reference": "18ba5ddfec8976260ead6e866180bd5d2f71aa1d" + "reference": "5fa5eacafd9ef47c8c6ab9143fc901ba0194d3dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/18ba5ddfec8976260ead6e866180bd5d2f71aa1d", - "reference": "18ba5ddfec8976260ead6e866180bd5d2f71aa1d", + "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/5fa5eacafd9ef47c8c6ab9143fc901ba0194d3dc", + "reference": "5fa5eacafd9ef47c8c6ab9143fc901ba0194d3dc", "shasum": "" }, "require": { @@ -92,6 +92,11 @@ "phpunit/phpunit": "^10.3" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, "autoload": { "psr-4": { "Carbon\\Doctrine\\": "src/Carbon/Doctrine/" @@ -117,7 +122,7 @@ ], "support": { "issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues", - "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/3.2.0" + "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/3.2.1" }, "funding": [ { @@ -133,20 +138,20 @@ "type": "tidelift" } ], - "time": "2024-02-09T16:56:22+00:00" + "time": "2026-09-06T14:11:38+00:00" }, { "name": "composer/semver", - "version": "3.4.4", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95" + "reference": "d92543b7ede9c4ec6b59853cefb061e39866d2cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/198166618906cb2de69b95d7d47e5fa8aa1b2b95", - "reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95", + "url": "https://api.github.com/repos/composer/semver/zipball/d92543b7ede9c4ec6b59853cefb061e39866d2cf", + "reference": "d92543b7ede9c4ec6b59853cefb061e39866d2cf", "shasum": "" }, "require": { @@ -188,7 +193,7 @@ "homepage": "http://robbast.nl" } ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", + "description": "Version comparison library that offers utilities, version constraint parsing and validation.", "keywords": [ "semantic", "semver", @@ -198,7 +203,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.4.4" + "source": "https://github.com/composer/semver/tree/3.6.0" }, "funding": [ { @@ -210,25 +215,25 @@ "type": "github" } ], - "time": "2025-08-20T19:15:30+00:00" + "time": "2026-10-29T09:13:34+00:00" }, { "name": "google/common-protos", - "version": "4.12.4", + "version": "4.15.0", "source": { "type": "git", "url": "https://github.com/googleapis/common-protos-php.git", - "reference": "0127156899af0df2681bd42024c60bd5360d64e3" + "reference": "74893ae29540a7166dab074cee8b57e78c534702" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/common-protos-php/zipball/0127156899af0df2681bd42024c60bd5360d64e3", - "reference": "0127156899af0df2681bd42024c60bd5360d64e3", + "url": "https://api.github.com/repos/googleapis/common-protos-php/zipball/74893ae29540a7166dab074cee8b57e78c534702", + "reference": "74893ae29540a7166dab074cee8b57e78c534702", "shasum": "" }, "require": { - "google/protobuf": "^4.31", - "php": "^8.1" + "google/protobuf": "^4.31||^5.0", + "php": "^8.2" }, "require-dev": { "phpunit/phpunit": "^9.6" @@ -267,9 +272,9 @@ "google" ], "support": { - "source": "https://github.com/googleapis/common-protos-php/tree/v4.12.4" + "source": "https://github.com/googleapis/common-protos-php/tree/v4.15.0" }, - "time": "2025-09-20T01:29:44+00:00" + "time": "2026-10-28T01:51:30+00:00" }, { "name": "google/protobuf", @@ -317,20 +322,20 @@ }, { "name": "grpc/grpc", - "version": "1.74.0", + "version": "1.85.0", "source": { "type": "git", "url": "https://github.com/grpc/grpc-php.git", - "reference": "32bf4dba256d60d395582fb6e4e8d3936bcdb713" + "reference": "08bd482ca6f99d45fa85ad0bd70876e7455e39cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/grpc/grpc-php/zipball/32bf4dba256d60d395582fb6e4e8d3936bcdb713", - "reference": "32bf4dba256d60d395582fb6e4e8d3936bcdb713", + "url": "https://api.github.com/repos/grpc/grpc-php/zipball/08bd482ca6f99d45fa85ad0bd70876e7455e39cf", + "reference": "08bd482ca6f99d45fa85ad0bd70876e7455e39cf", "shasum": "" }, "require": { - "php": ">=7.0.0" + "php": ">=8.2.0" }, "require-dev": { "google/auth": "^v1.3.0" @@ -355,9 +360,85 @@ "rpc" ], "support": { - "source": "https://github.com/grpc/grpc-php/tree/v1.74.0" + "source": "https://github.com/grpc/grpc-php/tree/v1.85.0" + }, + "time": "2026-10-28T05:30:17+00:00" + }, + { + "name": "internal/container", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-internal/container.git", + "reference": "a1a0cc23601c4d09bc21511cbccba8653069d50c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-internal/container/zipball/a1a0cc23601c4d09bc21511cbccba8653069d50c", + "reference": "a1a0cc23601c4d09bc21511cbccba8653069d50c", + "shasum": "" + }, + "require": { + "internal/destroy": "^1.0", + "php": ">=8.1", + "psr/container": "1 - 2", + "yiisoft/injector": "^1.2" + }, + "provide": { + "psr/container-implementation": "1.0 - 2.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8", + "llm/skills": "^1.12", + "revolt/event-loop": "^1.0", + "roxblnfk/unpoly": "^1.8", + "testo/codecov": "^0.2.1", + "testo/fiber": "^0.1.3", + "testo/testo": "^0.10.46" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false, + "target-directory": "tools" + } + }, + "autoload": { + "psr-4": { + "Internal\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Aleksei Gagarin", + "homepage": "https://github.com/roxblnfk" + } + ], + "description": "Lightweight PSR-11 container for CLI tools: autowiring, scopes, inflectors and explicit destruction without a DI framework.", + "keywords": [ + "Autowiring", + "PSR-11", + "cli", + "console", + "container", + "dependency injection" + ], + "support": { + "issues": "https://github.com/php-internal/container/issues", + "source": "https://github.com/php-internal/container/tree/1.1.0" }, - "time": "2025-07-24T20:02:16+00:00" + "funding": [ + { + "url": "https://boosty.to/roxblnfk", + "type": "boosty" + } + ], + "time": "2026-09-08T09:20:40+00:00" }, { "name": "internal/destroy", @@ -418,6 +499,156 @@ ], "time": "2025-09-08T14:29:16+00:00" }, + { + "name": "internal/dload", + "version": "1.19.1", + "source": { + "type": "git", + "url": "https://github.com/php-internal/dload.git", + "reference": "45055ece87fe40b7a2b62a8c0c2f04f82306bc7f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-internal/dload/zipball/45055ece87fe40b7a2b62a8c0c2f04f82306bc7f", + "reference": "45055ece87fe40b7a2b62a8c0c2f04f82306bc7f", + "shasum": "" + }, + "require": { + "internal/container": "^1.0", + "internal/destroy": "^1.0", + "internal/path": "^1.2", + "internal/toml": "^1.0.3", + "nyholm/psr7": "^1.8", + "php": ">=8.2", + "psr/container": "1 - 2", + "psr/http-client": "^1.0", + "react/async": "^3.2 || ^4.3", + "react/promise": "^2.10 || ^3.2", + "symfony/console": "^6.4 || ^7 || ^8", + "symfony/http-client": "^6.4 || ^7 || ^8" + }, + "require-dev": { + "buggregator/trap": "^1.15", + "composer/semver": "^3.4", + "dereuromark/composer-prefer-lowest": "^0.1.10", + "llm/skills": "^1.9", + "roxblnfk/unpoly": "^1.8.1", + "spiral/code-style": "^2.3.1", + "testo/bridge-mockery": "^0.1.2", + "testo/bridge-rector": "^0.2.4", + "testo/testo": "^0.10.46", + "vimeo/psalm": "^6.10 || ^7.0" + }, + "suggest": { + "ext-simplexml": "to support XML configs parsing" + }, + "bin": [ + "bin/dload" + ], + "type": "library", + "extra": { + "skills": { + "source": "skills" + } + }, + "autoload": { + "psr-4": { + "Internal\\DLoad\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Aleksei Gagarin (roxblnfk)", + "homepage": "https://github.com/roxblnfk" + } + ], + "description": "Downloads binaries.", + "keywords": [ + "download binaries", + "downloader" + ], + "support": { + "issues": "https://github.com/php-internal/dload/issues", + "source": "https://github.com/php-internal/dload/tree/1.19.1" + }, + "funding": [ + { + "url": "https://boosty.to/roxblnfk", + "type": "boosty" + } + ], + "time": "2026-10-28T13:14:24+00:00" + }, + { + "name": "internal/path", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/php-internal/path.git", + "reference": "e59fc0d530891483b5f47417ccfecb3d02b2218c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-internal/path/zipball/e59fc0d530891483b5f47417ccfecb3d02b2218c", + "reference": "e59fc0d530891483b5f47417ccfecb3d02b2218c", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "buggregator/trap": "^1.15", + "infection/infection": "^0.33.2", + "llm/skills": "^1.7", + "roxblnfk/unpoly": "^1.8.1", + "spiral/code-style": "^2.3.1", + "testo/bridge-infection": "^0.1.6", + "testo/testo": "^0.10.21", + "vimeo/psalm": "^7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Internal\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Aleksei Gagarin", + "homepage": "https://github.com/roxblnfk" + } + ], + "description": "Type-safe, immutable file path library with cross-platform support and automatic normalization.", + "keywords": [ + "cross-platform", + "file", + "filepath", + "filesystem", + "helper", + "path", + "unix", + "windows" + ], + "support": { + "issues": "https://github.com/php-internal/path/issues", + "source": "https://github.com/php-internal/path/tree/1.4.0" + }, + "funding": [ + { + "url": "https://boosty.to/roxblnfk", + "type": "boosty" + } + ], + "time": "2026-09-08T10:51:37+00:00" + }, { "name": "internal/promise", "version": "3.4.1", @@ -491,18 +722,75 @@ }, "time": "2025-10-24T08:50:08+00:00" }, + { + "name": "internal/toml", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/php-internal/toml.git", + "reference": "b0e077794a179b0a39a4fba84185762a4425c472" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-internal/toml/zipball/b0e077794a179b0a39a4fba84185762a4425c472", + "reference": "b0e077794a179b0a39a4fba84185762a4425c472", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "buggregator/trap": "^1.13", + "internal/dload": "^1.11", + "phpunit/phpunit": "^10.5", + "spiral/code-style": "^2.3.0", + "ta-tikoma/phpunit-architecture-test": "^0.8.5", + "vimeo/psalm": "^6.13" + }, + "type": "library", + "autoload": { + "psr-4": { + "Internal\\Toml\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Aleksei Gagarin (roxblnfk)", + "homepage": "https://github.com/roxblnfk" + } + ], + "description": "TOML 1.0/1.1 parser and encoder", + "keywords": [ + "toml" + ], + "support": { + "issues": "https://github.com/php-internal/toml/issues", + "source": "https://github.com/php-internal/toml/tree/1.1.3" + }, + "funding": [ + { + "url": "https://boosty.to/roxblnfk", + "type": "boosty" + } + ], + "time": "2026-06-28T16:28:37+00:00" + }, { "name": "nesbot/carbon", - "version": "3.11.0", + "version": "3.15.1", "source": { "type": "git", "url": "https://github.com/CarbonPHP/carbon.git", - "reference": "bdb375400dcd162624531666db4799b36b64e4a1" + "reference": "ce0e5636fae7d1e99856eb70cae4c719a284aa08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/bdb375400dcd162624531666db4799b36b64e4a1", - "reference": "bdb375400dcd162624531666db4799b36b64e4a1", + "url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/ce0e5636fae7d1e99856eb70cae4c719a284aa08", + "reference": "ce0e5636fae7d1e99856eb70cae4c719a284aa08", "shasum": "" }, "require": { @@ -512,6 +800,7 @@ "psr/clock": "^1.0", "symfony/clock": "^6.3.12 || ^7.0 || ^8.0", "symfony/polyfill-mbstring": "^1.0", + "symfony/polyfill-time": "^1.0", "symfony/translation": "^4.4.18 || ^5.2.1 || ^6.0 || ^7.0 || ^8.0" }, "provide": { @@ -522,11 +811,11 @@ "doctrine/orm": "^2.15.2 || ^3.0", "friendsofphp/php-cs-fixer": "^v3.87.1", "kylekatarnls/multi-tester": "^2.5.3", - "phpmd/phpmd": "^2.15.0", + "phpmd/phpmd": "^3.0@dev", "phpstan/extension-installer": "^1.4.3", "phpstan/phpstan": "^2.1.22", "phpunit/phpunit": "^10.5.53", - "squizlabs/php_codesniffer": "^3.13.4" + "squizlabs/php_codesniffer": "^3.13.4 || ^4.0.0" }, "bin": [ "bin/carbon" @@ -569,14 +858,14 @@ } ], "description": "An API extension for DateTime that supports 281 different languages.", - "homepage": "https://carbon.nesbot.com", + "homepage": "https://carbonphp.github.io/carbon/", "keywords": [ "date", "datetime", "time" ], "support": { - "docs": "https://carbon.nesbot.com/docs", + "docs": "https://carbonphp.github.io/carbon/guide/getting-started/introduction.html", "issues": "https://github.com/CarbonPHP/carbon/issues", "source": "https://github.com/CarbonPHP/carbon" }, @@ -594,26 +883,104 @@ "type": "tidelift" } ], - "time": "2025-12-02T21:04:28+00:00" + "time": "2026-10-25T14:32:48+00:00" }, { - "name": "nyholm/psr7-server", - "version": "1.1.0", + "name": "nyholm/psr7", + "version": "1.8.2", "source": { "type": "git", - "url": "https://github.com/Nyholm/psr7-server.git", - "reference": "4335801d851f554ca43fa6e7d2602141538854dc" + "url": "https://github.com/Nyholm/psr7.git", + "reference": "a71f2b11690f4b24d099d6b16690a90ae14fc6f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Nyholm/psr7-server/zipball/4335801d851f554ca43fa6e7d2602141538854dc", - "reference": "4335801d851f554ca43fa6e7d2602141538854dc", + "url": "https://api.github.com/repos/Nyholm/psr7/zipball/a71f2b11690f4b24d099d6b16690a90ae14fc6f3", + "reference": "a71f2b11690f4b24d099d6b16690a90ae14fc6f3", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0", + "php": ">=7.2", "psr/http-factory": "^1.0", - "psr/http-message": "^1.0 || ^2.0" + "psr/http-message": "^1.1 || ^2.0" + }, + "provide": { + "php-http/message-factory-implementation": "1.0", + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "http-interop/http-factory-tests": "^0.9", + "php-http/message-factory": "^1.0", + "php-http/psr7-integration-tests": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.4", + "symfony/error-handler": "^4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8-dev" + } + }, + "autoload": { + "psr-4": { + "Nyholm\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com" + }, + { + "name": "Martijn van der Ven", + "email": "martijn@vanderven.se" + } + ], + "description": "A fast PHP7 implementation of PSR-7", + "homepage": "https://tnyholm.se", + "keywords": [ + "psr-17", + "psr-7" + ], + "support": { + "issues": "https://github.com/Nyholm/psr7/issues", + "source": "https://github.com/Nyholm/psr7/tree/1.8.2" + }, + "funding": [ + { + "url": "https://github.com/Zegnat", + "type": "github" + }, + { + "url": "https://github.com/nyholm", + "type": "github" + } + ], + "time": "2024-09-09T07:06:30+00:00" + }, + { + "name": "nyholm/psr7-server", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/Nyholm/psr7-server.git", + "reference": "4335801d851f554ca43fa6e7d2602141538854dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Nyholm/psr7-server/zipball/4335801d851f554ca43fa6e7d2602141538854dc", + "reference": "4335801d851f554ca43fa6e7d2602141538854dc", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0 || ^2.0" }, "require-dev": { "nyholm/nsa": "^1.1", @@ -1752,20 +2119,20 @@ }, { "name": "ramsey/uuid", - "version": "4.9.2", + "version": "4.9.4", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "8429c78ca35a09f27565311b98101e2826affde0" + "reference": "75d73f48d02797c2c285a7e9f348fadc0102ffe2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/8429c78ca35a09f27565311b98101e2826affde0", - "reference": "8429c78ca35a09f27565311b98101e2826affde0", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/75d73f48d02797c2c285a7e9f348fadc0102ffe2", + "reference": "75d73f48d02797c2c285a7e9f348fadc0102ffe2", "shasum": "" }, "require": { - "brick/math": "^0.8.16 || ^0.9 || ^0.10 || ^0.11 || ^0.12 || ^0.13 || ^0.14", + "brick/math": "^0.8.16 || ^0.9 || ^0.10 || ^0.11 || ^0.12 || ^0.13 || ^0.14 || ^0.15 || ^0.16 || ^0.17 || ^0.18 || ^0.19 || ^0.20 || ^1.0", "php": "^8.0", "ramsey/collection": "^1.2 || ^2.0" }, @@ -1824,40 +2191,40 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.9.2" + "source": "https://github.com/ramsey/uuid/tree/4.9.4" }, - "time": "2025-12-14T04:43:48+00:00" + "time": "2026-09-16T11:39:30+00:00" }, { - "name": "roadrunner-php/roadrunner-api-dto", - "version": "v1.14.0", + "name": "react/async", + "version": "v4.3.0", "source": { "type": "git", - "url": "https://github.com/roadrunner-php/roadrunner-api-dto.git", - "reference": "e6efb759f0a73b8516b7f28317230ecd4010005e" + "url": "https://github.com/reactphp/async.git", + "reference": "635d50e30844a484495713e8cb8d9e079c0008a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/roadrunner-php/roadrunner-api-dto/zipball/e6efb759f0a73b8516b7f28317230ecd4010005e", - "reference": "e6efb759f0a73b8516b7f28317230ecd4010005e", + "url": "https://api.github.com/repos/reactphp/async/zipball/635d50e30844a484495713e8cb8d9e079c0008a5", + "reference": "635d50e30844a484495713e8cb8d9e079c0008a5", "shasum": "" }, "require": { - "google/protobuf": "^4.31.1", - "php": "^8.1" - }, - "conflict": { - "temporal/sdk": "<2.9.0" + "php": ">=8.1", + "react/event-loop": "^1.2", + "react/promise": "^3.2 || ^2.8 || ^1.2.1" }, - "suggest": { - "google/common-protos": "Required for Temporal API" + "require-dev": { + "phpstan/phpstan": "1.10.39", + "phpunit/phpunit": "^9.6" }, "type": "library", "autoload": { + "files": [ + "src/functions_include.php" + ], "psr-4": { - "Temporal\\": "generated/Temporal", - "RoadRunner\\": "generated/RoadRunner", - "GPBMetadata\\": "generated/GPBMetadata" + "React\\Async\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1866,121 +2233,152 @@ ], "authors": [ { - "name": "Pavel Butchnev (butschster)", - "email": "pavel.buchnev@spiralscout.com" + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" }, { - "name": "Aleksei Gagarin (roxblnfk)", - "email": "alexey.gagarin@spiralscout.com" + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" }, { - "name": "RoadRunner Community", - "homepage": "https://github.com/roadrunner-server/roadrunner/graphs/contributors" + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], - "description": "RoadRunner PHP API", - "homepage": "https://roadrunner.dev", + "description": "Async utilities and fibers for ReactPHP", + "keywords": [ + "async", + "reactphp" + ], "support": { - "chat": "https://discord.gg/V6EK4he", - "docs": "https://docs.roadrunner.dev", - "forum": "https://forum.roadrunner.dev", - "issues": "https://github.com/roadrunner-server/roadrunner/issues", - "source": "https://github.com/roadrunner-php/roadrunner-api-dto/tree/v1.14.0" + "issues": "https://github.com/reactphp/async/issues", + "source": "https://github.com/reactphp/async/tree/v4.3.0" }, "funding": [ { - "url": "https://github.com/sponsors/roadrunner-server", - "type": "github" + "url": "https://opencollective.com/reactphp", + "type": "open_collective" } ], - "time": "2025-11-06T13:03:11+00:00" + "time": "2024-06-04T14:40:02+00:00" }, { - "name": "roadrunner-php/version-checker", - "version": "v1.0.2", + "name": "react/event-loop", + "version": "v1.6.0", "source": { "type": "git", - "url": "https://github.com/roadrunner-php/version-checker.git", - "reference": "a7994f700586265a54a2989b97f7d7f25ed5890b" + "url": "https://github.com/reactphp/event-loop.git", + "reference": "ba276bda6083df7e0050fd9b33f66ad7a4ac747a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/roadrunner-php/version-checker/zipball/a7994f700586265a54a2989b97f7d7f25ed5890b", - "reference": "a7994f700586265a54a2989b97f7d7f25ed5890b", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/ba276bda6083df7e0050fd9b33f66ad7a4ac747a", + "reference": "ba276bda6083df7e0050fd9b33f66ad7a4ac747a", "shasum": "" }, "require": { - "composer-runtime-api": "^2.0", - "composer/semver": "^3.3", - "php": "^8.0", - "symfony/process": "^5.4 || ^6.0 || ^7.0" + "php": ">=5.3.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.8", - "phpunit/phpunit": "^9.6 || ^10.0", - "vimeo/psalm": "^5.9" + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" + }, + "suggest": { + "ext-pcntl": "For signal handling support when using the StreamSelectLoop" }, "type": "library", "autoload": { "psr-4": { - "RoadRunner\\VersionChecker\\": "src" + "React\\EventLoop\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "The package for checking the version of the RoadRunner", - "homepage": "https://github.com/roadrunner-php/version-checker", + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "ReactPHP's core reactor event loop that libraries can use for evented I/O.", "keywords": [ - "roadrunner", - "roadrunner-php", - "version-checker" + "asynchronous", + "event-loop" ], "support": { - "source": "https://github.com/roadrunner-php/version-checker/tree/v1.0.2" + "issues": "https://github.com/reactphp/event-loop/issues", + "source": "https://github.com/reactphp/event-loop/tree/v1.6.0" }, "funding": [ { - "url": "https://github.com/roadrunner-server", - "type": "github" + "url": "https://opencollective.com/reactphp", + "type": "open_collective" } ], - "time": "2025-05-20T08:45:05+00:00" + "time": "2025-11-17T20:46:25+00:00" }, { - "name": "spiral/attributes", - "version": "v3.1.8", + "name": "roadrunner/api-dto", + "version": "v2.2.0", "source": { "type": "git", - "url": "https://github.com/spiral/attributes.git", - "reference": "a7e368a42b079f56c16d7fc513b68190b96842c3" + "url": "https://github.com/roadrunner-php/roadrunner-api-dto.git", + "reference": "7cbe55544af8537ade89507eae406ae6fc6ade20" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spiral/attributes/zipball/a7e368a42b079f56c16d7fc513b68190b96842c3", - "reference": "a7e368a42b079f56c16d7fc513b68190b96842c3", + "url": "https://api.github.com/repos/roadrunner-php/roadrunner-api-dto/zipball/7cbe55544af8537ade89507eae406ae6fc6ade20", + "reference": "7cbe55544af8537ade89507eae406ae6fc6ade20", "shasum": "" }, "require": { - "php": ">=8.1", - "psr/cache": "1 - 3", - "psr/simple-cache": "1 - 3" + "google/protobuf": "^4.31.1||^5.34.0", + "php": "^8.1" + }, + "conflict": { + "temporal/sdk": "<2.20" + }, + "replace": { + "roadrunner-php/roadrunner-api-dto": "self.version" }, "require-dev": { - "doctrine/annotations": "^1.14 || ^2.0", - "jetbrains/phpstorm-attributes": "^1.0", - "phpunit/phpunit": "^9.5.20", - "spiral/code-style": "^2.2", - "vimeo/psalm": "^5.17" + "llm/skills": "^1.14", + "roxblnfk/unpoly": "^1.8" + }, + "suggest": { + "google/common-protos": "Required for Temporal API" }, "type": "library", "autoload": { - "files": [ - "src/polyfill.php" - ], "psr-4": { - "Spiral\\Attributes\\": "src" + "Temporal\\": "generated/Temporal", + "RoadRunner\\": "generated/RoadRunner", + "GPBMetadata\\": "generated/GPBMetadata" } }, "notification-url": "https://packagist.org/downloads/", @@ -1989,83 +2387,86 @@ ], "authors": [ { - "name": "Anton Titov (wolfy-j)", - "email": "wolfy-j@spiralscout.com" - }, - { - "name": "Pavel Butchnev (butschster)", - "email": "pavel.buchnev@spiralscout.com" - }, - { - "name": "Aleksei Gagarin (roxblnfk)", - "email": "alexey.gagarin@spiralscout.com" + "name": "Pavel Buchnev", + "homepage": "https://github.com/butschster" }, { - "name": "Maksim Smakouz (msmakouz)", - "email": "maksim.smakouz@spiralscout.com" + "name": "Aleksei Gagarin", + "homepage": "https://github.com/roxblnfk" }, { - "name": "Kirill Nesmeyanov (SerafimArts)", - "email": "kirill.nesmeyanov@spiralscout.com" + "name": "RoadRunner Community", + "homepage": "https://github.com/roadrunner-server/roadrunner/graphs/contributors" } ], - "description": "PHP attributes reader", - "homepage": "https://spiral.dev", + "description": "Pre-generated PHP DTOs for the RoadRunner API protocol buffers, used to make RPC calls to the RoadRunner server", + "homepage": "https://roadrunner.dev/", "keywords": [ - "annotations", - "attributes", - "metadata" + "api", + "dto", + "protobuf", + "roadrunner", + "rpc", + "temporal" ], "support": { "chat": "https://discord.gg/V6EK4he", - "docs": "https://spiral.dev/docs", - "issues": "https://github.com/spiral/attributes/issues", - "source": "https://github.com/spiral/attributes" + "docs": "https://docs.roadrunner.dev", + "forum": "https://forum.roadrunner.dev", + "issues": "https://github.com/roadrunner-server/roadrunner/issues", + "source": "https://github.com/roadrunner-php/roadrunner-api-dto" }, "funding": [ { - "url": "https://github.com/sponsors/spiral", + "url": "https://github.com/sponsors/roadrunner-server", "type": "github" } ], - "time": "2024-12-09T15:33:18+00:00" + "time": "2026-11-03T16:28:57+00:00" }, { - "name": "spiral/core", - "version": "3.16.0", + "name": "roadrunner/cli", + "version": "3.1.0", "source": { "type": "git", - "url": "https://github.com/spiral/core.git", - "reference": "700db0337f7ba4d8ce87d102bc51c5820182edec" + "url": "https://github.com/roadrunner-php/cli.git", + "reference": "2124655555d872c2a8d18dcc9b59cbdce9791b83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spiral/core/zipball/700db0337f7ba4d8ce87d102bc51c5820182edec", - "reference": "700db0337f7ba4d8ce87d102bc51c5820182edec", + "url": "https://api.github.com/repos/roadrunner-php/cli/zipball/2124655555d872c2a8d18dcc9b59cbdce9791b83", + "reference": "2124655555d872c2a8d18dcc9b59cbdce9791b83", "shasum": "" }, "require": { - "php": ">=8.1", - "psr/container": "^1.1|^2.0", - "spiral/security": "^3.16" + "composer-runtime-api": "^2.0", + "composer/semver": "^3.4", + "internal/dload": "^1.19.1", + "php": ">=8.2", + "roadrunner/worker": "^3.8", + "symfony/console": "^6.4 || ^7.0 || ^8.0", + "symfony/http-client": "^6.4.17 || ^7.2 || ^8.0", + "symfony/yaml": "^5.4.49 || ^6.4.17 || ^7.2 || ^8.0" }, - "provide": { - "psr/container-implementation": "^1.1|^2.0" + "replace": { + "spiral/roadrunner-cli": "self.version" }, "require-dev": { - "mockery/mockery": "^1.6.12", - "phpunit/phpunit": "^10.5.41", - "vimeo/psalm": "^6.0" + "jetbrains/phpstorm-attributes": "^1.2", + "llm/skills": "^1.14", + "roxblnfk/unpoly": "^1.8", + "spiral/code-style": "^2.3.1", + "spiral/dumper": "^3.3", + "testo/testo": "^0.10.55", + "vimeo/psalm": "^6 || ^7" }, + "bin": [ + "bin/rr" + ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.16.x-dev" - } - }, "autoload": { "psr-4": { - "Spiral\\Core\\": "src" + "Spiral\\RoadRunner\\Console\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2074,72 +2475,76 @@ ], "authors": [ { - "name": "Anton Titov (wolfy-j)", - "email": "wolfy-j@spiralscout.com" - }, - { - "name": "Pavel Butchnev (butschster)", - "homepage": "https://github.com/butschster" - }, - { - "name": "Aleksei Gagarin (roxblnfk)", - "homepage": "https://github.com/roxblnfk" + "name": "Anton Titov", + "homepage": "https://github.com/wolfy-j" }, { - "name": "Maksim Smakouz (msmakouz)", - "email": "maksim.smakouz@spiralscout.com" + "name": "RoadRunner Community", + "homepage": "https://github.com/roadrunner-server/roadrunner/graphs/contributors" } ], - "description": "IoC container, IoC scopes, factory, memory, configuration interfaces", - "homepage": "https://spiral.dev", + "description": "RoadRunner command-line tool: downloads the RoadRunner binary and generates its configuration", + "homepage": "https://roadrunner.dev/", + "keywords": [ + "binary", + "cli", + "console", + "download", + "installer", + "roadrunner" + ], "support": { - "issues": "https://github.com/spiral/framework/issues", - "source": "https://github.com/spiral/core" + "chat": "https://discord.gg/V6EK4he", + "docs": "https://docs.roadrunner.dev/docs/general/install", + "issues": "https://github.com/roadrunner-server/roadrunner/issues", + "source": "https://github.com/roadrunner-php/cli" }, "funding": [ { - "url": "https://github.com/sponsors/spiral", + "url": "https://github.com/sponsors/roadrunner-server", "type": "github" } ], - "time": "2025-12-14T11:35:42+00:00" + "time": "2026-10-30T21:04:24+00:00" }, { - "name": "spiral/goridge", - "version": "4.2.1", + "name": "roadrunner/goridge", + "version": "4.6.0", "source": { "type": "git", "url": "https://github.com/roadrunner-php/goridge.git", - "reference": "2a372118dac1f0c0511e2862f963ce649fefd9fa" + "reference": "887bd3a6f89a0b95252db608856d33d7a1284406" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/roadrunner-php/goridge/zipball/2a372118dac1f0c0511e2862f963ce649fefd9fa", - "reference": "2a372118dac1f0c0511e2862f963ce649fefd9fa", + "url": "https://api.github.com/repos/roadrunner-php/goridge/zipball/887bd3a6f89a0b95252db608856d33d7a1284406", + "reference": "887bd3a6f89a0b95252db608856d33d7a1284406", "shasum": "" }, "require": { "ext-json": "*", "ext-sockets": "*", - "php": ">=8.1", - "spiral/roadrunner": "^2023 || ^2024.1 || ^2025.1" + "php": ">=8.2", + "roadrunner/roadrunner": "^3.0" + }, + "replace": { + "spiral/goridge": "self.version" }, "require-dev": { - "google/protobuf": "^3.22 || ^4.0", - "infection/infection": "^0.29.0", + "google/protobuf": "^3.22 || ^4.0 || ^5.0", "jetbrains/phpstorm-attributes": "^1.0", - "phpunit/phpunit": "^10.5.45", + "llm/skills": "^1.14", + "roxblnfk/unpoly": "^1.8", "rybakit/msgpack": "^0.7", - "spiral/code-style": "*", - "vimeo/psalm": "^6.0" + "spiral/code-style": "^2.3.1", + "testo/testo": "^0.10.55", + "vimeo/psalm": "^6 || ^7" }, "suggest": { - "ext-msgpack": "MessagePack codec support", "ext-protobuf": "Protobuf codec support", - "google/protobuf": "(^3.0) Protobuf codec support", - "rybakit/msgpack": "(^0.7) MessagePack codec support" + "google/protobuf": "(^3.22 || ^4.0 || ^5.0) Protobuf codec support" }, - "type": "goridge", + "type": "library", "autoload": { "psr-4": { "Spiral\\Goridge\\": "src" @@ -2151,37 +2556,48 @@ ], "authors": [ { - "name": "Anton Titov (wolfy-j)", - "email": "wolfy-j@spiralscout.com" + "name": "Anton Titov", + "homepage": "https://github.com/wolfy-j" }, { "name": "Valery Piashchynski", "homepage": "https://github.com/rustatian" }, { - "name": "Aleksei Gagarin (roxblnfk)", + "name": "Aleksei Gagarin", "homepage": "https://github.com/roxblnfk" }, { - "name": "Pavel Buchnev (butschster)", - "email": "pavel.buchnev@spiralscout.com" + "name": "Pavel Buchnev", + "homepage": "https://github.com/butschster" }, { - "name": "Maksim Smakouz (msmakouz)", - "email": "maksim.smakouz@spiralscout.com" + "name": "Maksim Smakouz", + "homepage": "https://github.com/msmakouz" }, { "name": "RoadRunner Community", "homepage": "https://github.com/roadrunner-server/roadrunner/graphs/contributors" } ], - "description": "High-performance PHP-to-Golang RPC bridge", - "homepage": "https://spiral.dev/", + "description": "High-performance PHP-to-Go IPC bridge: the RPC transport between PHP workers and the RoadRunner application server", + "homepage": "https://roadrunner.dev/", + "keywords": [ + "Relay", + "Socket", + "golang", + "goridge", + "ipc", + "pipes", + "protobuf", + "roadrunner", + "rpc" + ], "support": { "chat": "https://discord.gg/V6EK4he", - "docs": "https://docs.roadrunner.dev", + "docs": "https://docs.roadrunner.dev/docs/php-worker/rpc", "issues": "https://github.com/roadrunner-server/roadrunner/issues", - "source": "https://github.com/roadrunner-php/goridge/tree/4.2.1" + "source": "https://github.com/roadrunner-php/goridge" }, "funding": [ { @@ -2189,42 +2605,48 @@ "type": "github" } ], - "time": "2025-05-05T13:55:33+00:00" + "time": "2026-10-19T08:41:25+00:00" }, { - "name": "spiral/hmvc", - "version": "3.16.0", + "name": "roadrunner/kv", + "version": "v4.5.2", "source": { "type": "git", - "url": "https://github.com/spiral/hmvc.git", - "reference": "cff7c60a72fd8a590f5d7e13a07244b39627aa5d" + "url": "https://github.com/roadrunner-php/kv.git", + "reference": "b9a5095791639f6263e5a0c0a880eda1c5800491" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spiral/hmvc/zipball/cff7c60a72fd8a590f5d7e13a07244b39627aa5d", - "reference": "cff7c60a72fd8a590f5d7e13a07244b39627aa5d", + "url": "https://api.github.com/repos/roadrunner-php/kv/zipball/b9a5095791639f6263e5a0c0a880eda1c5800491", + "reference": "b9a5095791639f6263e5a0c0a880eda1c5800491", "shasum": "" }, "require": { - "php": ">=8.1", - "psr/event-dispatcher": "^1.0", - "spiral/core": "^3.16", - "spiral/interceptors": "^3.16" + "ext-json": "*", + "php": ">=8.2", + "psr/simple-cache": "2 - 3", + "roadrunner/api-dto": "^2.1", + "roadrunner/goridge": "^4.5", + "roadrunner/roadrunner": "^3.0" + }, + "replace": { + "spiral/roadrunner-kv": "self.version" }, "require-dev": { - "phpunit/phpunit": "^10.5.41", - "spiral/testing": "^2.12", - "vimeo/psalm": "^6.0" + "llm/skills": "^1.14", + "roxblnfk/unpoly": "^1.8", + "spiral/code-style": "^2.3.1", + "testo/testo": "^0.10.55", + "vimeo/psalm": "^7.0.1" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.16.x-dev" - } + "suggest": { + "ext-igbinary": "(>3.1.6) Igbinary serializer support", + "ext-sodium": "Sodium serializer support" }, + "type": "library", "autoload": { "psr-4": { - "Spiral\\Core\\": "src" + "Spiral\\RoadRunner\\KeyValue\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2233,149 +2655,142 @@ ], "authors": [ { - "name": "Anton Titov (wolfy-j)", - "email": "wolfy-j@spiralscout.com" + "name": "Anton Titov", + "homepage": "https://github.com/wolfy-j" }, { - "name": "Pavel Butchnev (butschster)", + "name": "Pavel Buchnev", "homepage": "https://github.com/butschster" }, { - "name": "Aleksei Gagarin (roxblnfk)", + "name": "Aleksei Gagarin", "homepage": "https://github.com/roxblnfk" }, { - "name": "Maksim Smakouz (msmakouz)", - "email": "maksim.smakouz@spiralscout.com" + "name": "Maksim Smakouz", + "homepage": "https://github.com/msmakouz" + }, + { + "name": "Kirill Nesmeyanov", + "homepage": "https://github.com/SerafimArts" + }, + { + "name": "RoadRunner Community", + "homepage": "https://github.com/roadrunner-server/roadrunner/graphs/contributors" } ], - "description": "HMVC Core and Controllers", - "homepage": "https://spiral.dev", + "description": "PSR-16 cache on top of the RoadRunner Key-Value plugin storages (memory, boltdb, redis, memcached) over RPC", + "homepage": "https://roadrunner.dev/", + "keywords": [ + "boltdb", + "cache", + "key-value", + "kv", + "memcached", + "psr-16", + "redis", + "roadrunner", + "simple-cache" + ], "support": { "chat": "https://discord.gg/V6EK4he", - "docs": "https://spiral.dev/docs", - "issues": "https://github.com/spiral/framework/issues", - "source": "https://github.com/spiral/hmvc" + "docs": "https://docs.roadrunner.dev/docs/key-value/overview-kv", + "issues": "https://github.com/roadrunner-server/roadrunner/issues", + "source": "https://github.com/roadrunner-php/kv" }, "funding": [ { - "url": "https://github.com/sponsors/spiral", + "url": "https://github.com/sponsors/roadrunner-server", "type": "github" } ], - "time": "2025-12-14T11:38:02+00:00" + "time": "2026-11-03T20:23:01+00:00" }, { - "name": "spiral/interceptors", - "version": "3.16.0", + "name": "roadrunner/roadrunner", + "version": "v3.0.1", "source": { "type": "git", - "url": "https://github.com/spiral/interceptors.git", - "reference": "715f274b35d10565f1c910eb573162179e33b0e7" + "url": "https://github.com/roadrunner-server/roadrunner.git", + "reference": "ed89c2ec991f64b072297fcbee5ad7f058779199" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spiral/interceptors/zipball/715f274b35d10565f1c910eb573162179e33b0e7", - "reference": "715f274b35d10565f1c910eb573162179e33b0e7", + "url": "https://api.github.com/repos/roadrunner-server/roadrunner/zipball/ed89c2ec991f64b072297fcbee5ad7f058779199", + "reference": "ed89c2ec991f64b072297fcbee5ad7f058779199", "shasum": "" }, - "require": { - "php": ">=8.1", - "psr/event-dispatcher": "^1.0", - "spiral/core": "^3.16" - }, - "require-dev": { - "phpunit/phpunit": "^10.5.41", - "spiral/testing": "^2.12", - "vimeo/psalm": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.16.x-dev" - } - }, - "autoload": { - "psr-4": { - "Spiral\\Interceptors\\": "src" - } - }, + "type": "metapackage", "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { - "name": "Anton Titov (wolfy-j)", - "email": "wolfy-j@spiralscout.com" - }, - { - "name": "Pavel Butchnev (butschster)", - "homepage": "https://github.com/butschster" + "name": "Anton Titov / Wolfy-J", + "email": "wolfy.jd@gmail.com" }, { - "name": "Aleksei Gagarin (roxblnfk)", - "homepage": "https://github.com/roxblnfk" + "name": "Valery Piashchynski", + "homepage": "https://github.com/rustatian" }, { - "name": "Maksim Smakouz (msmakouz)", - "email": "maksim.smakouz@spiralscout.com" + "name": "RoadRunner Community", + "homepage": "https://github.com/roadrunner-server/roadrunner/graphs/contributors" } ], - "description": "Spiral Interceptors", - "homepage": "https://spiral.dev", - "keywords": [ - "aop", - "interceptors", - "spiral" - ], + "description": "RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins", + "homepage": "https://roadrunner.dev/", "support": { "chat": "https://discord.gg/V6EK4he", - "docs": "https://spiral.dev/docs", - "issues": "https://github.com/spiral/framework/issues", - "source": "https://github.com/spiral/interceptors" + "docs": "https://docs.roadrunner.dev/", + "issues": "https://github.com/roadrunner-server/roadrunner/issues", + "source": "https://github.com/roadrunner-server/roadrunner/tree/v3.0.1" }, "funding": [ { - "url": "https://github.com/sponsors/spiral", + "url": "https://github.com/sponsors/roadrunner-server", "type": "github" } ], - "time": "2025-12-14T11:34:19+00:00" + "time": "2026-10-21T19:33:12+00:00" }, { - "name": "spiral/logger", - "version": "3.16.0", + "name": "roadrunner/version-checker", + "version": "v1.4.1", "source": { "type": "git", - "url": "https://github.com/spiral/logger.git", - "reference": "bd902bbcdbb6f247a51a75fc716dba3831966f06" + "url": "https://github.com/roadrunner-php/version-checker.git", + "reference": "fc2f34769e5f33e588584606c42e595a360ab29a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spiral/logger/zipball/bd902bbcdbb6f247a51a75fc716dba3831966f06", - "reference": "bd902bbcdbb6f247a51a75fc716dba3831966f06", + "url": "https://api.github.com/repos/roadrunner-php/version-checker/zipball/fc2f34769e5f33e588584606c42e595a360ab29a", + "reference": "fc2f34769e5f33e588584606c42e595a360ab29a", "shasum": "" }, "require": { - "php": ">=8.1", - "psr/log": "1 - 3", - "spiral/core": "^3.16" + "composer-runtime-api": "^2.0", + "composer/semver": "^3.3", + "php": "^8.2", + "symfony/process": "^5.4 || ^6.0 || ^7.0 || ^8.0" + }, + "replace": { + "roadrunner-php/version-checker": "self.version" }, "require-dev": { - "mockery/mockery": "^1.6.12", - "phpunit/phpunit": "^10.5.41", - "vimeo/psalm": "^6.0" + "llm/skills": "^1.14", + "mockery/mockery": "^1.6", + "roxblnfk/unpoly": "^1.8", + "spiral/code-style": "^2.3.1", + "testo/bridge-mockery": "^0.1.2", + "testo/testo": "^0.10.55", + "vimeo/psalm": "^6 || ^7" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.16.x-dev" - } - }, "autoload": { "psr-4": { - "Spiral\\Logger\\": "src" + "RoadRunner\\VersionChecker\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2384,122 +2799,84 @@ ], "authors": [ { - "name": "Anton Titov (wolfy-j)", - "email": "wolfy-j@spiralscout.com" - }, - { - "name": "Pavel Butchnev (butschster)", - "homepage": "https://github.com/butschster" + "name": "Maksim Smakouz", + "homepage": "https://github.com/msmakouz" }, { - "name": "Aleksei Gagarin (roxblnfk)", + "name": "Aleksei Gagarin", "homepage": "https://github.com/roxblnfk" }, { - "name": "Maksim Smakouz (msmakouz)", - "email": "maksim.smakouz@spiralscout.com" + "name": "RoadRunner Community", + "homepage": "https://github.com/roadrunner-server/roadrunner/graphs/contributors" } ], - "description": "LogFactory and global log listeners", - "homepage": "https://spiral.dev", + "description": "Checks that the installed RoadRunner binary matches the version required by the project's Composer packages", + "homepage": "https://roadrunner.dev/", + "keywords": [ + "compatibility", + "roadrunner", + "semver", + "version", + "version-checker" + ], "support": { - "issues": "https://github.com/spiral/framework/issues", - "source": "https://github.com/spiral/logger" + "chat": "https://discord.gg/V6EK4he", + "issues": "https://github.com/roadrunner-server/roadrunner/issues", + "source": "https://github.com/roadrunner-php/version-checker" }, "funding": [ { - "url": "https://github.com/sponsors/spiral", + "url": "https://github.com/sponsors/roadrunner-server", "type": "github" } ], - "time": "2025-12-14T11:36:52+00:00" + "time": "2026-10-19T08:48:47+00:00" }, { - "name": "spiral/roadrunner", - "version": "v2025.1.6", + "name": "roadrunner/worker", + "version": "v3.8.2", "source": { "type": "git", - "url": "https://github.com/roadrunner-server/roadrunner.git", - "reference": "207b2b4ba75f2529ecccf801b3d8dd7038f22732" + "url": "https://github.com/roadrunner-php/worker.git", + "reference": "35fcf09b55de68954e03dc727b710b963db9517d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/roadrunner-server/roadrunner/zipball/207b2b4ba75f2529ecccf801b3d8dd7038f22732", - "reference": "207b2b4ba75f2529ecccf801b3d8dd7038f22732", - "shasum": "" - }, - "type": "metapackage", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Anton Titov / Wolfy-J", - "email": "wolfy.jd@gmail.com" - }, - { - "name": "Valery Piashchynski", - "homepage": "https://github.com/rustatian" - }, - { - "name": "RoadRunner Community", - "homepage": "https://github.com/roadrunner-server/roadrunner/graphs/contributors" - } - ], - "description": "RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins", - "homepage": "https://roadrunner.dev/", - "support": { - "chat": "https://discord.gg/V6EK4he", - "docs": "https://docs.roadrunner.dev/", - "issues": "https://github.com/roadrunner-server/roadrunner/issues", - "source": "https://github.com/roadrunner-server/roadrunner/tree/v2025.1.6" - }, - "funding": [ - { - "url": "https://github.com/sponsors/roadrunner-server", - "type": "github" - } - ], - "time": "2025-12-11T14:45:22+00:00" - }, - { - "name": "spiral/roadrunner-cli", - "version": "v2.7.2", - "source": { - "type": "git", - "url": "https://github.com/roadrunner-php/cli.git", - "reference": "54909d3fff22d34d1a6e894785f3df9dca0e2e8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/roadrunner-php/cli/zipball/54909d3fff22d34d1a6e894785f3df9dca0e2e8c", - "reference": "54909d3fff22d34d1a6e894785f3df9dca0e2e8c", + "url": "https://api.github.com/repos/roadrunner-php/worker/zipball/35fcf09b55de68954e03dc727b710b963db9517d", + "reference": "35fcf09b55de68954e03dc727b710b963db9517d", "shasum": "" }, "require": { - "composer/semver": "^3.4", + "composer-runtime-api": "^2.0", "ext-json": "*", - "php": ">=8.1", - "spiral/roadrunner-worker": "^2 || ^3", - "spiral/tokenizer": "^2.13 || ^3.15", - "symfony/console": "^5.3 || ^6.0 || ^7.0 || ^8.0", - "symfony/http-client": "^4.4.51 || ^5.4.49 || ^6.4.17 || ^7.2 || ^8.0", - "symfony/yaml": "^5.4.49 || ^6.4.17 || ^7.2 || ^8.0" + "ext-sockets": "*", + "php": ">=8.2", + "psr/log": "^2.0 || ^3.0", + "roadrunner/goridge": "^4.5", + "roadrunner/roadrunner": "^3.0" + }, + "replace": { + "spiral/roadrunner-worker": "self.version" }, "require-dev": { - "jetbrains/phpstorm-attributes": "^1.2", - "spiral/code-style": "^2.2.2", - "spiral/dumper": "^3.3", - "vimeo/psalm": "^6.0" + "buggregator/trap": "^1.13", + "jetbrains/phpstorm-attributes": "^1.0", + "llm/skills": "^1.14", + "mockery/mockery": "^1.6.7", + "roxblnfk/unpoly": "^1.8", + "spiral/code-style": "^2.3.1", + "testo/bridge-mockery": "^0.1.2", + "testo/testo": "^0.10.55", + "vimeo/psalm": "^6 || ^7" + }, + "suggest": { + "roadrunner/cli": "Provides RoadRunner installation and management CLI tools" }, - "bin": [ - "bin/rr" - ], "type": "library", "autoload": { "psr-4": { - "Spiral\\RoadRunner\\Console\\": "src" + "Spiral\\RoadRunner\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2508,21 +2885,44 @@ ], "authors": [ { - "name": "Anton Titov (wolfy-j)", - "email": "wolfy-j@spiralscout.com" + "name": "Anton Titov", + "homepage": "https://github.com/wolfy-j" + }, + { + "name": "Valery Piashchynski", + "homepage": "https://github.com/rustatian" + }, + { + "name": "Aleksei Gagarin", + "homepage": "https://github.com/roxblnfk" + }, + { + "name": "Pavel Buchnev", + "homepage": "https://github.com/butschster" + }, + { + "name": "Maksim Smakouz", + "homepage": "https://github.com/msmakouz" }, { "name": "RoadRunner Community", - "homepage": "https://github.com/spiral/roadrunner/graphs/contributors" + "homepage": "https://github.com/roadrunner-server/roadrunner/graphs/contributors" } ], - "description": "RoadRunner: Command Line Interface", - "homepage": "https://roadrunner.dev", + "description": "Base PHP worker for the RoadRunner application server: receives payloads over Goridge, sends responses and manages the worker pool", + "homepage": "https://roadrunner.dev/", + "keywords": [ + "application-server", + "goridge", + "long-running", + "roadrunner", + "worker" + ], "support": { "chat": "https://discord.gg/V6EK4he", - "docs": "https://docs.roadrunner.dev", + "docs": "https://docs.roadrunner.dev/docs/php-worker/worker", "issues": "https://github.com/roadrunner-server/roadrunner/issues", - "source": "https://github.com/roadrunner-php/cli/tree/v2.7.2" + "source": "https://github.com/roadrunner-php/worker" }, "funding": [ { @@ -2530,44 +2930,41 @@ "type": "github" } ], - "time": "2025-12-14T19:18:46+00:00" + "time": "2026-10-19T08:47:25+00:00" }, { - "name": "spiral/roadrunner-kv", - "version": "v4.3.1", + "name": "spiral/attributes", + "version": "v3.1.8", "source": { "type": "git", - "url": "https://github.com/roadrunner-php/kv.git", - "reference": "0db13f212c64463bd26cf71e28d0a8bdf997a4a0" + "url": "https://github.com/spiral/attributes.git", + "reference": "a7e368a42b079f56c16d7fc513b68190b96842c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/roadrunner-php/kv/zipball/0db13f212c64463bd26cf71e28d0a8bdf997a4a0", - "reference": "0db13f212c64463bd26cf71e28d0a8bdf997a4a0", + "url": "https://api.github.com/repos/spiral/attributes/zipball/a7e368a42b079f56c16d7fc513b68190b96842c3", + "reference": "a7e368a42b079f56c16d7fc513b68190b96842c3", "shasum": "" }, "require": { - "ext-json": "*", "php": ">=8.1", - "psr/simple-cache": "2 - 3", - "roadrunner-php/roadrunner-api-dto": "^1.0", - "spiral/goridge": "^4.2", - "spiral/roadrunner": "^2023.1 || ^2024.1 || ^2025.1" + "psr/cache": "1 - 3", + "psr/simple-cache": "1 - 3" }, "require-dev": { - "phpunit/phpunit": "^10.5.45", - "roave/security-advisories": "dev-master", + "doctrine/annotations": "^1.14 || ^2.0", + "jetbrains/phpstorm-attributes": "^1.0", + "phpunit/phpunit": "^9.5.20", "spiral/code-style": "^2.2", - "vimeo/psalm": ">=5.8" - }, - "suggest": { - "ext-igbinary": "(>3.1.6) Igbinary serailizer support", - "ext-sodium": "Sodium serailizer support" + "vimeo/psalm": "^5.17" }, "type": "library", "autoload": { + "files": [ + "src/polyfill.php" + ], "psr-4": { - "Spiral\\RoadRunner\\KeyValue\\": "src" + "Spiral\\Attributes\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2576,11 +2973,11 @@ ], "authors": [ { - "name": "Wolfy-J", - "email": "wolfy.jd@gmail.com" + "name": "Anton Titov (wolfy-j)", + "email": "wolfy-j@spiralscout.com" }, { - "name": "Pavel Buchnev (butschster)", + "name": "Pavel Butchnev (butschster)", "email": "pavel.buchnev@spiralscout.com" }, { @@ -2594,65 +2991,65 @@ { "name": "Kirill Nesmeyanov (SerafimArts)", "email": "kirill.nesmeyanov@spiralscout.com" - }, - { - "name": "RoadRunner Community", - "homepage": "https://github.com/spiral/roadrunner/graphs/contributors" } ], - "description": "RoadRunner kv plugin bridge", - "homepage": "https://roadrunner.dev/", + "description": "PHP attributes reader", + "homepage": "https://spiral.dev", + "keywords": [ + "annotations", + "attributes", + "metadata" + ], "support": { "chat": "https://discord.gg/V6EK4he", - "docs": "https://docs.roadrunner.dev", - "issues": "https://github.com/roadrunner-server/roadrunner/issues", - "source": "https://github.com/roadrunner-php/kv/tree/v4.3.1" + "docs": "https://spiral.dev/docs", + "issues": "https://github.com/spiral/attributes/issues", + "source": "https://github.com/spiral/attributes" }, "funding": [ { - "url": "https://github.com/sponsors/roadrunner-server", + "url": "https://github.com/sponsors/spiral", "type": "github" } ], - "time": "2025-05-05T13:08:45+00:00" + "time": "2024-12-09T15:33:18+00:00" }, { - "name": "spiral/roadrunner-worker", - "version": "v3.6.2", + "name": "spiral/core", + "version": "3.17.2", "source": { "type": "git", - "url": "https://github.com/roadrunner-php/worker.git", - "reference": "8d9905b1e6677f34ff8623893f35b5e2fa828e37" + "url": "https://github.com/spiral/core.git", + "reference": "ca5b8483610aed0c82d4f06bc7907e191d88aca0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/roadrunner-php/worker/zipball/8d9905b1e6677f34ff8623893f35b5e2fa828e37", - "reference": "8d9905b1e6677f34ff8623893f35b5e2fa828e37", + "url": "https://api.github.com/repos/spiral/core/zipball/ca5b8483610aed0c82d4f06bc7907e191d88aca0", + "reference": "ca5b8483610aed0c82d4f06bc7907e191d88aca0", "shasum": "" }, "require": { - "composer-runtime-api": "^2.0", - "ext-json": "*", - "ext-sockets": "*", "php": ">=8.1", - "psr/log": "^2.0 || ^3.0", - "spiral/goridge": "^4.1.0", - "spiral/roadrunner": "^2023.1 || ^2024.1 || ^2025.1" + "psr/container": "^1.1|^2.0", + "spiral/security": "^3.17.2" + }, + "provide": { + "psr/container-implementation": "^1.1|^2.0" }, "require-dev": { - "buggregator/trap": "^1.13", - "jetbrains/phpstorm-attributes": "^1.0", - "phpunit/phpunit": "^10.5.45", - "spiral/code-style": "^2.2", + "mockery/mockery": "^1.6.12", + "phpunit/phpunit": "^10.5.41", "vimeo/psalm": "^6.0" }, - "suggest": { - "spiral/roadrunner-cli": "Provides RoadRunner installation and management CLI tools" - }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.17.x-dev" + } + }, "autoload": { "psr-4": { - "Spiral\\RoadRunner\\": "src" + "Spiral\\Core\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2665,76 +3062,66 @@ "email": "wolfy-j@spiralscout.com" }, { - "name": "Valery Piashchynski", - "homepage": "https://github.com/rustatian" + "name": "Pavel Butchnev (butschster)", + "homepage": "https://github.com/butschster" }, { "name": "Aleksei Gagarin (roxblnfk)", "homepage": "https://github.com/roxblnfk" }, - { - "name": "Pavel Buchnev (butschster)", - "email": "pavel.buchnev@spiralscout.com" - }, { "name": "Maksim Smakouz (msmakouz)", "email": "maksim.smakouz@spiralscout.com" - }, - { - "name": "RoadRunner Community", - "homepage": "https://github.com/roadrunner-server/roadrunner/graphs/contributors" } ], - "description": "RoadRunner: PHP worker", - "homepage": "https://spiral.dev/", + "description": "IoC container, IoC scopes, factory, memory, configuration interfaces", + "homepage": "https://spiral.dev", "support": { - "chat": "https://discord.gg/V6EK4he", - "docs": "https://docs.roadrunner.dev", - "issues": "https://github.com/roadrunner-server/roadrunner/issues", - "source": "https://github.com/roadrunner-php/worker/tree/v3.6.2" + "issues": "https://github.com/spiral/framework/issues", + "source": "https://github.com/spiral/core" }, "funding": [ { - "url": "https://github.com/sponsors/roadrunner-server", + "url": "https://github.com/sponsors/spiral", "type": "github" } ], - "time": "2025-05-05T12:34:50+00:00" + "time": "2026-08-05T12:07:26+00:00" }, { - "name": "spiral/security", - "version": "3.16.0", + "name": "spiral/hmvc", + "version": "3.17.2", "source": { "type": "git", - "url": "https://github.com/spiral/security.git", - "reference": "e47affcd2c1718209cae1fe0c3cf54c522db7b1a" + "url": "https://github.com/spiral/hmvc.git", + "reference": "11111aac577f3d7ccc9bbe8b79dc6441fd21b9c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spiral/security/zipball/e47affcd2c1718209cae1fe0c3cf54c522db7b1a", - "reference": "e47affcd2c1718209cae1fe0c3cf54c522db7b1a", + "url": "https://api.github.com/repos/spiral/hmvc/zipball/11111aac577f3d7ccc9bbe8b79dc6441fd21b9c5", + "reference": "11111aac577f3d7ccc9bbe8b79dc6441fd21b9c5", "shasum": "" }, "require": { "php": ">=8.1", - "spiral/core": "^3.16", - "spiral/hmvc": "^3.16" + "psr/event-dispatcher": "^1.0", + "spiral/core": "^3.17.2", + "spiral/interceptors": "^3.17.2" }, "require-dev": { - "mockery/mockery": "^1.6.12", "phpunit/phpunit": "^10.5.41", - "spiral/console": "^3.16", + "spiral/testing": "^2.12", "vimeo/psalm": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.16.x-dev" + "dev-master": "3.17.x-dev" } }, "autoload": { "psr-4": { - "Spiral\\Security\\": "src" + "Spiral\\Core\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2759,11 +3146,13 @@ "email": "maksim.smakouz@spiralscout.com" } ], - "description": "Spiral, RBAC security layer", + "description": "HMVC Core and Controllers", "homepage": "https://spiral.dev", "support": { + "chat": "https://discord.gg/V6EK4he", + "docs": "https://spiral.dev/docs", "issues": "https://github.com/spiral/framework/issues", - "source": "https://github.com/spiral/security" + "source": "https://github.com/spiral/hmvc" }, "funding": [ { @@ -2771,46 +3160,41 @@ "type": "github" } ], - "time": "2025-12-14T11:39:30+00:00" + "time": "2026-08-05T12:00:27+00:00" }, { - "name": "spiral/tokenizer", - "version": "3.16.0", + "name": "spiral/interceptors", + "version": "3.17.2", "source": { "type": "git", - "url": "https://github.com/spiral/tokenizer.git", - "reference": "11611160800f959ff0ea329470b939a2c0898d1e" + "url": "https://github.com/spiral/interceptors.git", + "reference": "ea0e10ecb2c6058541a2b097a660fd2b532a5ffa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spiral/tokenizer/zipball/11611160800f959ff0ea329470b939a2c0898d1e", - "reference": "11611160800f959ff0ea329470b939a2c0898d1e", + "url": "https://api.github.com/repos/spiral/interceptors/zipball/ea0e10ecb2c6058541a2b097a660fd2b532a5ffa", + "reference": "ea0e10ecb2c6058541a2b097a660fd2b532a5ffa", "shasum": "" }, "require": { - "ext-tokenizer": "*", "php": ">=8.1", - "spiral/core": "^3.16", - "spiral/logger": "^3.16", - "symfony/finder": "^6.4.30 || ^7.4 || ^8.0" + "psr/event-dispatcher": "^1.0", + "spiral/core": "^3.17.2" }, "require-dev": { - "mockery/mockery": "^1.6.12", "phpunit/phpunit": "^10.5.41", - "spiral/attributes": "^2.8|^3.0", - "spiral/boot": "^3.16", - "spiral/files": "^3.16", + "spiral/testing": "^2.12", "vimeo/psalm": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.16.x-dev" + "dev-master": "3.17.x-dev" } }, "autoload": { "psr-4": { - "Spiral\\Tokenizer\\": "src" + "Spiral\\Interceptors\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2835,11 +3219,18 @@ "email": "maksim.smakouz@spiralscout.com" } ], - "description": "Static Analysis: Class and Invocation locators", + "description": "Spiral Interceptors", "homepage": "https://spiral.dev", + "keywords": [ + "aop", + "interceptors", + "spiral" + ], "support": { + "chat": "https://discord.gg/V6EK4he", + "docs": "https://spiral.dev/docs", "issues": "https://github.com/spiral/framework/issues", - "source": "https://github.com/spiral/tokenizer" + "source": "https://github.com/spiral/interceptors" }, "funding": [ { @@ -2847,40 +3238,42 @@ "type": "github" } ], - "time": "2025-12-14T11:39:35+00:00" + "time": "2026-08-05T12:00:37+00:00" }, { - "name": "symfony/clock", - "version": "v8.0.0", + "name": "spiral/logger", + "version": "3.17.2", "source": { "type": "git", - "url": "https://github.com/symfony/clock.git", - "reference": "832119f9b8dbc6c8e6f65f30c5969eca1e88764f" + "url": "https://github.com/spiral/logger.git", + "reference": "671d91a3427019a14670b614474cc57156d5cd69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/clock/zipball/832119f9b8dbc6c8e6f65f30c5969eca1e88764f", - "reference": "832119f9b8dbc6c8e6f65f30c5969eca1e88764f", + "url": "https://api.github.com/repos/spiral/logger/zipball/671d91a3427019a14670b614474cc57156d5cd69", + "reference": "671d91a3427019a14670b614474cc57156d5cd69", "shasum": "" }, "require": { - "php": ">=8.4", - "psr/clock": "^1.0" + "php": ">=8.1", + "psr/log": "1 - 3", + "spiral/core": "^3.17.2" }, - "provide": { - "psr/clock-implementation": "1.0" + "require-dev": { + "mockery/mockery": "^1.6.12", + "phpunit/phpunit": "^10.5.41", + "vimeo/psalm": "^6.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.17.x-dev" + } + }, "autoload": { - "files": [ - "Resources/now.php" - ], "psr-4": { - "Symfony\\Component\\Clock\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "Spiral\\Logger\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2888,30 +3281,247 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Anton Titov (wolfy-j)", + "email": "wolfy-j@spiralscout.com" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Pavel Butchnev (butschster)", + "homepage": "https://github.com/butschster" + }, + { + "name": "Aleksei Gagarin (roxblnfk)", + "homepage": "https://github.com/roxblnfk" + }, + { + "name": "Maksim Smakouz (msmakouz)", + "email": "maksim.smakouz@spiralscout.com" } ], - "description": "Decouples applications from the system clock", - "homepage": "https://symfony.com", - "keywords": [ - "clock", - "psr20", - "time" - ], + "description": "LogFactory and global log listeners", + "homepage": "https://spiral.dev", "support": { - "source": "https://github.com/symfony/clock/tree/v8.0.0" + "issues": "https://github.com/spiral/framework/issues", + "source": "https://github.com/spiral/logger" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { + "url": "https://github.com/sponsors/spiral", + "type": "github" + } + ], + "time": "2026-08-05T12:05:38+00:00" + }, + { + "name": "spiral/security", + "version": "3.17.2", + "source": { + "type": "git", + "url": "https://github.com/spiral/security.git", + "reference": "aefd664efb3e618d0a57c967546f1ad5d9784580" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spiral/security/zipball/aefd664efb3e618d0a57c967546f1ad5d9784580", + "reference": "aefd664efb3e618d0a57c967546f1ad5d9784580", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "spiral/core": "^3.17.2", + "spiral/hmvc": "^3.17.2" + }, + "require-dev": { + "mockery/mockery": "^1.6.12", + "phpunit/phpunit": "^10.5.41", + "spiral/console": "^3.17.2", + "vimeo/psalm": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.17.x-dev" + } + }, + "autoload": { + "psr-4": { + "Spiral\\Security\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anton Titov (wolfy-j)", + "email": "wolfy-j@spiralscout.com" + }, + { + "name": "Pavel Butchnev (butschster)", + "homepage": "https://github.com/butschster" + }, + { + "name": "Aleksei Gagarin (roxblnfk)", + "homepage": "https://github.com/roxblnfk" + }, + { + "name": "Maksim Smakouz (msmakouz)", + "email": "maksim.smakouz@spiralscout.com" + } + ], + "description": "Spiral, RBAC security layer", + "homepage": "https://spiral.dev", + "support": { + "issues": "https://github.com/spiral/framework/issues", + "source": "https://github.com/spiral/security" + }, + "funding": [ + { + "url": "https://github.com/sponsors/spiral", + "type": "github" + } + ], + "time": "2026-08-05T12:07:41+00:00" + }, + { + "name": "spiral/tokenizer", + "version": "3.17.2", + "source": { + "type": "git", + "url": "https://github.com/spiral/tokenizer.git", + "reference": "fcb7a36672d7aef900dc36377ff997ba6f8cde0b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spiral/tokenizer/zipball/fcb7a36672d7aef900dc36377ff997ba6f8cde0b", + "reference": "fcb7a36672d7aef900dc36377ff997ba6f8cde0b", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=8.1", + "spiral/core": "^3.17.2", + "spiral/logger": "^3.17.2", + "symfony/finder": "^6.4.30 || ^7.4 || ^8.0" + }, + "require-dev": { + "mockery/mockery": "^1.6.12", + "phpunit/phpunit": "^10.5.41", + "spiral/attributes": "^2.8|^3.0", + "spiral/boot": "^3.17.2", + "spiral/files": "^3.17.2", + "vimeo/psalm": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.17.x-dev" + } + }, + "autoload": { + "psr-4": { + "Spiral\\Tokenizer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anton Titov (wolfy-j)", + "email": "wolfy-j@spiralscout.com" + }, + { + "name": "Pavel Butchnev (butschster)", + "homepage": "https://github.com/butschster" + }, + { + "name": "Aleksei Gagarin (roxblnfk)", + "homepage": "https://github.com/roxblnfk" + }, + { + "name": "Maksim Smakouz (msmakouz)", + "email": "maksim.smakouz@spiralscout.com" + } + ], + "description": "Static Analysis: Class and Invocation locators", + "homepage": "https://spiral.dev", + "support": { + "issues": "https://github.com/spiral/framework/issues", + "source": "https://github.com/spiral/tokenizer" + }, + "funding": [ + { + "url": "https://github.com/sponsors/spiral", + "type": "github" + } + ], + "time": "2026-08-05T12:05:29+00:00" + }, + { + "name": "symfony/clock", + "version": "v8.1.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/clock.git", + "reference": "945ea3b64d6da9c1c2c354fe5c07b27455df6442" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/clock/zipball/945ea3b64d6da9c1c2c354fe5c07b27455df6442", + "reference": "945ea3b64d6da9c1c2c354fe5c07b27455df6442", + "shasum": "" + }, + "require": { + "php": ">=8.4.1", + "psr/clock": "^1.0" + }, + "provide": { + "psr/clock-implementation": "1.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/now.php" + ], + "psr-4": { + "Symfony\\Component\\Clock\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Decouples applications from the system clock", + "homepage": "https://symfony.com", + "keywords": [ + "clock", + "psr20", + "time" + ], + "support": { + "source": "https://github.com/symfony/clock/tree/v8.1.9" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { "url": "https://github.com/fabpot", "type": "github" }, @@ -2924,20 +3534,20 @@ "type": "tidelift" } ], - "time": "2025-11-12T15:46:48+00:00" + "time": "2026-10-12T14:32:04+00:00" }, { "name": "symfony/console", - "version": "v7.4.1", + "version": "v7.4.23", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "6d9f0fbf2ec2e9785880096e3abd0ca0c88b506e" + "reference": "81957c2440c05c962fe8291f318de6e85f8db330" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/6d9f0fbf2ec2e9785880096e3abd0ca0c88b506e", - "reference": "6d9f0fbf2ec2e9785880096e3abd0ca0c88b506e", + "url": "https://api.github.com/repos/symfony/console/zipball/81957c2440c05c962fe8291f318de6e85f8db330", + "reference": "81957c2440c05c962fe8291f318de6e85f8db330", "shasum": "" }, "require": { @@ -3002,7 +3612,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.4.1" + "source": "https://github.com/symfony/console/tree/v7.4.23" }, "funding": [ { @@ -3022,20 +3632,20 @@ "type": "tidelift" } ], - "time": "2025-12-05T15:23:39+00:00" + "time": "2026-11-03T21:47:07+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.6.0", + "version": "v3.8.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" + "reference": "feb1edf4e546af3b85c5caebe8359a20db230ca3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", - "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/feb1edf4e546af3b85c5caebe8359a20db230ca3", + "reference": "feb1edf4e546af3b85c5caebe8359a20db230ca3", "shasum": "" }, "require": { @@ -3048,7 +3658,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.6-dev" + "dev-main": "3.8-dev" } }, "autoload": { @@ -3073,7 +3683,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.8.1" }, "funding": [ { @@ -3084,34 +3694,39 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-25T14:21:43+00:00" + "time": "2026-09-16T14:15:10+00:00" }, { "name": "symfony/filesystem", - "version": "v7.4.0", + "version": "v8.1.11", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "d551b38811096d0be9c4691d406991b47c0c630a" + "reference": "58f57b6a33e3495f7f41e01258f1ae5ef76cccd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/d551b38811096d0be9c4691d406991b47c0c630a", - "reference": "d551b38811096d0be9c4691d406991b47c0c630a", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/58f57b6a33e3495f7f41e01258f1ae5ef76cccd2", + "reference": "58f57b6a33e3495f7f41e01258f1ae5ef76cccd2", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.4.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, "require-dev": { - "symfony/process": "^6.4|^7.0|^8.0" + "symfony/process": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -3139,7 +3754,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.4.0" + "source": "https://github.com/symfony/filesystem/tree/v8.1.11" }, "funding": [ { @@ -3159,24 +3774,24 @@ "type": "tidelift" } ], - "time": "2025-11-27T13:27:24+00:00" + "time": "2026-11-04T08:39:20+00:00" }, { "name": "symfony/finder", - "version": "v8.0.0", + "version": "v8.1.8", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "7598dd5770580fa3517ec83e8da0c9b9e01f4291" + "reference": "bd4fed193a3132c91c5c93595cbfc78988915822" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/7598dd5770580fa3517ec83e8da0c9b9e01f4291", - "reference": "7598dd5770580fa3517ec83e8da0c9b9e01f4291", + "url": "https://api.github.com/repos/symfony/finder/zipball/bd4fed193a3132c91c5c93595cbfc78988915822", + "reference": "bd4fed193a3132c91c5c93595cbfc78988915822", "shasum": "" }, "require": { - "php": ">=8.4" + "php": ">=8.4.1" }, "require-dev": { "symfony/filesystem": "^7.4|^8.0" @@ -3207,7 +3822,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v8.0.0" + "source": "https://github.com/symfony/finder/tree/v8.1.8" }, "funding": [ { @@ -3227,35 +3842,32 @@ "type": "tidelift" } ], - "time": "2025-11-05T14:36:47+00:00" + "time": "2026-09-26T06:33:49+00:00" }, { "name": "symfony/http-client", - "version": "v7.4.1", + "version": "v8.1.11", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "26cc224ea7103dda90e9694d9e139a389092d007" + "reference": "1758b323ba9c5e88b42602b9c2cb27b640de4d36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/26cc224ea7103dda90e9694d9e139a389092d007", - "reference": "26cc224ea7103dda90e9694d9e139a389092d007", + "url": "https://api.github.com/repos/symfony/http-client/zipball/1758b323ba9c5e88b42602b9c2cb27b640de4d36", + "reference": "1758b323ba9c5e88b42602b9c2cb27b640de4d36", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.4.1", "psr/log": "^1|^2|^3", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/http-client-contracts": "~3.4.4|^3.5.2", - "symfony/polyfill-php83": "^1.29", + "symfony/deprecation-contracts": "^2.5|^3.0", + "symfony/http-client-contracts": "^3.7", "symfony/service-contracts": "^2.5|^3" }, "conflict": { - "amphp/amp": "<2.5", - "amphp/socket": "<1.1", - "php-http/discovery": "<1.15", - "symfony/http-foundation": "<6.4" + "amphp/amp": "<3", + "php-http/discovery": "<1.15" }, "provide": { "php-http/async-client-implementation": "*", @@ -3264,20 +3876,19 @@ "symfony/http-client-implementation": "3.0" }, "require-dev": { - "amphp/http-client": "^4.2.1|^5.0", - "amphp/http-tunnel": "^1.0|^2.0", - "guzzlehttp/promises": "^1.4|^2.0", + "amphp/http-client": "^5.3.2", + "amphp/http-tunnel": "^2.0", + "guzzlehttp/guzzle": "^7.10|^8.0", "nyholm/psr7": "^1.0", "php-http/httplug": "^1.0|^2.0", "psr/http-client": "^1.0", - "symfony/amphp-http-client-meta": "^1.0|^2.0", - "symfony/cache": "^6.4|^7.0|^8.0", - "symfony/dependency-injection": "^6.4|^7.0|^8.0", - "symfony/http-kernel": "^6.4|^7.0|^8.0", - "symfony/messenger": "^6.4|^7.0|^8.0", - "symfony/process": "^6.4|^7.0|^8.0", - "symfony/rate-limiter": "^6.4|^7.0|^8.0", - "symfony/stopwatch": "^6.4|^7.0|^8.0" + "symfony/cache": "^7.4|^8.0", + "symfony/dependency-injection": "^7.4|^8.0", + "symfony/http-kernel": "^7.4|^8.0", + "symfony/messenger": "^7.4|^8.0", + "symfony/process": "^7.4|^8.0", + "symfony/rate-limiter": "^7.4|^8.0", + "symfony/stopwatch": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -3308,7 +3919,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v7.4.1" + "source": "https://github.com/symfony/http-client/tree/v8.1.11" }, "funding": [ { @@ -3328,20 +3939,20 @@ "type": "tidelift" } ], - "time": "2025-12-04T21:12:57+00:00" + "time": "2026-11-04T08:39:20+00:00" }, { "name": "symfony/http-client-contracts", - "version": "v3.6.0", + "version": "v3.8.1", "source": { "type": "git", "url": "https://github.com/symfony/http-client-contracts.git", - "reference": "75d7043853a42837e68111812f4d964b01e5101c" + "reference": "f9f94260f787446c6fd430b2ae1969fe41ae1ba8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/75d7043853a42837e68111812f4d964b01e5101c", - "reference": "75d7043853a42837e68111812f4d964b01e5101c", + "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/f9f94260f787446c6fd430b2ae1969fe41ae1ba8", + "reference": "f9f94260f787446c6fd430b2ae1969fe41ae1ba8", "shasum": "" }, "require": { @@ -3354,7 +3965,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.6-dev" + "dev-main": "3.8-dev" } }, "autoload": { @@ -3390,7 +4001,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/http-client-contracts/tree/v3.6.0" + "source": "https://github.com/symfony/http-client-contracts/tree/v3.8.1" }, "funding": [ { @@ -3401,25 +4012,29 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-04-29T11:18:49+00:00" + "time": "2026-10-04T15:04:25+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.33.0", + "version": "v1.37.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" + "reference": "141046a8f9477948ff284fa65be2095baafb94f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", - "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/141046a8f9477948ff284fa65be2095baafb94f2", + "reference": "141046a8f9477948ff284fa65be2095baafb94f2", "shasum": "" }, "require": { @@ -3469,7 +4084,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.37.0" }, "funding": [ { @@ -3489,20 +4104,20 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2026-04-10T16:19:22+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.33.0", + "version": "v1.43.3", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70" + "reference": "5a8f33c87aeecffce24e721b5064fab05f4becf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70", - "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/5a8f33c87aeecffce24e721b5064fab05f4becf8", + "reference": "5a8f33c87aeecffce24e721b5064fab05f4becf8", "shasum": "" }, "require": { @@ -3551,7 +4166,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.43.3" }, "funding": [ { @@ -3571,20 +4186,20 @@ "type": "tidelift" } ], - "time": "2025-06-27T09:58:17+00:00" + "time": "2026-10-15T09:18:53+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.33.0", + "version": "v1.43.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "3833d7255cc303546435cb650316bff708a1c75c" + "reference": "ebd57ccc7edb93d632e184efbe7693d2517bab3b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", - "reference": "3833d7255cc303546435cb650316bff708a1c75c", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/ebd57ccc7edb93d632e184efbe7693d2517bab3b", + "reference": "ebd57ccc7edb93d632e184efbe7693d2517bab3b", "shasum": "" }, "require": { @@ -3636,7 +4251,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.43.0" }, "funding": [ { @@ -3656,20 +4271,20 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2026-09-23T22:02:09+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.33.0", + "version": "v1.43.3", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" + "reference": "122889ed24dc000165bcbfd77ec412f15cbdfc6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", - "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/122889ed24dc000165bcbfd77ec412f15cbdfc6a", + "reference": "122889ed24dc000165bcbfd77ec412f15cbdfc6a", "shasum": "" }, "require": { @@ -3721,7 +4336,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.43.3" }, "funding": [ { @@ -3741,7 +4356,7 @@ "type": "tidelift" } ], - "time": "2024-12-23T08:48:59+00:00" + "time": "2026-10-28T09:35:49+00:00" }, { "name": "symfony/polyfill-php82", @@ -3825,16 +4440,16 @@ }, { "name": "symfony/polyfill-php83", - "version": "v1.33.0", + "version": "v1.43.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php83.git", - "reference": "17f6f9a6b1735c0f163024d959f700cfbc5155e5" + "reference": "80ccff923a8d61f73ebe9da0aa94e25232f004ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/17f6f9a6b1735c0f163024d959f700cfbc5155e5", - "reference": "17f6f9a6b1735c0f163024d959f700cfbc5155e5", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/80ccff923a8d61f73ebe9da0aa94e25232f004ce", + "reference": "80ccff923a8d61f73ebe9da0aa94e25232f004ce", "shasum": "" }, "require": { @@ -3881,7 +4496,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php83/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-php83/tree/v1.43.0" }, "funding": [ { @@ -3901,32 +4516,38 @@ "type": "tidelift" } ], - "time": "2025-07-08T02:45:35+00:00" + "time": "2026-09-25T15:50:05+00:00" }, { - "name": "symfony/process", - "version": "v7.4.8", + "name": "symfony/polyfill-time", + "version": "v1.42.0", "source": { "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "60f19cd3badc8de688421e21e4305eba50f8089a" + "url": "https://github.com/symfony/polyfill-time.git", + "reference": "ac9f1ed802dd58f37e720388130c088434aa09fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/60f19cd3badc8de688421e21e4305eba50f8089a", - "reference": "60f19cd3badc8de688421e21e4305eba50f8089a", + "url": "https://api.github.com/repos/symfony/polyfill-time/zipball/ac9f1ed802dd58f37e720388130c088434aa09fc", + "reference": "ac9f1ed802dd58f37e720388130c088434aa09fc", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.1" }, "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, "autoload": { "psr-4": { - "Symfony\\Component\\Process\\": "" + "Symfony\\Polyfill\\Time\\": "" }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -3935,18 +4556,30 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Ignace Philippe Nyamagana Butera", + "email": "nyamsprod@gmail.com" + }, + { + "name": "Tim Düsterhus", + "email": "tim@tideways-gmbh.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Executes commands in sub-processes", + "description": "Symfony polyfill for the Time API added to PHP 8.6", "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "duration", + "polyfill", + "portable", + "shim", + "time" + ], "support": { - "source": "https://github.com/symfony/process/tree/v7.4.8" + "source": "https://github.com/symfony/polyfill-time/tree/v1.42.0" }, "funding": [ { @@ -3966,38 +4599,103 @@ "type": "tidelift" } ], - "time": "2026-03-24T13:12:05+00:00" + "time": "2026-08-07T13:08:13+00:00" }, { - "name": "symfony/service-contracts", - "version": "v3.6.1", + "name": "symfony/process", + "version": "v8.1.10", "source": { "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43" + "url": "https://github.com/symfony/process.git", + "reference": "08aa69fa0998bb65a089f9e148a2c0f8b391398e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/45112560a3ba2d715666a509a0bc9521d10b6c43", - "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43", + "url": "https://api.github.com/repos/symfony/process/zipball/08aa69fa0998bb65a089f9e148a2c0f8b391398e", + "reference": "08aa69fa0998bb65a089f9e148a2c0f8b391398e", "shasum": "" }, "require": { - "php": ">=8.1", - "psr/container": "^1.1|^2.0", - "symfony/deprecation-contracts": "^2.5|^3" - }, - "conflict": { - "ext-psr": "<1.1|>=2" + "php": ">=8.4.1" }, "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/contracts", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v8.1.10" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-10-25T14:40:25+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v3.8.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "052852a96fd5e5ebdb617dba22031e41a3300fb5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/052852a96fd5e5ebdb617dba22031e41a3300fb5", + "reference": "052852a96fd5e5ebdb617dba22031e41a3300fb5", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.6-dev" + "dev-main": "3.8-dev" } }, "autoload": { @@ -4033,7 +4731,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.6.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.8.1" }, "funding": [ { @@ -4053,24 +4751,24 @@ "type": "tidelift" } ], - "time": "2025-07-15T11:30:57+00:00" + "time": "2026-10-20T17:38:25+00:00" }, { "name": "symfony/string", - "version": "v8.0.1", + "version": "v8.1.10", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "ba65a969ac918ce0cc3edfac6cdde847eba231dc" + "reference": "6c6110979c0150393bbb336170e286d51ab4d76c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/ba65a969ac918ce0cc3edfac6cdde847eba231dc", - "reference": "ba65a969ac918ce0cc3edfac6cdde847eba231dc", + "url": "https://api.github.com/repos/symfony/string/zipball/6c6110979c0150393bbb336170e286d51ab4d76c", + "reference": "6c6110979c0150393bbb336170e286d51ab4d76c", "shasum": "" }, "require": { - "php": ">=8.4", + "php": ">=8.4.1", "symfony/polyfill-ctype": "^1.8", "symfony/polyfill-intl-grapheme": "^1.33", "symfony/polyfill-intl-normalizer": "^1.0", @@ -4123,7 +4821,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v8.0.1" + "source": "https://github.com/symfony/string/tree/v8.1.10" }, "funding": [ { @@ -4143,24 +4841,24 @@ "type": "tidelift" } ], - "time": "2025-12-01T09:13:36+00:00" + "time": "2026-10-23T17:06:53+00:00" }, { "name": "symfony/translation", - "version": "v8.0.1", + "version": "v8.1.11", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "770e3b8b0ba8360958abedcabacd4203467333ca" + "reference": "d065adf56e5508293e80d7c140b0a9e043b63e9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/770e3b8b0ba8360958abedcabacd4203467333ca", - "reference": "770e3b8b0ba8360958abedcabacd4203467333ca", + "url": "https://api.github.com/repos/symfony/translation/zipball/d065adf56e5508293e80d7c140b0a9e043b63e9c", + "reference": "d065adf56e5508293e80d7c140b0a9e043b63e9c", "shasum": "" }, "require": { - "php": ">=8.4", + "php": ">=8.4.1", "symfony/polyfill-mbstring": "^1.0", "symfony/translation-contracts": "^3.6.1" }, @@ -4216,7 +4914,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v8.0.1" + "source": "https://github.com/symfony/translation/tree/v8.1.11" }, "funding": [ { @@ -4236,20 +4934,20 @@ "type": "tidelift" } ], - "time": "2025-12-01T09:13:36+00:00" + "time": "2026-11-01T22:27:46+00:00" }, { "name": "symfony/translation-contracts", - "version": "v3.6.1", + "version": "v3.8.1", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "65a8bc82080447fae78373aa10f8d13b38338977" + "reference": "0a3ae917402632fcba2aeddae9c98332f3d7dd05" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/65a8bc82080447fae78373aa10f8d13b38338977", - "reference": "65a8bc82080447fae78373aa10f8d13b38338977", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/0a3ae917402632fcba2aeddae9c98332f3d7dd05", + "reference": "0a3ae917402632fcba2aeddae9c98332f3d7dd05", "shasum": "" }, "require": { @@ -4262,7 +4960,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.6-dev" + "dev-main": "3.8-dev" } }, "autoload": { @@ -4298,7 +4996,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.6.1" + "source": "https://github.com/symfony/translation-contracts/tree/v3.8.1" }, "funding": [ { @@ -4318,31 +5016,32 @@ "type": "tidelift" } ], - "time": "2025-07-15T13:41:35+00:00" + "time": "2026-10-03T08:17:19+00:00" }, { "name": "symfony/yaml", - "version": "v8.0.1", + "version": "v8.1.11", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "7a1a90ba1df6e821a6b53c4cabdc32a56cabfb14" + "reference": "e8266f55160f674f290a5f567cb55e11e21f921b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/7a1a90ba1df6e821a6b53c4cabdc32a56cabfb14", - "reference": "7a1a90ba1df6e821a6b53c4cabdc32a56cabfb14", + "url": "https://api.github.com/repos/symfony/yaml/zipball/e8266f55160f674f290a5f567cb55e11e21f921b", + "reference": "e8266f55160f674f290a5f567cb55e11e21f921b", "shasum": "" }, "require": { - "php": ">=8.4", + "php": ">=8.4.1", "symfony/polyfill-ctype": "^1.8" }, "conflict": { "symfony/console": "<7.4" }, "require-dev": { - "symfony/console": "^7.4|^8.0" + "symfony/console": "^7.4|^8.0", + "yaml/yaml-test-suite": "*" }, "bin": [ "Resources/bin/yaml-lint" @@ -4373,7 +5072,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v8.0.1" + "source": "https://github.com/symfony/yaml/tree/v8.1.11" }, "funding": [ { @@ -4393,7 +5092,7 @@ "type": "tidelift" } ], - "time": "2025-12-04T18:17:06+00:00" + "time": "2026-11-04T08:39:20+00:00" }, { "name": "tbachert/spi", @@ -4510,41 +5209,43 @@ }, { "name": "temporal/sdk", - "version": "v2.17.1", + "version": "dev-nexus-new", "source": { "type": "git", "url": "https://github.com/temporalio/sdk-php.git", - "reference": "cdbf6874efd25b3eee50b52c5c2d54ae0d004be4" + "reference": "511d587212ca4bfcf89a68bb46ef22b5650b497a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/temporalio/sdk-php/zipball/cdbf6874efd25b3eee50b52c5c2d54ae0d004be4", - "reference": "cdbf6874efd25b3eee50b52c5c2d54ae0d004be4", + "url": "https://api.github.com/repos/temporalio/sdk-php/zipball/511d587212ca4bfcf89a68bb46ef22b5650b497a", + "reference": "511d587212ca4bfcf89a68bb46ef22b5650b497a", "shasum": "" }, "require": { "ext-curl": "*", "ext-json": "*", "google/common-protos": "^4.9", - "google/protobuf": "^4.31.1", + "google/protobuf": "^4.33.6 || ^5.34.0", "grpc/grpc": "^1.57", "internal/destroy": "^1.0", "internal/promise": "^3.4", - "nesbot/carbon": "^2.72.6 || ^3.8.4", - "php": ">=8.1", + "nesbot/carbon": "^3.8.4", + "php": ">=8.2", + "psr/clock": "^1.0", "psr/log": "^2.0 || ^3.0.2", "ramsey/uuid": "^4.7.6", - "roadrunner-php/roadrunner-api-dto": "^1.14.0", - "roadrunner-php/version-checker": "^1.0.2", + "roadrunner/api-dto": "^2.1", + "roadrunner/cli": "^3.0.1", + "roadrunner/goridge": "^4.6", + "roadrunner/kv": "^4.5.1", + "roadrunner/roadrunner": "^3.0", + "roadrunner/version-checker": "^1.4.1", + "roadrunner/worker": "^3.8.2", "spiral/attributes": "^3.1.8", - "spiral/roadrunner": "^2025.1.5", - "spiral/roadrunner-cli": "^2.6", - "spiral/roadrunner-kv": "^4.3.1", - "spiral/roadrunner-worker": "^3.6.2", - "symfony/filesystem": "^5.4.45 || ^6.4.13 || ^7.0 || ^8.0", - "symfony/http-client": "^5.4.49 || ^6.4.17 || ^7.0 || ^8.0", + "symfony/filesystem": "^6.4.50 || ^7.0 || ^8.0", + "symfony/http-client": "^6.4.50 || ^7.0 || ^8.0", "symfony/polyfill-php83": "^1.31.0", - "symfony/process": "^5.4.51 || ^6.4.15 || ^7.0 || ^8.0" + "symfony/process": "^6.4.33 || ^7.0 || ^8.0" }, "require-dev": { "buggregator/trap": "^1.13.0", @@ -4553,10 +5254,11 @@ "dereuromark/composer-prefer-lowest": "^0.1.10", "doctrine/annotations": "^1.14.4 || ^2.0.2", "ext-simplexml": "*", - "internal/dload": "^1.2.0", + "internal/dload": "^1.16.5", "internal/toml": "^1.0.3", "jetbrains/phpstorm-attributes": "dev-master", "laminas/laminas-code": "^4.16", + "phpbench/phpbench": "^1.4", "phpunit/phpunit": "10.5.63", "spiral/code-style": "~2.3.0", "spiral/core": "^3.14.9", @@ -4572,25 +5274,98 @@ }, "type": "library", "extra": { + "skills": { + "sources": [ + { + "from": "github", + "package": "temporalio/skill-temporal-developer" + } + ] + }, "patches": { "phpunit/phpunit": { - "Make runTest protected": "patches/phpunit-run-test-protected.patch", - "Improve assertInstanceOf error message": "patches/phpunit-instance-of.patch" + "Improve assertInstanceOf error message": "patches/phpunit-instance-of.patch", + "Make runTest protected": "patches/phpunit-run-test-protected.patch" } } }, "autoload": { + "psr-4": { + "Temporal\\Api\\Testservice\\": "testing/api/testservice/Temporal/Api/Testservice", + "GPBMetadata\\Temporal\\Api\\Testservice\\": "testing/api/testservice/GPBMetadata/Temporal/Api/Testservice", + "Temporal\\Testing\\": "testing/src", + "Temporal\\": "src" + }, "files": [ "src/include.php" - ], + ] + }, + "autoload-dev": { "psr-4": { - "Temporal\\": "src", - "Temporal\\Testing\\": "testing/src", - "Temporal\\Api\\Testservice\\": "testing/api/testservice/Temporal/Api/Testservice", - "GPBMetadata\\Temporal\\Api\\Testservice\\": "testing/api/testservice/GPBMetadata/Temporal/Api/Testservice" - } + "Temporal\\Tests\\Acceptance\\App\\": "tests/Acceptance/App", + "Temporal\\Tests\\Interceptor\\": "tests/Fixtures/src/Interceptor", + "Temporal\\Tests\\Workflow\\": "tests/Fixtures/src/Workflow", + "Temporal\\Tests\\Activity\\": "tests/Fixtures/src/Activity", + "Temporal\\Tests\\DTO\\": "tests/Fixtures/src/DTO", + "Temporal\\Tests\\Proto\\": "tests/Fixtures/src/Proto", + "Temporal\\Tests\\": "tests" + } + }, + "scripts": { + "get:binaries": [ + "dload get --no-interaction -vv", + "dload build --no-interaction", + "Temporal\\Worker\\Transport\\RoadRunnerVersionChecker::postUpdate" + ], + "cs:diff": [ + "php-cs-fixer fix --dry-run -v --diff --show-progress dots" + ], + "cs:fix": [ + "php-cs-fixer fix -v" + ], + "psalm": [ + "psalm" + ], + "psalm:baseline": [ + "psalm --set-baseline=psalm-baseline.xml" + ], + "bench": [ + "phpbench run --report=aggregate" + ], + "test:unit": [ + "tests/runner.php vendor/bin/phpunit --testsuite=Unit --color=always --testdox" + ], + "test:func": [ + "tests/runner.php vendor/bin/phpunit --testsuite=Functional --color=always --testdox" + ], + "test:func-timeskip": [ + "tests/runner.php vendor/bin/phpunit --testsuite=Functional-TimeSkipping --color=always --testdox" + ], + "test:arch": [ + "phpunit --testsuite=Arch --color=always --testdox" + ], + "test:accept": [ + "tests/runner.php vendor/bin/phpunit --testsuite=Acceptance --color=always --testdox" + ], + "test:accept-slow": [ + "tests/runner.php vendor/bin/phpunit --testsuite=\"Acceptance-Slow\" --color=always --testdox" + ], + "test:accept-fast": [ + "tests/runner.php vendor/bin/phpunit --testsuite=\"Acceptance-Fast\" --color=always --testdox" + ], + "transcripts:last": [ + "php tests/Acceptance/transcript-merge.php" + ], + "transcripts:list": [ + "php tests/Acceptance/transcript-merge.php --list" + ], + "transcripts:merge": [ + "php tests/Acceptance/transcript-merge.php" + ], + "transcripts:clean": [ + "rm -rf runtime/tests/transcripts/*" + ] }, - "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -4607,283 +5382,148 @@ "workflow" ], "support": { - "docs": "https://docs.temporal.io", "forum": "https://community.temporal.io", + "docs": "https://docs.temporal.io", "issues": "https://github.com/temporalio/sdk-php/issues", "source": "https://github.com/temporalio/sdk-php" }, - "time": "2026-03-08T14:43:31+00:00" - } - ], - "packages-dev": [ + "time": "2026-11-09T13:53:05+00:00" + }, { - "name": "buggregator/trap", - "version": "1.15.0", + "name": "yiisoft/injector", + "version": "1.2.2", "source": { "type": "git", - "url": "https://github.com/buggregator/trap.git", - "reference": "a4f46cc638144856901710a6ec7569bf3c929052" + "url": "https://github.com/yiisoft/injector.git", + "reference": "a3627145dc1d214d78d061dbef4f90773aadd747" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/buggregator/trap/zipball/a4f46cc638144856901710a6ec7569bf3c929052", - "reference": "a4f46cc638144856901710a6ec7569bf3c929052", + "url": "https://api.github.com/repos/yiisoft/injector/zipball/a3627145dc1d214d78d061dbef4f90773aadd747", + "reference": "a3627145dc1d214d78d061dbef4f90773aadd747", "shasum": "" }, "require": { - "clue/stream-filter": "^1.6", - "ext-filter": "*", - "ext-sockets": "*", - "internal/destroy": "^1.0", - "nyholm/psr7": "^1.8", - "php": ">=8.1", - "php-http/message": "^1.15", - "psr/container": "^1.1 || ^2.0", - "psr/http-message": "^1.1 || ^2", - "symfony/console": "^6.4 || ^7 || ^8", - "symfony/var-dumper": "^6.3 || ^7 || ^8", - "yiisoft/injector": "^1.2" + "php": "7.4 - 8.6" }, "require-dev": { - "dereuromark/composer-prefer-lowest": "^0.1.10", - "ergebnis/phpunit-slow-test-detector": "^2.14", - "google/protobuf": "^3.25 || ^4.30", - "phpunit/phpunit": "^10.5.10", - "rector/rector": "^1.1", - "roxblnfk/unpoly": "^1.8.1", - "spiral/code-style": "^2.2.2", - "ta-tikoma/phpunit-architecture-test": "^0.8.5", - "vimeo/psalm": "^6.5" + "bamarni/composer-bin-plugin": "^1.8.3", + "ext-filter": "*", + "friendsofphp/php-cs-fixer": "^3.93", + "phpbench/phpbench": "^1.1", + "phpstan/phpstan": "^2.1", + "phpunit/phpunit": "^9.5", + "psr/container": "^1.0 || ^2.0", + "rector/rector": "^2.5.8", + "shipmonk/composer-dependency-analyser": "^1.8", + "spatie/phpunit-watcher": "^1.23", + "yiisoft/code-style": "^1.1", + "yiisoft/test-support": "^1.4 || ^3.1" }, "suggest": { - "ext-simplexml": "To load trap.xml", - "roxblnfk/unpoly": "If you want to remove unnecessary PHP polyfills depend on PHP version." - }, - "bin": [ - "bin/trap" - ], - "type": "library", - "autoload": { - "files": [ - "src/functions.php" - ], - "psr-4": { - "Buggregator\\Trap\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Aleksei Gagarin (roxblnfk)", - "homepage": "https://github.com/roxblnfk" - }, - { - "name": "Pavel Buchnev (butschster)", - "homepage": "https://github.com/butschster" - } - ], - "description": "A simple and powerful tool for debugging PHP applications.", - "homepage": "https://buggregator.dev/", - "keywords": [ - "Fibers", - "WebSockets", - "binary dump", - "cli", - "console", - "debug", - "dev", - "dump", - "dumper", - "helper", - "sentry", - "server", - "smtp" - ], - "support": { - "issues": "https://github.com/buggregator/trap/issues", - "source": "https://github.com/buggregator/trap/tree/1.15.0" - }, - "funding": [ - { - "url": "https://boosty.to/roxblnfk", - "type": "boosty" - } - ], - "time": "2025-11-30T13:26:02+00:00" - }, - { - "name": "clue/stream-filter", - "version": "v1.7.0", - "source": { - "type": "git", - "url": "https://github.com/clue/stream-filter.git", - "reference": "049509fef80032cb3f051595029ab75b49a3c2f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/clue/stream-filter/zipball/049509fef80032cb3f051595029ab75b49a3c2f7", - "reference": "049509fef80032cb3f051595029ab75b49a3c2f7", - "shasum": "" - }, - "require": { - "php": ">=5.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" + "psr/container": "For automatic resolving of dependencies" }, "type": "library", - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "Clue\\StreamFilter\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering" - } - ], - "description": "A simple and modern approach to stream filtering in PHP", - "homepage": "https://github.com/clue/stream-filter", - "keywords": [ - "bucket brigade", - "callback", - "filter", - "php_user_filter", - "stream", - "stream_filter_append", - "stream_filter_register" - ], - "support": { - "issues": "https://github.com/clue/stream-filter/issues", - "source": "https://github.com/clue/stream-filter/tree/v1.7.0" - }, - "funding": [ - { - "url": "https://clue.engineering/support", - "type": "custom" - }, - { - "url": "https://github.com/clue", - "type": "github" + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true, + "target-directory": "tools" } - ], - "time": "2023-12-20T15:40:13+00:00" - }, - { - "name": "internal/dload", - "version": "1.8.0", - "source": { - "type": "git", - "url": "https://github.com/php-internal/dload.git", - "reference": "be366a424843f266b22354d06d5243fe898eb1a2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-internal/dload/zipball/be366a424843f266b22354d06d5243fe898eb1a2", - "reference": "be366a424843f266b22354d06d5243fe898eb1a2", - "shasum": "" - }, - "require": { - "composer/semver": "^3.4", - "internal/destroy": "^1.0", - "internal/path": "^1.2", - "internal/toml": "^1.0.3", - "nyholm/psr7": "^1.8", - "php": ">=8.1", - "psr/container": "1 - 2", - "psr/http-client": "^1.0", - "react/async": "^3.2 || ^4.3", - "react/promise": "^2.10 || ^3.2", - "symfony/console": "^6.4 || ^7 || ^8", - "symfony/http-client": "^4.4 || ^5.4 || ^6.4 || ^7 || ^8", - "yiisoft/injector": "^1.2" }, - "require-dev": { - "buggregator/trap": "^1.15", - "dereuromark/composer-prefer-lowest": "^0.1.10", - "phpunit/phpunit": "^10.5", - "spiral/code-style": "^2.2.2", - "ta-tikoma/phpunit-architecture-test": "^0.8.5", - "vimeo/psalm": "^6.10" - }, - "suggest": { - "ext-simplexml": "to support XML configs parsing" - }, - "bin": [ - "bin/dload" - ], - "type": "library", "autoload": { "psr-4": { - "Internal\\DLoad\\": "src/" + "Yiisoft\\Injector\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "authors": [ - { - "name": "Aleksei Gagarin (roxblnfk)", - "homepage": "https://github.com/roxblnfk" - } - ], - "description": "Downloads binaries.", + "description": "PSR-11 compatible injector. Executes a callable and makes an instances by injecting dependencies from a given DI container.", + "homepage": "https://www.yiiframework.com/", "keywords": [ - "download binaries", - "downloader" + "PSR-11", + "dependency injection", + "di", + "injector", + "reflection" ], "support": { - "issues": "https://github.com/php-internal/dload/issues", - "source": "https://github.com/php-internal/dload/tree/1.8.0" + "chat": "https://t.me/yii3en", + "forum": "https://www.yiiframework.com/forum/", + "irc": "ircs://irc.libera.chat:6697/yii", + "issues": "https://github.com/yiisoft/injector/issues?state=open", + "source": "https://github.com/yiisoft/injector", + "wiki": "https://www.yiiframework.com/wiki/" }, "funding": [ { - "url": "https://boosty.to/roxblnfk", - "type": "boosty" + "url": "https://github.com/sponsors/yiisoft", + "type": "github" + }, + { + "url": "https://opencollective.com/yiisoft", + "type": "opencollective" } ], - "time": "2025-12-17T06:29:45+00:00" - }, + "time": "2026-10-25T19:11:06+00:00" + } + ], + "packages-dev": [ { - "name": "internal/path", - "version": "1.2.0", + "name": "buggregator/trap", + "version": "1.15.0", "source": { "type": "git", - "url": "https://github.com/php-internal/path.git", - "reference": "ec0ddb060a204793f1ddfb5219bb024a754df0e0" + "url": "https://github.com/buggregator/trap.git", + "reference": "a4f46cc638144856901710a6ec7569bf3c929052" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-internal/path/zipball/ec0ddb060a204793f1ddfb5219bb024a754df0e0", - "reference": "ec0ddb060a204793f1ddfb5219bb024a754df0e0", + "url": "https://api.github.com/repos/buggregator/trap/zipball/a4f46cc638144856901710a6ec7569bf3c929052", + "reference": "a4f46cc638144856901710a6ec7569bf3c929052", "shasum": "" }, "require": { - "php": ">=8.1" + "clue/stream-filter": "^1.6", + "ext-filter": "*", + "ext-sockets": "*", + "internal/destroy": "^1.0", + "nyholm/psr7": "^1.8", + "php": ">=8.1", + "php-http/message": "^1.15", + "psr/container": "^1.1 || ^2.0", + "psr/http-message": "^1.1 || ^2", + "symfony/console": "^6.4 || ^7 || ^8", + "symfony/var-dumper": "^6.3 || ^7 || ^8", + "yiisoft/injector": "^1.2" }, "require-dev": { - "buggregator/trap": "^1.15", + "dereuromark/composer-prefer-lowest": "^0.1.10", + "ergebnis/phpunit-slow-test-detector": "^2.14", + "google/protobuf": "^3.25 || ^4.30", + "phpunit/phpunit": "^10.5.10", + "rector/rector": "^1.1", "roxblnfk/unpoly": "^1.8.1", - "spiral/code-style": "^2.3.1", - "testo/testo": "^1.0@dev", - "vimeo/psalm": "^6.13" + "spiral/code-style": "^2.2.2", + "ta-tikoma/phpunit-architecture-test": "^0.8.5", + "vimeo/psalm": "^6.5" + }, + "suggest": { + "ext-simplexml": "To load trap.xml", + "roxblnfk/unpoly": "If you want to remove unnecessary PHP polyfills depend on PHP version." }, + "bin": [ + "bin/trap" + ], "type": "library", "autoload": { + "files": [ + "src/functions.php" + ], "psr-4": { - "Internal\\": "src/" + "Buggregator\\Trap\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -4894,22 +5534,32 @@ { "name": "Aleksei Gagarin (roxblnfk)", "homepage": "https://github.com/roxblnfk" + }, + { + "name": "Pavel Buchnev (butschster)", + "homepage": "https://github.com/butschster" } ], - "description": "Type-safe, immutable file path library with cross-platform support and automatic normalization.", + "description": "A simple and powerful tool for debugging PHP applications.", + "homepage": "https://buggregator.dev/", "keywords": [ - "cross-platform", - "file", - "filepath", - "filesystem", + "Fibers", + "WebSockets", + "binary dump", + "cli", + "console", + "debug", + "dev", + "dump", + "dumper", "helper", - "path", - "unix", - "windows" + "sentry", + "server", + "smtp" ], "support": { - "issues": "https://github.com/php-internal/path/issues", - "source": "https://github.com/php-internal/path/tree/1.2.0" + "issues": "https://github.com/buggregator/trap/issues", + "source": "https://github.com/buggregator/trap/tree/1.15.0" }, "funding": [ { @@ -4917,63 +5567,73 @@ "type": "boosty" } ], - "time": "2025-12-03T11:32:09+00:00" + "time": "2025-11-30T13:26:02+00:00" }, { - "name": "internal/toml", - "version": "1.0.3", + "name": "clue/stream-filter", + "version": "v1.7.0", "source": { "type": "git", - "url": "https://github.com/php-internal/toml.git", - "reference": "519d4d1c523249250a2e01a8c63d7f41e5be5d70" + "url": "https://github.com/clue/stream-filter.git", + "reference": "049509fef80032cb3f051595029ab75b49a3c2f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-internal/toml/zipball/519d4d1c523249250a2e01a8c63d7f41e5be5d70", - "reference": "519d4d1c523249250a2e01a8c63d7f41e5be5d70", + "url": "https://api.github.com/repos/clue/stream-filter/zipball/049509fef80032cb3f051595029ab75b49a3c2f7", + "reference": "049509fef80032cb3f051595029ab75b49a3c2f7", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=5.3" }, "require-dev": { - "buggregator/trap": "^1.13", - "phpunit/phpunit": "^10.5", - "spiral/code-style": "^2.3.0", - "ta-tikoma/phpunit-architecture-test": "^0.8.5", - "vimeo/psalm": "^6.13" + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" }, "type": "library", "autoload": { + "files": [ + "src/functions_include.php" + ], "psr-4": { - "Internal\\Toml\\": "src/" + "Clue\\StreamFilter\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Aleksei Gagarin (roxblnfk)", - "homepage": "https://github.com/roxblnfk" + "name": "Christian Lück", + "email": "christian@clue.engineering" } ], - "description": "TOML support for PHP", + "description": "A simple and modern approach to stream filtering in PHP", + "homepage": "https://github.com/clue/stream-filter", "keywords": [ - "toml" + "bucket brigade", + "callback", + "filter", + "php_user_filter", + "stream", + "stream_filter_append", + "stream_filter_register" ], "support": { - "issues": "https://github.com/php-internal/toml/issues", - "source": "https://github.com/php-internal/toml/tree/1.0.3" + "issues": "https://github.com/clue/stream-filter/issues", + "source": "https://github.com/clue/stream-filter/tree/v1.7.0" }, "funding": [ { - "url": "https://patreon.com/roxblnfk", - "type": "patreon" + "url": "https://clue.engineering/support", + "type": "custom" + }, + { + "url": "https://github.com/clue", + "type": "github" } ], - "time": "2025-11-17T15:05:00+00:00" + "time": "2023-12-20T15:40:13+00:00" }, { "name": "myclabs/deep-copy", @@ -5093,84 +5753,6 @@ }, "time": "2025-12-06T11:56:16+00:00" }, - { - "name": "nyholm/psr7", - "version": "1.8.2", - "source": { - "type": "git", - "url": "https://github.com/Nyholm/psr7.git", - "reference": "a71f2b11690f4b24d099d6b16690a90ae14fc6f3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Nyholm/psr7/zipball/a71f2b11690f4b24d099d6b16690a90ae14fc6f3", - "reference": "a71f2b11690f4b24d099d6b16690a90ae14fc6f3", - "shasum": "" - }, - "require": { - "php": ">=7.2", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.1 || ^2.0" - }, - "provide": { - "php-http/message-factory-implementation": "1.0", - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "http-interop/http-factory-tests": "^0.9", - "php-http/message-factory": "^1.0", - "php-http/psr7-integration-tests": "^1.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.4", - "symfony/error-handler": "^4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8-dev" - } - }, - "autoload": { - "psr-4": { - "Nyholm\\Psr7\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com" - }, - { - "name": "Martijn van der Ven", - "email": "martijn@vanderven.se" - } - ], - "description": "A fast PHP7 implementation of PSR-7", - "homepage": "https://tnyholm.se", - "keywords": [ - "psr-17", - "psr-7" - ], - "support": { - "issues": "https://github.com/Nyholm/psr7/issues", - "source": "https://github.com/Nyholm/psr7/tree/1.8.2" - }, - "funding": [ - { - "url": "https://github.com/Zegnat", - "type": "github" - }, - { - "url": "https://github.com/nyholm", - "type": "github" - } - ], - "time": "2024-09-09T07:06:30+00:00" - }, { "name": "phar-io/manifest", "version": "2.0.4", @@ -5320,20 +5902,68 @@ "phpspec/phpspec": "^5.1 || ^6.3 || ^7.1", "slim/slim": "^3.0" }, - "suggest": { - "ext-zlib": "Used with compressor/decompressor streams", - "guzzlehttp/psr7": "Used with Guzzle PSR-7 Factories", - "laminas/laminas-diactoros": "Used with Diactoros Factories", - "slim/slim": "Used with Slim Framework PSR-7 implementation" + "suggest": { + "ext-zlib": "Used with compressor/decompressor streams", + "guzzlehttp/psr7": "Used with Guzzle PSR-7 Factories", + "laminas/laminas-diactoros": "Used with Diactoros Factories", + "slim/slim": "Used with Slim Framework PSR-7 implementation" + }, + "type": "library", + "autoload": { + "files": [ + "src/filters.php" + ], + "psr-4": { + "Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "HTTP Message related tools", + "homepage": "http://php-http.org", + "keywords": [ + "http", + "message", + "psr-7" + ], + "support": { + "issues": "https://github.com/php-http/message/issues", + "source": "https://github.com/php-http/message/tree/1.16.2" + }, + "time": "2024-10-02T11:34:13+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "2.2.8", + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e285254e60f33c21902efef4a926ca0987c06804", + "reference": "e285254e60f33c21902efef4a926ca0987c06804", + "shasum": "" + }, + "require": { + "php": "^7.4|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" }, + "bin": [ + "phpstan", + "phpstan.phar" + ], "type": "library", "autoload": { "files": [ - "src/filters.php" - ], - "psr-4": { - "Http\\Message\\": "src/" - } + "bootstrap.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -5341,22 +5971,38 @@ ], "authors": [ { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" + "name": "Ondřej Mirtes" + }, + { + "name": "Markus Staab" + }, + { + "name": "Vincent Langlet" } ], - "description": "HTTP Message related tools", - "homepage": "http://php-http.org", + "description": "PHPStan - PHP Static Analysis Tool", "keywords": [ - "http", - "message", - "psr-7" + "dev", + "static analysis" ], "support": { - "issues": "https://github.com/php-http/message/issues", - "source": "https://github.com/php-http/message/tree/1.16.2" + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", + "issues": "https://github.com/phpstan/phpstan/issues", + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" }, - "time": "2024-10-02T11:34:13+00:00" + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + } + ], + "time": "2026-08-04T22:21:45+00:00" }, { "name": "phpunit/php-code-coverage", @@ -5788,153 +6434,6 @@ ], "time": "2025-12-06T07:50:42+00:00" }, - { - "name": "react/async", - "version": "v4.3.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/async.git", - "reference": "635d50e30844a484495713e8cb8d9e079c0008a5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/async/zipball/635d50e30844a484495713e8cb8d9e079c0008a5", - "reference": "635d50e30844a484495713e8cb8d9e079c0008a5", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "react/event-loop": "^1.2", - "react/promise": "^3.2 || ^2.8 || ^1.2.1" - }, - "require-dev": { - "phpstan/phpstan": "1.10.39", - "phpunit/phpunit": "^9.6" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "React\\Async\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "Async utilities and fibers for ReactPHP", - "keywords": [ - "async", - "reactphp" - ], - "support": { - "issues": "https://github.com/reactphp/async/issues", - "source": "https://github.com/reactphp/async/tree/v4.3.0" - }, - "funding": [ - { - "url": "https://opencollective.com/reactphp", - "type": "open_collective" - } - ], - "time": "2024-06-04T14:40:02+00:00" - }, - { - "name": "react/event-loop", - "version": "v1.6.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/event-loop.git", - "reference": "ba276bda6083df7e0050fd9b33f66ad7a4ac747a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/event-loop/zipball/ba276bda6083df7e0050fd9b33f66ad7a4ac747a", - "reference": "ba276bda6083df7e0050fd9b33f66ad7a4ac747a", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" - }, - "suggest": { - "ext-pcntl": "For signal handling support when using the StreamSelectLoop" - }, - "type": "library", - "autoload": { - "psr-4": { - "React\\EventLoop\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "ReactPHP's core reactor event loop that libraries can use for evented I/O.", - "keywords": [ - "asynchronous", - "event-loop" - ], - "support": { - "issues": "https://github.com/reactphp/event-loop/issues", - "source": "https://github.com/reactphp/event-loop/tree/v1.6.0" - }, - "funding": [ - { - "url": "https://opencollective.com/reactphp", - "type": "open_collective" - } - ], - "time": "2025-11-17T20:46:25+00:00" - }, { "name": "sebastian/cli-parser", "version": "2.0.1", @@ -7024,87 +7523,20 @@ } ], "time": "2025-11-17T20:03:58+00:00" - }, + } + ], + "aliases": [ { - "name": "yiisoft/injector", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/yiisoft/injector.git", - "reference": "d3f718256b734933670ad11143cca724d340fc90" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/yiisoft/injector/zipball/d3f718256b734933670ad11143cca724d340fc90", - "reference": "d3f718256b734933670ad11143cca724d340fc90", - "shasum": "" - }, - "require": { - "php": "7.4 - 8.5" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.3", - "maglnet/composer-require-checker": "^3.8 || ^4.2", - "phpbench/phpbench": "^1.1", - "phpunit/phpunit": "^9.5", - "psr/container": "^1.0 || ^2.0", - "rector/rector": "^2.0.10", - "spatie/phpunit-watcher": "^1.23", - "yiisoft/test-support": "^1.4 || ^3.1" - }, - "suggest": { - "psr/container": "For automatic resolving of dependencies" - }, - "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": true, - "target-directory": "tools" - } - }, - "autoload": { - "psr-4": { - "Yiisoft\\Injector\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "PSR-11 compatible injector. Executes a callable and makes an instances by injecting dependencies from a given DI container.", - "homepage": "https://www.yiiframework.com/", - "keywords": [ - "PSR-11", - "dependency injection", - "di", - "injector", - "reflection" - ], - "support": { - "chat": "https://t.me/yii3en", - "forum": "https://www.yiiframework.com/forum/", - "irc": "ircs://irc.libera.chat:6697/yii", - "issues": "https://github.com/yiisoft/injector/issues?state=open", - "source": "https://github.com/yiisoft/injector", - "wiki": "https://www.yiiframework.com/wiki/" - }, - "funding": [ - { - "url": "https://github.com/sponsors/yiisoft", - "type": "github" - }, - { - "url": "https://opencollective.com/yiisoft", - "type": "opencollective" - } - ], - "time": "2025-12-01T11:14:17+00:00" + "package": "temporal/sdk", + "version": "dev-nexus-new", + "alias": "2.20.0", + "alias_normalized": "2.20.0.0" } ], - "aliases": [], "minimum-stability": "dev", - "stability-flags": {}, + "stability-flags": { + "temporal/sdk": 20 + }, "prefer-stable": true, "prefer-lowest": false, "platform": {}, diff --git a/app/phpstan.neon.dist b/app/phpstan.neon.dist new file mode 100644 index 0000000..ca8aa31 --- /dev/null +++ b/app/phpstan.neon.dist @@ -0,0 +1,10 @@ +parameters: + level: 6 + paths: + - src/Nexus + - src/NexusCancellation + - src/NexusContextPropagation + - src/NexusMultipleArguments + - tests/Feature + excludePaths: + - tests/Feature/worker.log diff --git a/app/phpunit.xml.dist b/app/phpunit.xml.dist index 0f5e939..84b37f3 100644 --- a/app/phpunit.xml.dist +++ b/app/phpunit.xml.dist @@ -18,7 +18,8 @@ - + + diff --git a/app/src/Interceptors/Interceptor/ExceptionLoggerInterceptor.php b/app/src/Interceptors/Interceptor/ExceptionLoggerInterceptor.php new file mode 100644 index 0000000..32c94d5 --- /dev/null +++ b/app/src/Interceptors/Interceptor/ExceptionLoggerInterceptor.php @@ -0,0 +1,34 @@ +logger->error($e->getMessage(), ['exception' => $e]); + throw $e; + } + } +} diff --git a/app/src/Nexus/.rr.caller.yaml b/app/src/Nexus/.rr.caller.yaml new file mode 100644 index 0000000..3d46805 --- /dev/null +++ b/app/src/Nexus/.rr.caller.yaml @@ -0,0 +1,16 @@ +version: "3" + +rpc: + listen: tcp://127.0.0.1:6102 + +server: + command: "php caller-worker.php" + +temporal: + address: ${TEMPORAL_HOST:-localhost}:${TEMPORAL_PORT:-7233} + namespace: ${TEMPORAL_NAMESPACE:-my-caller-namespace} + activities: + num_workers: 2 + +logs: + level: info diff --git a/app/src/Nexus/.rr.handler.yaml b/app/src/Nexus/.rr.handler.yaml new file mode 100644 index 0000000..36ff019 --- /dev/null +++ b/app/src/Nexus/.rr.handler.yaml @@ -0,0 +1,16 @@ +version: "3" + +rpc: + listen: tcp://127.0.0.1:6101 + +server: + command: "php handler-worker.php" + +temporal: + address: ${TEMPORAL_HOST:-localhost}:${TEMPORAL_PORT:-7233} + namespace: ${TEMPORAL_NAMESPACE:-my-target-namespace} + activities: + num_workers: 2 + +logs: + level: info diff --git a/app/src/Nexus/Caller/CallerWorker.php b/app/src/Nexus/Caller/CallerWorker.php new file mode 100644 index 0000000..7b3076b --- /dev/null +++ b/app/src/Nexus/Caller/CallerWorker.php @@ -0,0 +1,11 @@ + */ + private object $sampleNexusService; + + public function __construct() + { + $this->sampleNexusService = Workflow::newNexusServiceStub( + SampleNexusService::class, + NexusOperationOptions::new() + ->withEndpoint(CallerWorker::ENDPOINT_NAME) + ->withScheduleToCloseTimeout(CarbonInterval::seconds(10)), + ); + } + + public function echo(string $message): \Generator + { + /** @var EchoOutput $output */ + $output = yield $this->sampleNexusService->echo(new EchoInput($message)); + return $output->message; + } +} diff --git a/app/src/Nexus/Caller/HelloCallerWorkflow.php b/app/src/Nexus/Caller/HelloCallerWorkflow.php new file mode 100644 index 0000000..da06a6d --- /dev/null +++ b/app/src/Nexus/Caller/HelloCallerWorkflow.php @@ -0,0 +1,16 @@ +sampleNexusService = Workflow::newUntypedNexusOperationStub( + NexusOperationOptions::new() + ->withEndpoint(CallerWorker::ENDPOINT_NAME) + ->withService('SampleNexusService') + ->withScheduleToCloseTimeout(CarbonInterval::seconds(10)), + ); + } + + public function hello(string $message, Language $language): \Generator + { + /** @var NexusOperationHandle $handle */ + $handle = yield $this->sampleNexusService->start( + 'hello', + [new HelloInput($message, $language)], + HelloOutput::class, + ); + + Workflow::getLogger()->info( + 'Nexus operation started, token: ' . ($handle->getOperationToken() ?? ''), + ); + + /** @var HelloOutput $output */ + $output = yield $handle->getResult(); + + return $output->message; + } +} diff --git a/app/src/Nexus/ExecuteCommand.php b/app/src/Nexus/ExecuteCommand.php new file mode 100644 index 0000000..e8c9b3b --- /dev/null +++ b/app/src/Nexus/ExecuteCommand.php @@ -0,0 +1,69 @@ +withNamespace('my-caller-namespace'), + ); + + $output->writeln("Starting EchoCallerWorkflow..."); + $echoWorkflow = $client->newWorkflowStub( + EchoCallerWorkflow::class, + WorkflowOptions::new()->withTaskQueue(CallerWorker::TASK_QUEUE), + ); + $run = $client->start($echoWorkflow, 'Nexus Echo 👋'); + $execution = $run->getExecution(); + $output->writeln(\sprintf( + 'Started: WorkflowID=%s RunID=%s', + $execution->getID(), + $execution->getRunID(), + )); + $output->writeln(\sprintf("Result: %s", $run->getResult('string'))); + + $output->writeln("\nStarting HelloCallerWorkflow..."); + $helloWorkflow = $client->newWorkflowStub( + HelloCallerWorkflow::class, + WorkflowOptions::new()->withTaskQueue(CallerWorker::TASK_QUEUE), + ); + $run = $client->start($helloWorkflow, 'Nexus', Language::ES); + $execution = $run->getExecution(); + $output->writeln(\sprintf( + 'Started: WorkflowID=%s RunID=%s', + $execution->getID(), + $execution->getRunID(), + )); + $output->writeln(\sprintf("Result: %s", $run->getResult('string'))); + + return self::SUCCESS; + } +} diff --git a/app/src/Nexus/Handler/EchoClient.php b/app/src/Nexus/Handler/EchoClient.php new file mode 100644 index 0000000..a40f63b --- /dev/null +++ b/app/src/Nexus/Handler/EchoClient.php @@ -0,0 +1,13 @@ +message); + } +} diff --git a/app/src/Nexus/Handler/HandlerWorker.php b/app/src/Nexus/Handler/HandlerWorker.php new file mode 100644 index 0000000..a76182c --- /dev/null +++ b/app/src/Nexus/Handler/HandlerWorker.php @@ -0,0 +1,10 @@ +language) { + Language::EN => new HelloOutput("Hello {$input->name} 👋"), + Language::FR => new HelloOutput("Bonjour {$input->name} 👋"), + Language::DE => new HelloOutput("Hallo {$input->name} 👋"), + Language::ES => new HelloOutput("¡Hola! {$input->name} 👋"), + Language::TR => new HelloOutput("Merhaba {$input->name} 👋"), + }; + } +} diff --git a/app/src/Nexus/Handler/SampleNexusServiceImpl.php b/app/src/Nexus/Handler/SampleNexusServiceImpl.php new file mode 100644 index 0000000..07e839c --- /dev/null +++ b/app/src/Nexus/Handler/SampleNexusServiceImpl.php @@ -0,0 +1,37 @@ +echoClient = $echoClient ?? new EchoClientImpl(); + } + + public function echo(EchoInput $input): EchoOutput + { + return $this->echoClient->echo($input); + } + + public function hello(HelloInput $input): WorkflowHandle + { + return WorkflowHandle::fromWorkflowMethod( + HelloHandlerWorkflow::class, + WorkflowOptions::new()->withWorkflowId(Nexus::getStartDetails()->requestId), + $input, + ); + } +} diff --git a/app/src/Nexus/README.md b/app/src/Nexus/README.md new file mode 100644 index 0000000..7403634 --- /dev/null +++ b/app/src/Nexus/README.md @@ -0,0 +1,80 @@ +# Nexus sample + +A caller workflow in `my-caller-namespace` invokes operations on a Nexus +service hosted by a handler worker in `my-target-namespace`. Two operations: + +- `echo` — synchronous (`#[Operation]`) +- `hello` — async, `WorkflowRunOperation`, starts `HelloHandlerWorkflow` + server-side (`#[AsyncOperation(output: HelloOutput::class)]`) + +Two caller workflows: + +- `EchoCallerWorkflow` — typed stub, sync op. +- `HelloCallerWorkflow` — untyped stub via + `Workflow::newUntypedNexusOperationStub()`. `start()` resolves with a + `NexusOperationHandle` that exposes `operationToken` (string for async, + null for sync) before `getResult()` resolves with the typed result. + +## Prerequisites + +Beyond the usual (`./temporal`, `./rr`): + +```bash +./temporal operator namespace create --namespace my-target-namespace +./temporal operator namespace create --namespace my-caller-namespace + +./temporal operator nexus endpoint create \ + --name my-nexus-endpoint-name \ + --target-namespace my-target-namespace \ + --target-task-queue my-handler-task-queue \ + --description-file ./app/src/Nexus/Service/description.md +``` + +## Run + +Three terminals. + +**Handler worker** (`my-target-namespace`): + +```bash +cd app/src/Nexus +TEMPORAL_NAMESPACE=my-target-namespace ../../rr serve -c .rr.handler.yaml +``` + +**Caller worker** (`my-caller-namespace`): + +```bash +cd app/src/Nexus +TEMPORAL_NAMESPACE=my-caller-namespace ../../rr serve -c .rr.caller.yaml +``` + +**Starter**: + +```bash +php app/app.php nexus +``` + +Expected output: + +``` +Starting EchoCallerWorkflow... +Started: WorkflowID=... RunID=... +Result: Nexus Echo 👋 + +Starting HelloCallerWorkflow... +Started: WorkflowID=... RunID=... +Result: ¡Hola! Nexus 👋 +``` + +## Constants + +| Name | Value | +|---|---| +| service | `SampleNexusService` | +| operations | `echo`, `hello` | +| endpoint | `my-nexus-endpoint-name` | +| handler task queue | `my-handler-task-queue` | +| caller task queue | `my-caller-workflow-task-queue` | +| target namespace | `my-target-namespace` | +| caller namespace | `my-caller-namespace` | +| `scheduleToCloseTimeout` | `10s` | diff --git a/app/src/Nexus/Service/EchoInput.php b/app/src/Nexus/Service/EchoInput.php new file mode 100644 index 0000000..eacb207 --- /dev/null +++ b/app/src/Nexus/Service/EchoInput.php @@ -0,0 +1,12 @@ +newWorker(CallerWorker::TASK_QUEUE) + ->registerWorkflowTypes( + EchoCallerWorkflowImpl::class, + HelloCallerWorkflowImpl::class, + ); + +$factory->run(); diff --git a/app/src/Nexus/handler-worker.php b/app/src/Nexus/handler-worker.php new file mode 100644 index 0000000..ed1c30b --- /dev/null +++ b/app/src/Nexus/handler-worker.php @@ -0,0 +1,39 @@ +withNamespace($namespace), +); + +$factory = WorkerFactory::create(client: $workflowClient); + +$worker = $factory->newWorker(HandlerWorker::TASK_QUEUE); +$worker->registerWorkflowTypes(HelloHandlerWorkflowImpl::class); +$worker->registerNexusServiceImplementation(new SampleNexusServiceImpl()); + +$factory->run(); diff --git a/app/src/NexusCancellation/.rr.caller.yaml b/app/src/NexusCancellation/.rr.caller.yaml new file mode 100644 index 0000000..ddbec40 --- /dev/null +++ b/app/src/NexusCancellation/.rr.caller.yaml @@ -0,0 +1,16 @@ +version: "3" + +rpc: + listen: tcp://127.0.0.1:6112 + +server: + command: "php caller-worker.php" + +temporal: + address: ${TEMPORAL_HOST:-localhost}:${TEMPORAL_PORT:-7233} + namespace: ${TEMPORAL_NAMESPACE:-my-caller-namespace} + activities: + num_workers: 2 + +logs: + level: info diff --git a/app/src/NexusCancellation/.rr.handler.yaml b/app/src/NexusCancellation/.rr.handler.yaml new file mode 100644 index 0000000..60d43d8 --- /dev/null +++ b/app/src/NexusCancellation/.rr.handler.yaml @@ -0,0 +1,16 @@ +version: "3" + +rpc: + listen: tcp://127.0.0.1:6111 + +server: + command: "php handler-worker.php" + +temporal: + address: ${TEMPORAL_HOST:-localhost}:${TEMPORAL_PORT:-7233} + namespace: ${TEMPORAL_NAMESPACE:-my-target-namespace} + activities: + num_workers: 2 + +logs: + level: info diff --git a/app/src/NexusCancellation/Caller/CallerWorker.php b/app/src/NexusCancellation/Caller/CallerWorker.php new file mode 100644 index 0000000..b2236cb --- /dev/null +++ b/app/src/NexusCancellation/Caller/CallerWorker.php @@ -0,0 +1,11 @@ + */ + private object $sampleNexusService; + + public function __construct() + { + $this->sampleNexusService = Workflow::newNexusServiceStub( + SampleNexusService::class, + NexusOperationOptions::new() + ->withEndpoint(CallerWorker::ENDPOINT_NAME) + ->withScheduleToCloseTimeout(CarbonInterval::seconds(10)) + ->withCancellationType(NexusOperationCancellationType::WaitRequested), + ); + } + + public function hello(string $message): \Generator + { + $promises = []; + + $scope = Workflow::async(function () use ($message, &$promises): void { + foreach (Language::cases() as $language) { + $promises[] = $this->sampleNexusService->hello(new HelloInput($message, $language)); + } + }); + + /** @var HelloOutput $first */ + $first = yield Promise::any($promises); + + $scope->cancel(); + + foreach ($promises as $promise) { + try { + yield $promise; + } catch (CanceledFailure) { + } catch (NexusOperationFailure $e) { + if (!$e->getPrevious() instanceof CanceledFailure) { + throw $e; + } + } + } + + return $first->message; + } +} diff --git a/app/src/NexusCancellation/ExecuteCommand.php b/app/src/NexusCancellation/ExecuteCommand.php new file mode 100644 index 0000000..67fc57c --- /dev/null +++ b/app/src/NexusCancellation/ExecuteCommand.php @@ -0,0 +1,53 @@ +withNamespace('my-caller-namespace'), + ); + + $output->writeln("Starting HelloCallerWorkflow..."); + $workflow = $client->newWorkflowStub( + HelloCallerWorkflow::class, + WorkflowOptions::new()->withTaskQueue(CallerWorker::TASK_QUEUE), + ); + $run = $client->start($workflow, 'Nexus'); + $execution = $run->getExecution(); + $output->writeln(\sprintf( + 'Started: WorkflowID=%s RunID=%s', + $execution->getID(), + $execution->getRunID(), + )); + $output->writeln(\sprintf("Result: %s", $run->getResult('string'))); + + return self::SUCCESS; + } +} diff --git a/app/src/NexusCancellation/Handler/HandlerWorker.php b/app/src/NexusCancellation/Handler/HandlerWorker.php new file mode 100644 index 0000000..a1fce96 --- /dev/null +++ b/app/src/NexusCancellation/Handler/HandlerWorker.php @@ -0,0 +1,10 @@ + \random_int(0, 4)))); + + return match ($input->language) { + Language::EN => new HelloOutput("Hello {$input->name} 👋"), + Language::FR => new HelloOutput("Bonjour {$input->name} 👋"), + Language::DE => new HelloOutput("Hallo {$input->name} 👋"), + Language::ES => new HelloOutput("¡Hola! {$input->name} 👋"), + Language::TR => new HelloOutput("Merhaba {$input->name} 👋"), + }; + } catch (CanceledFailure $e) { + yield Workflow::asyncDetached(function () { + yield Workflow::timer(CarbonInterval::seconds(yield Workflow::sideEffect(fn() => \random_int(0, 4)))); + }); + + Workflow::getLogger()->info('HelloHandlerWorkflow was cancelled successfully.'); + + throw $e; + } + } +} diff --git a/app/src/NexusCancellation/README.md b/app/src/NexusCancellation/README.md new file mode 100644 index 0000000..2fa27bf --- /dev/null +++ b/app/src/NexusCancellation/README.md @@ -0,0 +1,72 @@ +# Nexus Cancellation sample + +A caller workflow fans out the `hello` Nexus operation in 5 languages in +parallel. After the first reply arrives it cancels the cancellation scope — +the other 4 in-flight operations get cancellation requests, the handler +workflows clean up and rethrow `CanceledFailure`, and the caller drains the +promises (ignoring `CanceledFailure`) before returning the first result. + +Reuses the service contract and `SampleNexusServiceImpl` of the +[Nexus sample](../Nexus/README.md); the only sample-specific handler code is +`HelloHandlerWorkflowImpl`, which adds a random delay and a detached cleanup +scope. + +Caller passes `NexusOperationCancellationType::WaitRequested` so it returns +as soon as the handler acknowledges the cancellation request — it doesn't +wait for the detached cleanup scope to finish on the handler side. + +## Prerequisites + +Beyond the usual (`./temporal`, `./rr`), and the two namespaces the +[Nexus sample](../Nexus/README.md) creates: + +```bash +./temporal operator nexus endpoint create \ + --name my-cancellation-nexus-endpoint \ + --target-namespace my-target-namespace \ + --target-task-queue my-cancellation-handler-task-queue +``` + +This sample owns its endpoint, task queues and RoadRunner RPC ports, so it +can run alongside the other Nexus samples. + +## Run + +Three terminals. + +**Handler worker** (`my-target-namespace`): + +```bash +cd app/src/NexusCancellation +TEMPORAL_NAMESPACE=my-target-namespace ../../rr serve -c .rr.handler.yaml +``` + +**Caller worker** (`my-caller-namespace`): + +```bash +cd app/src/NexusCancellation +TEMPORAL_NAMESPACE=my-caller-namespace ../../rr serve -c .rr.caller.yaml +``` + +**Starter**: + +```bash +php app/app.php nexus-cancellation +``` + +Caller side prints the first reply (whichever language won the race): + +``` +Starting HelloCallerWorkflow... +Started: WorkflowID=... RunID=... +Result: ¡Hola! Nexus 👋 +``` + +Handler side logs each cancelled run: + +``` +HelloHandlerWorkflow was cancelled successfully. +HelloHandlerWorkflow was cancelled successfully. +HelloHandlerWorkflow was cancelled successfully. +HelloHandlerWorkflow was cancelled successfully. +``` diff --git a/app/src/NexusCancellation/caller-worker.php b/app/src/NexusCancellation/caller-worker.php new file mode 100644 index 0000000..997dbc9 --- /dev/null +++ b/app/src/NexusCancellation/caller-worker.php @@ -0,0 +1,24 @@ +newWorker(CallerWorker::TASK_QUEUE) + ->registerWorkflowTypes(HelloCallerWorkflowImpl::class); + +$factory->run(); diff --git a/app/src/NexusCancellation/handler-worker.php b/app/src/NexusCancellation/handler-worker.php new file mode 100644 index 0000000..ce400c4 --- /dev/null +++ b/app/src/NexusCancellation/handler-worker.php @@ -0,0 +1,39 @@ +withNamespace($namespace), +); + +$factory = WorkerFactory::create(client: $workflowClient); + +$worker = $factory->newWorker(HandlerWorker::TASK_QUEUE); +$worker->registerWorkflowTypes(HelloHandlerWorkflowImpl::class); +$worker->registerNexusServiceImplementation(new SampleNexusServiceImpl()); + +$factory->run(); diff --git a/app/src/NexusContextPropagation/.rr.caller.yaml b/app/src/NexusContextPropagation/.rr.caller.yaml new file mode 100644 index 0000000..148da33 --- /dev/null +++ b/app/src/NexusContextPropagation/.rr.caller.yaml @@ -0,0 +1,16 @@ +version: "3" + +rpc: + listen: tcp://127.0.0.1:6122 + +server: + command: "php caller-worker.php" + +temporal: + address: ${TEMPORAL_HOST:-localhost}:${TEMPORAL_PORT:-7233} + namespace: ${TEMPORAL_NAMESPACE:-my-caller-namespace} + activities: + num_workers: 2 + +logs: + level: info diff --git a/app/src/NexusContextPropagation/.rr.handler.yaml b/app/src/NexusContextPropagation/.rr.handler.yaml new file mode 100644 index 0000000..2b08d5e --- /dev/null +++ b/app/src/NexusContextPropagation/.rr.handler.yaml @@ -0,0 +1,16 @@ +version: "3" + +rpc: + listen: tcp://127.0.0.1:6121 + +server: + command: "php handler-worker.php" + +temporal: + address: ${TEMPORAL_HOST:-localhost}:${TEMPORAL_PORT:-7233} + namespace: ${TEMPORAL_NAMESPACE:-my-target-namespace} + activities: + num_workers: 2 + +logs: + level: info diff --git a/app/src/NexusContextPropagation/Caller/CallerWorker.php b/app/src/NexusContextPropagation/Caller/CallerWorker.php new file mode 100644 index 0000000..b7c9471 --- /dev/null +++ b/app/src/NexusContextPropagation/Caller/CallerWorker.php @@ -0,0 +1,11 @@ + */ + private object $sampleNexusService; + + public function __construct() + { + $this->sampleNexusService = Workflow::newNexusServiceStub( + SampleNexusService::class, + NexusOperationOptions::new() + ->withEndpoint(CallerWorker::ENDPOINT_NAME) + ->withScheduleToCloseTimeout(CarbonInterval::seconds(10)), + ); + } + + public function echo(string $message): \Generator + { + MDC::put('x-nexus-caller-workflow-id', Workflow::getInfo()->execution->getID()); + + /** @var EchoOutput $output */ + $output = yield $this->sampleNexusService->echo(new EchoInput($message)); + return $output->message; + } +} diff --git a/app/src/NexusContextPropagation/Caller/HelloCallerWorkflowImpl.php b/app/src/NexusContextPropagation/Caller/HelloCallerWorkflowImpl.php new file mode 100644 index 0000000..5f0be9e --- /dev/null +++ b/app/src/NexusContextPropagation/Caller/HelloCallerWorkflowImpl.php @@ -0,0 +1,41 @@ + */ + private object $sampleNexusService; + + public function __construct() + { + $this->sampleNexusService = Workflow::newNexusServiceStub( + SampleNexusService::class, + NexusOperationOptions::new() + ->withEndpoint(CallerWorker::ENDPOINT_NAME) + ->withScheduleToCloseTimeout(CarbonInterval::seconds(10)), + ); + } + + public function hello(string $message, Language $language): \Generator + { + MDC::put('x-nexus-caller-workflow-id', Workflow::getInfo()->execution->getID()); + + /** @var HelloOutput $output */ + $output = yield $this->sampleNexusService->hello(new HelloInput($message, $language)); + return $output->message; + } +} diff --git a/app/src/NexusContextPropagation/ExecuteCommand.php b/app/src/NexusContextPropagation/ExecuteCommand.php new file mode 100644 index 0000000..b3cf669 --- /dev/null +++ b/app/src/NexusContextPropagation/ExecuteCommand.php @@ -0,0 +1,69 @@ +withNamespace('my-caller-namespace'), + ); + + $output->writeln("Starting EchoCallerWorkflow..."); + $echoWorkflow = $client->newWorkflowStub( + EchoCallerWorkflow::class, + WorkflowOptions::new()->withTaskQueue(CallerWorker::TASK_QUEUE), + ); + $run = $client->start($echoWorkflow, 'Nexus Echo 👋'); + $execution = $run->getExecution(); + $output->writeln(\sprintf( + 'Started: WorkflowID=%s RunID=%s', + $execution->getID(), + $execution->getRunID(), + )); + $output->writeln(\sprintf("Result: %s", $run->getResult('string'))); + + $output->writeln("\nStarting HelloCallerWorkflow..."); + $helloWorkflow = $client->newWorkflowStub( + HelloCallerWorkflow::class, + WorkflowOptions::new()->withTaskQueue(CallerWorker::TASK_QUEUE), + ); + $run = $client->start($helloWorkflow, 'Nexus', Language::EN); + $execution = $run->getExecution(); + $output->writeln(\sprintf( + 'Started: WorkflowID=%s RunID=%s', + $execution->getID(), + $execution->getRunID(), + )); + $output->writeln(\sprintf("Result: %s", $run->getResult('string'))); + + return self::SUCCESS; + } +} diff --git a/app/src/NexusContextPropagation/Handler/HandlerWorker.php b/app/src/NexusContextPropagation/Handler/HandlerWorker.php new file mode 100644 index 0000000..226ef22 --- /dev/null +++ b/app/src/NexusContextPropagation/Handler/HandlerWorker.php @@ -0,0 +1,10 @@ +name + : $input->name . ', x-nexus-caller-workflow-id: ' . $callerWorkflowId; + + return match ($input->language) { + Language::EN => new HelloOutput("Hello {$name} 👋"), + Language::FR => new HelloOutput("Bonjour {$name} 👋"), + Language::DE => new HelloOutput("Hallo {$name} 👋"), + Language::ES => new HelloOutput("¡Hola! {$name} 👋"), + Language::TR => new HelloOutput("Merhaba {$name} 👋"), + }; + } +} diff --git a/app/src/NexusContextPropagation/Handler/SampleNexusServiceImpl.php b/app/src/NexusContextPropagation/Handler/SampleNexusServiceImpl.php new file mode 100644 index 0000000..ec22e62 --- /dev/null +++ b/app/src/NexusContextPropagation/Handler/SampleNexusServiceImpl.php @@ -0,0 +1,49 @@ +echoClient = $echoClient ?? new EchoClientImpl(); + } + + public function echo(EchoInput $input): EchoOutput + { + $headers = Nexus::getCurrentOperationContext()->headers; + if (($id = $headers->get('x-nexus-caller-workflow-id')) !== null) { + \error_log("Echo called from a workflow with ID : {$id}"); + } + + return $this->echoClient->echo($input); + } + + public function hello(HelloInput $input): WorkflowHandle + { + $headers = Nexus::getCurrentOperationContext()->headers; + if (($id = $headers->get('x-nexus-caller-workflow-id')) !== null) { + \error_log("HelloHandlerWorkflow called from a workflow with ID : {$id}"); + } + + return WorkflowHandle::fromWorkflowMethod( + HelloHandlerWorkflow::class, + WorkflowOptions::new()->withWorkflowId(Nexus::getStartDetails()->requestId), + $input, + ); + } +} diff --git a/app/src/NexusContextPropagation/Propagation/MDC.php b/app/src/NexusContextPropagation/Propagation/MDC.php new file mode 100644 index 0000000..e8cc3c2 --- /dev/null +++ b/app/src/NexusContextPropagation/Propagation/MDC.php @@ -0,0 +1,39 @@ +> */ + private static array $contexts = []; + + public static function put(string $key, string $value): void + { + self::$contexts[self::scope()][$key] = $value; + } + + public static function get(string $key): ?string + { + return self::$contexts[self::scope()][$key] ?? null; + } + + /** @return array */ + public static function getAll(): array + { + return self::$contexts[self::scope()] ?? []; + } + + public static function clear(): void + { + unset(self::$contexts[self::scope()]); + } + + private static function scope(): string + { + return Workflow::getInfo()->execution->getID(); + } +} diff --git a/app/src/NexusContextPropagation/Propagation/NexusOutboundContextInterceptor.php b/app/src/NexusContextPropagation/Propagation/NexusOutboundContextInterceptor.php new file mode 100644 index 0000000..43cf2a6 --- /dev/null +++ b/app/src/NexusContextPropagation/Propagation/NexusOutboundContextInterceptor.php @@ -0,0 +1,33 @@ + $next + * @return PromiseInterface + */ + public function executeNexusOperation(ExecuteNexusOperationInput $input, callable $next): PromiseInterface + { + $headers = $input->nexusHeaders; + foreach (MDC::getAll() as $key => $value) { + if (\str_starts_with($key, self::NEXUS_HEADER_PREFIX)) { + $headers[$key] = $value; + } + } + + return $next($input->with(nexusHeaders: $headers)); + } +} diff --git a/app/src/NexusContextPropagation/Propagation/NexusStartContextInterceptor.php b/app/src/NexusContextPropagation/Propagation/NexusStartContextInterceptor.php new file mode 100644 index 0000000..d958268 --- /dev/null +++ b/app/src/NexusContextPropagation/Propagation/NexusStartContextInterceptor.php @@ -0,0 +1,50 @@ +with(header: Header::fromValues($propagated))); + } + + /** + * @return array + */ + private static function propagatedHeaders(): array + { + try { + $headers = Nexus::getCurrentOperationContext()->headers->all(); + } catch (\LogicException) { + return []; + } + + $propagated = []; + foreach ($headers as $name => $value) { + if (\str_starts_with($name, self::NEXUS_HEADER_PREFIX)) { + $propagated[$name] = $value; + } + } + + return $propagated; + } +} diff --git a/app/src/NexusContextPropagation/Propagation/WorkflowInboundContextInterceptor.php b/app/src/NexusContextPropagation/Propagation/WorkflowInboundContextInterceptor.php new file mode 100644 index 0000000..a3dc6d3 --- /dev/null +++ b/app/src/NexusContextPropagation/Propagation/WorkflowInboundContextInterceptor.php @@ -0,0 +1,30 @@ +header as $name => $_) { + $name = (string) $name; + if (\str_starts_with($name, self::NEXUS_HEADER_PREFIX)) { + MDC::put($name, (string) $input->header->getValue($name, 'string')); + } + } + + $next($input); + } +} diff --git a/app/src/NexusContextPropagation/README.md b/app/src/NexusContextPropagation/README.md new file mode 100644 index 0000000..609119d --- /dev/null +++ b/app/src/NexusContextPropagation/README.md @@ -0,0 +1,94 @@ +# Nexus Context Propagation sample + +Demonstrates carrying a value from a caller workflow all the way into the +workflow that backs an async Nexus operation. Four pieces, all in +`Propagation/`: + +| Piece | Role | +|---|---| +| `MDC` | per-workflow bag of `x-nexus-*` values | +| `NexusOutboundContextInterceptor` | caller side: MDC → operation headers | +| `NexusStartContextInterceptor` | handler side: operation headers → start header of the backing workflow | +| `WorkflowInboundContextInterceptor` | backing workflow: start header → MDC | + +`NexusStartContextInterceptor` is a `WorkflowClientCallsInterceptor` registered +on the handler worker's `WorkflowClient`, which is the client the SDK uses to +start the backing workflow — the same shape as `ContextPropagator` in the Java +and Go samples. Nothing is propagated unless you register it: the SDK never +copies Nexus headers into a workflow by itself. + +The service contract, the caller workflow interfaces and the handler +`EchoClient` come from the [Nexus sample](../Nexus/README.md); only +`Handler/HelloHandlerWorkflow` stays local, so this sample's handler workflow +can be registered next to the base one in the shared feature-test worker. The +caller +implementations mirror it with one addition — the `MDC::put(...)` line. +`SampleNexusServiceImpl` logs the +propagated workflow ID, and `HelloHandlerWorkflowImpl` appends it to the +greeting, so the value is observable at both boundaries. + +> **⚠️ Do not put secrets into Nexus headers.** Nexus header values are +> plain strings on the wire. They bypass the workflow data-converter (the +> hook used by the encryption sample to encrypt payloads end-to-end) and +> are not routed through the gRPC proxy / codec server, so anything you +> stash here will land verbatim in handler-side logs and the Temporal Web +> UI. Use them only for trace IDs, tenant IDs, correlation IDs, and other +> non-sensitive metadata. + +## Prerequisites + +Beyond the usual (`./temporal`, `./rr`), and the two namespaces the +[Nexus sample](../Nexus/README.md) creates: + +```bash +./temporal operator nexus endpoint create \ + --name my-context-propagation-nexus-endpoint \ + --target-namespace my-target-namespace \ + --target-task-queue my-context-propagation-handler-task-queue +``` + +This sample owns its endpoint, task queues and RoadRunner RPC ports, so it +can run alongside the other Nexus samples. + +## Run + +Three terminals. + +**Handler worker** (`my-target-namespace`): + +```bash +cd app/src/NexusContextPropagation +TEMPORAL_NAMESPACE=my-target-namespace ../../rr serve -c .rr.handler.yaml +``` + +**Caller worker** (`my-caller-namespace`): + +```bash +cd app/src/NexusContextPropagation +TEMPORAL_NAMESPACE=my-caller-namespace ../../rr serve -c .rr.caller.yaml +``` + +**Starter**: + +```bash +php app/app.php nexus-context-propagation +``` + +Caller side: + +``` +Starting EchoCallerWorkflow... +Started: WorkflowID=... RunID=... +Result: Nexus Echo 👋 + +Starting HelloCallerWorkflow... +Started: WorkflowID=... RunID=... +Result: Hello Nexus 👋 +``` + +Handler side (in the rr stderr stream): + +``` +Echo called from a workflow with ID : +HelloHandlerWorkflow called from a workflow with ID : +``` diff --git a/app/src/NexusContextPropagation/caller-worker.php b/app/src/NexusContextPropagation/caller-worker.php new file mode 100644 index 0000000..2c382a5 --- /dev/null +++ b/app/src/NexusContextPropagation/caller-worker.php @@ -0,0 +1,34 @@ +newWorker( + CallerWorker::TASK_QUEUE, + interceptorProvider: new SimplePipelineProvider([ + new NexusOutboundContextInterceptor(), + ]), +)->registerWorkflowTypes( + EchoCallerWorkflowImpl::class, + HelloCallerWorkflowImpl::class, +); + +$factory->run(); diff --git a/app/src/NexusContextPropagation/handler-worker.php b/app/src/NexusContextPropagation/handler-worker.php new file mode 100644 index 0000000..c66104e --- /dev/null +++ b/app/src/NexusContextPropagation/handler-worker.php @@ -0,0 +1,46 @@ +withNamespace($namespace), + interceptorProvider: new SimplePipelineProvider([new NexusStartContextInterceptor()]), +); + +$factory = WorkerFactory::create(client: $workflowClient); + +$worker = $factory->newWorker( + HandlerWorker::TASK_QUEUE, + interceptorProvider: new SimplePipelineProvider([new WorkflowInboundContextInterceptor()]), +); +$worker->registerWorkflowTypes(HelloHandlerWorkflowImpl::class); +$worker->registerNexusServiceImplementation(new SampleNexusServiceImpl()); + +$factory->run(); diff --git a/app/src/NexusManualOperation/.rr.caller.yaml b/app/src/NexusManualOperation/.rr.caller.yaml new file mode 100644 index 0000000..bd2aa62 --- /dev/null +++ b/app/src/NexusManualOperation/.rr.caller.yaml @@ -0,0 +1,16 @@ +version: "3" + +rpc: + listen: tcp://127.0.0.1:6142 + +server: + command: "php caller-worker.php" + +temporal: + address: ${TEMPORAL_HOST:-localhost}:${TEMPORAL_PORT:-7233} + namespace: ${TEMPORAL_NAMESPACE:-my-caller-namespace} + activities: + num_workers: 2 + +logs: + level: info diff --git a/app/src/NexusManualOperation/.rr.handler.yaml b/app/src/NexusManualOperation/.rr.handler.yaml new file mode 100644 index 0000000..1319e79 --- /dev/null +++ b/app/src/NexusManualOperation/.rr.handler.yaml @@ -0,0 +1,16 @@ +version: "3" + +rpc: + listen: tcp://127.0.0.1:6141 + +server: + command: "php handler-worker.php" + +temporal: + address: ${TEMPORAL_HOST:-localhost}:${TEMPORAL_PORT:-7233} + namespace: ${TEMPORAL_NAMESPACE:-my-target-namespace} + activities: + num_workers: 2 + +logs: + level: info diff --git a/app/src/NexusManualOperation/Caller/CallerWorker.php b/app/src/NexusManualOperation/Caller/CallerWorker.php new file mode 100644 index 0000000..6be1a11 --- /dev/null +++ b/app/src/NexusManualOperation/Caller/CallerWorker.php @@ -0,0 +1,11 @@ +stub = Workflow::newUntypedNexusOperationStub( + NexusOperationOptions::new() + ->withEndpoint(CallerWorker::ENDPOINT_NAME) + ->withService('SampleNexusService') + ->withScheduleToCloseTimeout(CarbonInterval::seconds(20)) + ->withCancellationType(NexusOperationCancellationType::TryCancel), + ); + } + + public function run(string $jobName) + { + /** @var NexusOperationHandle $handle */ + $handle = yield $this->stub->start( + 'startJob', + [new JobInput($jobName, instant: true)], + JobResult::class, + ); + + if ($handle->getOperationToken() !== null) { + throw new \LogicException('Sync result must not carry an operation token.'); + } + + /** @var JobResult $instantResult */ + $instantResult = yield $handle->getResult(); + + $handle2 = null; + $failure = null; + $scope = Workflow::async(function () use ($jobName, &$handle2, &$failure): \Generator { + try { + $handle2 = yield $this->stub->start( + 'startJob', + [new JobInput($jobName)], + JobResult::class, + ); + } catch (\Throwable $e) { + $failure = $e; + throw $e; + } + + yield $handle2->getResult(); + }); + + yield Workflow::await(function () use (&$handle2, &$failure): bool { + return $handle2 !== null || $failure !== null; + }); + + if ($failure !== null) { + throw $failure; + } + + $token2 = $handle2->getOperationToken(); + + yield Workflow::timer(1); + $scope->cancel(); + + $cancelled = false; + + try { + yield $scope; + } catch (CanceledFailure) { + $cancelled = true; + } catch (NexusOperationFailure $e) { + if (!$e->getPrevious() instanceof CanceledFailure) { + throw $e; + } + + $cancelled = true; + } + + if (!$cancelled) { + throw new \LogicException('Async operation did not end cancelled.'); + } + + return "[instant={$instantResult->message}] [token={$token2}] cancelled"; + } +} diff --git a/app/src/NexusManualOperation/ExecuteCommand.php b/app/src/NexusManualOperation/ExecuteCommand.php new file mode 100644 index 0000000..33c7322 --- /dev/null +++ b/app/src/NexusManualOperation/ExecuteCommand.php @@ -0,0 +1,53 @@ +withNamespace('my-caller-namespace'), + ); + + $output->writeln("Starting JobCallerWorkflow..."); + $workflow = $client->newWorkflowStub( + JobCallerWorkflow::class, + WorkflowOptions::new()->withTaskQueue(CallerWorker::TASK_QUEUE), + ); + $run = $client->start($workflow, 'Demo'); + $execution = $run->getExecution(); + $output->writeln(\sprintf( + 'Started: WorkflowID=%s RunID=%s', + $execution->getID(), + $execution->getRunID(), + )); + $output->writeln(\sprintf("Result: %s", $run->getResult('string'))); + + return self::SUCCESS; + } +} diff --git a/app/src/NexusManualOperation/Handler/ExternalJobClient.php b/app/src/NexusManualOperation/Handler/ExternalJobClient.php new file mode 100644 index 0000000..8186a04 --- /dev/null +++ b/app/src/NexusManualOperation/Handler/ExternalJobClient.php @@ -0,0 +1,18 @@ + */ +final class JobOperationHandler implements OperationHandlerInterface +{ + public function __construct( + private readonly ExternalJobClient $client, + ) {} + + public function start( + OperationContext $context, + OperationStartDetails $details, + mixed $param, + ): OperationStartResult { + if ($param->instant) { + return OperationStartResult::sync(new JobResult("done instantly: {$param->jobName}")); + } + + $jobId = $this->client->submit($param->jobName, $details->requestId); + + return OperationStartResult::async(new OperationInfo($jobId, OperationState::Running)); + } + + public function cancel( + OperationContext $context, + OperationCancelDetails $details, + ): void { + $this->client->abort($details->operationToken); + } +} diff --git a/app/src/NexusManualOperation/Handler/SampleNexusService.php b/app/src/NexusManualOperation/Handler/SampleNexusService.php new file mode 100644 index 0000000..33938ea --- /dev/null +++ b/app/src/NexusManualOperation/Handler/SampleNexusService.php @@ -0,0 +1,24 @@ +client); + } +} diff --git a/app/src/NexusManualOperation/README.md b/app/src/NexusManualOperation/README.md new file mode 100644 index 0000000..a2bdbd1 --- /dev/null +++ b/app/src/NexusManualOperation/README.md @@ -0,0 +1,96 @@ +# Nexus Manual Operation sample + +The third Nexus handler form: a **manual** operation backed by an +`OperationHandlerInterface` object. Unlike `#[Operation]` (sync method) and +the `WorkflowHandle`-returning `#[AsyncOperation]` (SDK-managed workflow run), +here one object owns the whole lifecycle: + +- `start()` decides **at runtime** whether to answer synchronously + (`OperationStartResult::sync(...)` — no token issued) or asynchronously + (`OperationStartResult::async(new OperationInfo($token, ...))` — the + handler mints its **own token**, here the external job id). +- `cancel()` receives that same token back via + `$details->operationToken` and aborts the external job. + +The `#[Service]` attribute sits on a self-contained **class** — no interface +is needed, because the operation's wire contract (input/output types) lives +on the `#[AsyncOperation(output: ..., input: ...)]` attribute of the +zero-parameter factory method, which runs once at worker registration. No +`WorkflowClient` is needed either: nothing starts a backing workflow. + +Completion of the async result is delivered by the external system via the +Nexus completion callback (`$details->callbackUrl`) and is out of scope here — +the sample demonstrates the sync fast-path, the custom token, and cancel. + +The caller (`JobCallerWorkflow`) uses the **untyped** stub +(`Workflow::newUntypedNexusOperationStub()`): call 1 with `instant: true` +returns immediately with a `null` token; call 2 runs async inside a +cancellable scope, the caller reads the handler-issued `job-...` token and +then cancels the scope, which routes to the handler's `cancel()`. + +## Prerequisites + +Beyond the usual (`./temporal`, `./rr`): + +```bash +./temporal operator namespace create --namespace my-target-namespace +./temporal operator namespace create --namespace my-caller-namespace + +./temporal operator nexus endpoint create \ + --name my-manual-nexus-endpoint \ + --target-namespace my-target-namespace \ + --target-task-queue my-manual-handler-task-queue +``` + +This sample owns its endpoint, task queues and RoadRunner RPC ports, so it +can run alongside the other Nexus samples. + +## Run + +Three terminals. + +**Handler worker** (`my-target-namespace`): + +```bash +cd app/src/NexusManualOperation +TEMPORAL_NAMESPACE=my-target-namespace ../../rr serve -c .rr.handler.yaml +``` + +**Caller worker** (`my-caller-namespace`): + +```bash +cd app/src/NexusManualOperation +TEMPORAL_NAMESPACE=my-caller-namespace ../../rr serve -c .rr.caller.yaml +``` + +**Starter**: + +```bash +php app/app.php nexus-manual-operation +``` + +Expected output: + +``` +Starting JobCallerWorkflow... +Started: WorkflowID=... RunID=... +Result: [instant=done instantly: Demo] [token=job-...] cancelled +``` + +The `token=job-...` part is the handler-minted token (the fake external job +id built from the start request id); the handler worker logs +`ExternalJobClient: aborted job-...` when the cancel arrives. + +## Constants + +| Name | Value | +|---|---| +| service | `SampleNexusService` | +| operations | `startJob` | +| endpoint | `my-manual-nexus-endpoint` | +| handler task queue | `my-manual-handler-task-queue` | +| caller task queue | `my-manual-caller-task-queue` | +| target namespace | `my-target-namespace` | +| caller namespace | `my-caller-namespace` | +| `scheduleToCloseTimeout` | `20s` | +| `cancellationType` | `TryCancel` | diff --git a/app/src/NexusManualOperation/Service/JobInput.php b/app/src/NexusManualOperation/Service/JobInput.php new file mode 100644 index 0000000..d445a14 --- /dev/null +++ b/app/src/NexusManualOperation/Service/JobInput.php @@ -0,0 +1,13 @@ +newWorker(CallerWorker::TASK_QUEUE) + ->registerWorkflowTypes(JobCallerWorkflowImpl::class); + +$factory->run(); diff --git a/app/src/NexusManualOperation/handler-worker.php b/app/src/NexusManualOperation/handler-worker.php new file mode 100644 index 0000000..77daa93 --- /dev/null +++ b/app/src/NexusManualOperation/handler-worker.php @@ -0,0 +1,24 @@ +newWorker(HandlerWorker::TASK_QUEUE); +$worker->registerNexusServiceImplementation(new SampleNexusService()); + +$factory->run(); diff --git a/app/src/NexusMultipleArguments/.rr.caller.yaml b/app/src/NexusMultipleArguments/.rr.caller.yaml new file mode 100644 index 0000000..d82b5cc --- /dev/null +++ b/app/src/NexusMultipleArguments/.rr.caller.yaml @@ -0,0 +1,16 @@ +version: "3" + +rpc: + listen: tcp://127.0.0.1:6132 + +server: + command: "php caller-worker.php" + +temporal: + address: ${TEMPORAL_HOST:-localhost}:${TEMPORAL_PORT:-7233} + namespace: ${TEMPORAL_NAMESPACE:-my-caller-namespace} + activities: + num_workers: 2 + +logs: + level: info diff --git a/app/src/NexusMultipleArguments/.rr.handler.yaml b/app/src/NexusMultipleArguments/.rr.handler.yaml new file mode 100644 index 0000000..ac98e47 --- /dev/null +++ b/app/src/NexusMultipleArguments/.rr.handler.yaml @@ -0,0 +1,16 @@ +version: "3" + +rpc: + listen: tcp://127.0.0.1:6131 + +server: + command: "php handler-worker.php" + +temporal: + address: ${TEMPORAL_HOST:-localhost}:${TEMPORAL_PORT:-7233} + namespace: ${TEMPORAL_NAMESPACE:-my-target-namespace} + activities: + num_workers: 2 + +logs: + level: info diff --git a/app/src/NexusMultipleArguments/Caller/CallerWorker.php b/app/src/NexusMultipleArguments/Caller/CallerWorker.php new file mode 100644 index 0000000..0eccfb7 --- /dev/null +++ b/app/src/NexusMultipleArguments/Caller/CallerWorker.php @@ -0,0 +1,11 @@ + */ + private object $sampleNexusService; + + public function __construct() + { + $this->sampleNexusService = Workflow::newNexusServiceStub( + SampleNexusService::class, + NexusOperationOptions::new() + ->withEndpoint(CallerWorker::ENDPOINT_NAME) + ->withScheduleToCloseTimeout(CarbonInterval::seconds(10)), + ); + } + + public function echo(string $message): \Generator + { + /** @var EchoOutput $output */ + $output = yield $this->sampleNexusService->echo(new EchoInput($message)); + return $output->message; + } +} diff --git a/app/src/NexusMultipleArguments/Caller/HelloCallerWorkflow.php b/app/src/NexusMultipleArguments/Caller/HelloCallerWorkflow.php new file mode 100644 index 0000000..50abcd2 --- /dev/null +++ b/app/src/NexusMultipleArguments/Caller/HelloCallerWorkflow.php @@ -0,0 +1,16 @@ + */ + private object $sampleNexusService; + + public function __construct() + { + $this->sampleNexusService = Workflow::newNexusServiceStub( + SampleNexusService::class, + NexusOperationOptions::new() + ->withEndpoint(CallerWorker::ENDPOINT_NAME) + ->withScheduleToCloseTimeout(CarbonInterval::seconds(10)), + ); + } + + public function hello(string $message, Language $language): \Generator + { + /** @var HelloOutput $output */ + $output = yield $this->sampleNexusService->hello(new HelloInput($message, $language)); + return $output->message; + } +} diff --git a/app/src/NexusMultipleArguments/ExecuteCommand.php b/app/src/NexusMultipleArguments/ExecuteCommand.php new file mode 100644 index 0000000..9cdd320 --- /dev/null +++ b/app/src/NexusMultipleArguments/ExecuteCommand.php @@ -0,0 +1,69 @@ +withNamespace('my-caller-namespace'), + ); + + $output->writeln("Starting EchoCallerWorkflow..."); + $echoWorkflow = $client->newWorkflowStub( + EchoCallerWorkflow::class, + WorkflowOptions::new()->withTaskQueue(CallerWorker::TASK_QUEUE), + ); + $run = $client->start($echoWorkflow, 'Nexus Echo 👋'); + $execution = $run->getExecution(); + $output->writeln(\sprintf( + 'Started: WorkflowID=%s RunID=%s', + $execution->getID(), + $execution->getRunID(), + )); + $output->writeln(\sprintf("Result: %s", $run->getResult('string'))); + + $output->writeln("\nStarting HelloCallerWorkflow..."); + $helloWorkflow = $client->newWorkflowStub( + HelloCallerWorkflow::class, + WorkflowOptions::new()->withTaskQueue(CallerWorker::TASK_QUEUE), + ); + $run = $client->start($helloWorkflow, 'Nexus', Language::ES); + $execution = $run->getExecution(); + $output->writeln(\sprintf( + 'Started: WorkflowID=%s RunID=%s', + $execution->getID(), + $execution->getRunID(), + )); + $output->writeln(\sprintf("Result: %s", $run->getResult('string'))); + + return self::SUCCESS; + } +} diff --git a/app/src/NexusMultipleArguments/Handler/HandlerWorker.php b/app/src/NexusMultipleArguments/Handler/HandlerWorker.php new file mode 100644 index 0000000..e3e63c6 --- /dev/null +++ b/app/src/NexusMultipleArguments/Handler/HandlerWorker.php @@ -0,0 +1,10 @@ + new HelloOutput("Hello {$name} 👋"), + Language::FR => new HelloOutput("Bonjour {$name} 👋"), + Language::DE => new HelloOutput("Hallo {$name} 👋"), + Language::ES => new HelloOutput("¡Hola! {$name} 👋"), + Language::TR => new HelloOutput("Merhaba {$name} 👋"), + }; + } +} diff --git a/app/src/NexusMultipleArguments/Handler/SampleNexusServiceImpl.php b/app/src/NexusMultipleArguments/Handler/SampleNexusServiceImpl.php new file mode 100644 index 0000000..d237de8 --- /dev/null +++ b/app/src/NexusMultipleArguments/Handler/SampleNexusServiceImpl.php @@ -0,0 +1,40 @@ +echoClient = $echoClient ?? new EchoClientImpl(); + } + + public function echo(EchoInput $input): EchoOutput + { + return $this->echoClient->echo($input); + } + + public function hello(HelloInput $input): WorkflowHandle + { + return WorkflowHandle::fromWorkflowMethod( + HelloHandlerWorkflow::class, + WorkflowOptions::new()->withWorkflowId(Nexus::getStartDetails()->requestId), + $input->name, + $input->language, + ); + } +} diff --git a/app/src/NexusMultipleArguments/README.md b/app/src/NexusMultipleArguments/README.md new file mode 100644 index 0000000..982fd4c --- /dev/null +++ b/app/src/NexusMultipleArguments/README.md @@ -0,0 +1,126 @@ +# Nexus Multiple Arguments sample + +Same Nexus contract as the [basic Nexus sample](../Nexus/README.md), but the +backing handler workflow takes **two positional arguments** instead of one +`HelloInput` DTO. The unpack happens in the service implementation: when the +operation receives a `HelloInput`, it passes `$input->name` and +`$input->language` as separate arguments to the workflow via +`WorkflowHandle::fromWorkflowMethod(class, options, ...$args)`. + +Useful when the Nexus contract DTO and the underlying workflow signature +have to evolve independently — e.g. the workflow already exists with a +multi-arg signature and is called from many places, and you want to wrap +it behind a Nexus operation without changing the workflow. + +The service contract is imported from the +[basic Nexus sample](../Nexus/README.md). Only `Handler/HelloHandlerWorkflow` +and `Handler/HelloHandlerWorkflowImpl` (multi-arg signature) and +`Handler/SampleNexusServiceImpl` (unpacks the input) are sample-specific. + +## Prerequisites + +Beyond the usual (`./temporal`, `./rr`), and the two namespaces the +[Nexus sample](../Nexus/README.md) creates: + +```bash +./temporal operator nexus endpoint create \ + --name my-multiple-arguments-nexus-endpoint \ + --target-namespace my-target-namespace \ + --target-task-queue my-multiple-arguments-handler-task-queue +``` + +This sample owns its endpoint, task queues and RoadRunner RPC ports, so it +can run alongside the other Nexus samples. + +## Run + +Three terminals. + +**Handler worker** (`my-target-namespace`): + +```bash +cd app/src/NexusMultipleArguments +TEMPORAL_NAMESPACE=my-target-namespace ../../rr serve -c .rr.handler.yaml +``` + +**Caller worker** (`my-caller-namespace`): + +```bash +cd app/src/NexusMultipleArguments +TEMPORAL_NAMESPACE=my-caller-namespace ../../rr serve -c .rr.caller.yaml +``` + +**Starter**: + +```bash +php app/app.php nexus-multiple-arguments +``` + +Expected output: + +``` +Starting EchoCallerWorkflow... +Started: WorkflowID=... RunID=... +Result: Nexus Echo 👋 + +Starting HelloCallerWorkflow... +Started: WorkflowID=... RunID=... +Result: ¡Hola! Nexus 👋 +``` + +## What's different from the basic sample + +Three files: the handler workflow interface and implementation (multi-arg +signature) and the service implementation (unpacks the DTO). The rest is a +copy of the basic sample. + +`Handler/HelloHandlerWorkflow.php` — interface signature uses positional args: + +```php +#[WorkflowInterface] +interface HelloHandlerWorkflow +{ + #[WorkflowMethod] + public function hello(string $name, Language $language); +} +``` + +`Handler/SampleNexusServiceImpl.php::hello()` — unpacks `HelloInput` when +building the `WorkflowHandle`: + +```php +return WorkflowHandle::fromWorkflowMethod( + HelloHandlerWorkflow::class, + WorkflowOptions::new()->withWorkflowId(Nexus::getStartDetails()->requestId), + $input->name, // ← positional + $input->language, // ← positional +); +``` + +Compare with the basic sample, which passes the whole DTO: + +```php +return WorkflowHandle::fromWorkflowMethod( + HelloHandlerWorkflow::class, + WorkflowOptions::new()->withWorkflowId(Nexus::getStartDetails()->requestId), + $input, // ← whole DTO, single arg +); +``` + +The Nexus operation contract (`SampleNexusService::hello(HelloInput): WorkflowHandle`) +and the caller workflows are unchanged. + +## Constants + +Same as the [basic Nexus sample](../Nexus/README.md). Listed here for +quick reference: + +| Name | Value | +|---|---| +| service | `SampleNexusService` | +| operations | `echo`, `hello` | +| endpoint | `my-multiple-arguments-nexus-endpoint` | +| handler task queue | `my-multiple-arguments-handler-task-queue` | +| caller task queue | `my-multiple-arguments-caller-task-queue` | +| target namespace | `my-target-namespace` | +| caller namespace | `my-caller-namespace` | diff --git a/app/src/NexusMultipleArguments/caller-worker.php b/app/src/NexusMultipleArguments/caller-worker.php new file mode 100644 index 0000000..be655c6 --- /dev/null +++ b/app/src/NexusMultipleArguments/caller-worker.php @@ -0,0 +1,28 @@ +newWorker(CallerWorker::TASK_QUEUE) + ->registerWorkflowTypes( + EchoCallerWorkflowImpl::class, + HelloCallerWorkflowImpl::class, + ); + +$factory->run(); diff --git a/app/src/NexusMultipleArguments/handler-worker.php b/app/src/NexusMultipleArguments/handler-worker.php new file mode 100644 index 0000000..490ecc4 --- /dev/null +++ b/app/src/NexusMultipleArguments/handler-worker.php @@ -0,0 +1,39 @@ +withNamespace($namespace), +); + +$factory = WorkerFactory::create(client: $workflowClient); + +$worker = $factory->newWorker(HandlerWorker::TASK_QUEUE); +$worker->registerWorkflowTypes(HelloHandlerWorkflowImpl::class); +$worker->registerNexusServiceImplementation(new SampleNexusServiceImpl()); + +$factory->run(); diff --git a/app/tests/Feature/.rr.test.yaml b/app/tests/Feature/.rr.test.yaml index 0cbecd4..1c3c316 100644 --- a/app/tests/Feature/.rr.test.yaml +++ b/app/tests/Feature/.rr.test.yaml @@ -7,7 +7,7 @@ server: command: "php worker.php" temporal: - address: ${TEMPORAL_ADDRESS:-localhost:7236} + address: ${TEMPORAL_ADDRESS:-127.0.0.1:7236} activities: num_workers: 2 @@ -19,7 +19,6 @@ kv: logs: level: info - # mode: production channels: server: mode: production diff --git a/app/tests/Feature/Nexus/CallerWorkflowMockTest.php b/app/tests/Feature/Nexus/CallerWorkflowMockTest.php new file mode 100644 index 0000000..2a00b5b --- /dev/null +++ b/app/tests/Feature/Nexus/CallerWorkflowMockTest.php @@ -0,0 +1,41 @@ +newCaller(EchoCallerWorkflow::class); + + $result = $workflow->echo('ignored'); + + self::assertSame(MockEchoClient::CANNED, $result); + } + + public function testHelloUsesMockHandlerWorkflow(): void + { + $workflow = $this->newCaller(HelloCallerWorkflow::class); + + $result = $workflow->hello('World', Language::EN); + + self::assertSame(MockHelloHandlerWorkflowImpl::CANNED, $result); + } +} diff --git a/app/tests/Feature/Nexus/CallerWorkflowTest.php b/app/tests/Feature/Nexus/CallerWorkflowTest.php new file mode 100644 index 0000000..b47cf59 --- /dev/null +++ b/app/tests/Feature/Nexus/CallerWorkflowTest.php @@ -0,0 +1,49 @@ +newCaller(EchoCallerWorkflow::class); + + $result = $workflow->echo('Hello'); + + self::assertSame('Hello', $result); + } + + public function testHelloRoundTrip(): void + { + $workflow = $this->newCaller(HelloCallerWorkflow::class); + + $result = $workflow->hello('World', Language::EN); + + self::assertSame('Hello World 👋', $result); + } + + public function testHelloRespectsLanguage(): void + { + $workflow = $this->newCaller(HelloCallerWorkflow::class); + + $result = $workflow->hello('Nexus', Language::ES); + + self::assertSame('¡Hola! Nexus 👋', $result); + } +} diff --git a/app/tests/Feature/Nexus/CancellationTest.php b/app/tests/Feature/Nexus/CancellationTest.php new file mode 100644 index 0000000..0ebd36a --- /dev/null +++ b/app/tests/Feature/Nexus/CancellationTest.php @@ -0,0 +1,46 @@ +newCaller(HelloCallerWorkflow::class); + $run = $this->workflowClient->start($workflow, 'Nexus'); + + self::assertContains($run->getResult('string'), [ + 'Hello Nexus 👋', + 'Bonjour Nexus 👋', + 'Hallo Nexus 👋', + '¡Hola! Nexus 👋', + 'Merhaba Nexus 👋', + ]); + + self::assertSame(4, $this->countCancelRequests($run->getExecution())); + } + + private function countCancelRequests(\Temporal\Workflow\WorkflowExecution $execution): int + { + $count = 0; + foreach ($this->workflowClient->getWorkflowHistory($execution) as $event) { + if ($event->hasNexusOperationCancelRequestedEventAttributes()) { + ++$count; + } + } + + return $count; + } +} diff --git a/app/tests/Feature/Nexus/ContextPropagationTest.php b/app/tests/Feature/Nexus/ContextPropagationTest.php new file mode 100644 index 0000000..ea7cfa7 --- /dev/null +++ b/app/tests/Feature/Nexus/ContextPropagationTest.php @@ -0,0 +1,49 @@ +newCaller( + EchoCallerWorkflow::class, + WorkflowOptions::new()->withWorkflowId($workflowId), + ); + + $result = $workflow->echo('ignored'); + + self::assertSame($workflowId, $result); + } + + public function testCallerWorkflowIdReachesTheBackingWorkflow(): void + { + $workflowId = 'ctx-prop-async-' . \bin2hex(\random_bytes(4)); + $workflow = $this->newCaller( + HelloCallerWorkflow::class, + WorkflowOptions::new()->withWorkflowId($workflowId), + ); + + $run = $this->workflowClient->start($workflow, 'Nexus', Language::EN); + + self::assertStringContainsString($workflowId, $run->getResult('string')); + } +} diff --git a/app/tests/Feature/Nexus/ManualOperationStartFailureTest.php b/app/tests/Feature/Nexus/ManualOperationStartFailureTest.php new file mode 100644 index 0000000..c672447 --- /dev/null +++ b/app/tests/Feature/Nexus/ManualOperationStartFailureTest.php @@ -0,0 +1,40 @@ +newCaller( + JobCallerWorkflow::class, + WorkflowOptions::new()->withWorkflowExecutionTimeout(CarbonInterval::seconds(15)), + ); + + try { + $workflow->run('Demo'); + self::fail('Expected the workflow to fail with the handler error.'); + } catch (WorkflowFailedException $e) { + self::assertStringContainsString( + FailingJobClient::FAILURE_MESSAGE, + (string) $e, + ); + } + } +} diff --git a/app/tests/Feature/Nexus/ManualOperationTest.php b/app/tests/Feature/Nexus/ManualOperationTest.php new file mode 100644 index 0000000..adfc0fa --- /dev/null +++ b/app/tests/Feature/Nexus/ManualOperationTest.php @@ -0,0 +1,31 @@ +newCaller(JobCallerWorkflow::class); + + $result = $workflow->run('Demo'); + + self::assertStringContainsString('done instantly: Demo', $result); + self::assertStringContainsString('[token=job-', $result); + self::assertStringEndsWith('cancelled', $result); + } +} diff --git a/app/tests/Feature/Nexus/Mock/FailingJobClient.php b/app/tests/Feature/Nexus/Mock/FailingJobClient.php new file mode 100644 index 0000000..dbc7f32 --- /dev/null +++ b/app/tests/Feature/Nexus/Mock/FailingJobClient.php @@ -0,0 +1,19 @@ +'; + + private readonly SampleNexusServiceImpl $inner; + + public function __construct() + { + $this->inner = new SampleNexusServiceImpl(); + } + + public function echo(EchoInput $input): EchoOutput + { + $headers = Nexus::getCurrentOperationContext()->headers; + + return new EchoOutput($headers->get('x-nexus-caller-workflow-id') ?? self::MISSING); + } + + public function hello(HelloInput $input): WorkflowHandle + { + return $this->inner->hello($input); + } +} diff --git a/app/tests/Feature/Nexus/Mock/MockEchoClient.php b/app/tests/Feature/Nexus/Mock/MockEchoClient.php new file mode 100644 index 0000000..b202a9e --- /dev/null +++ b/app/tests/Feature/Nexus/Mock/MockEchoClient.php @@ -0,0 +1,24 @@ +withWorkflowId(Nexus::getStartDetails()->requestId), + $input, + ); + } +} diff --git a/app/tests/Feature/Nexus/MultipleArgumentsTest.php b/app/tests/Feature/Nexus/MultipleArgumentsTest.php new file mode 100644 index 0000000..2391f69 --- /dev/null +++ b/app/tests/Feature/Nexus/MultipleArgumentsTest.php @@ -0,0 +1,28 @@ +newCaller(HelloCallerWorkflow::class); + + $result = $workflow->hello('World', Language::ES); + + self::assertSame('¡Hola! World 👋', $result); + } +} diff --git a/app/tests/Feature/Nexus/NexusEndpointHelper.php b/app/tests/Feature/Nexus/NexusEndpointHelper.php new file mode 100644 index 0000000..a89bb52 --- /dev/null +++ b/app/tests/Feature/Nexus/NexusEndpointHelper.php @@ -0,0 +1,138 @@ +operator = new OperatorServiceClient( + $temporalAddress, + ['credentials' => \Grpc\ChannelCredentials::createInsecure()], + ); + } + + /** + * Create a Nexus endpoint targeting `(namespace, taskQueue)` and return + * `[id, name]`. The id is used by HTTP routes, the name is what callers + * pass to {@see \Temporal\Workflow\NexusOperationOptions::withEndpoint()}. + * + * @return array{id: string, name: string} + */ + public function setupEndpoint(string $namespace, string $taskQueue, ?string $name = null): array + { + $name ??= 'samples-test-' . \bin2hex(\random_bytes(4)); + $this->deleteEndpointByName($name); + + $request = (new CreateNexusEndpointRequest()) + ->setSpec( + (new EndpointSpec()) + ->setName($name) + ->setTarget( + (new EndpointTarget())->setWorker( + (new WorkerTarget()) + ->setNamespace($namespace) + ->setTaskQueue($taskQueue), + ), + ), + ); + + [$response, $status] = $this->operator->CreateNexusEndpoint($request)->wait(); + + if ($status->code !== \Grpc\STATUS_OK) { + throw new \RuntimeException( + "CreateNexusEndpoint failed (gRPC code {$status->code}): {$status->details}", + ); + } + + \assert($response instanceof CreateNexusEndpointResponse); + + $id = $response->getEndpoint()->getId(); + $this->awaitEndpointResolvable($id); + + return ['id' => $id, 'name' => $name]; + } + + private function awaitEndpointResolvable(string $endpointId, float $timeoutSeconds = 15.0): void + { + $deadline = \microtime(true) + $timeoutSeconds; + $request = (new GetNexusEndpointRequest())->setId($endpointId); + + do { + [, $status] = $this->operator->GetNexusEndpoint($request)->wait(); + + if ($status->code === \Grpc\STATUS_OK) { + return; + } + + \usleep(100_000); + } while (\microtime(true) < $deadline); + + throw new \RuntimeException( + "Nexus endpoint {$endpointId} did not become resolvable within {$timeoutSeconds}s.", + ); + } + + public function close(): void + { + $this->operator->close(); + } + + /** + * Endpoint names are global, and samples pin theirs by constant, so a + * previous run that died mid-test can leave one behind. + */ + private function deleteEndpointByName(string $name): void + { + [$response, $status] = $this->operator + ->ListNexusEndpoints((new ListNexusEndpointsRequest())->setName($name)) + ->wait(); + + if ($status->code !== \Grpc\STATUS_OK) { + return; + } + + \assert($response instanceof ListNexusEndpointsResponse); + + foreach ($response->getEndpoints() as $endpoint) { + $this->deleteEndpoint($endpoint->getId(), $endpoint->getVersion()); + } + } + + public function deleteEndpoint(string $endpointId, int $expectedVersion = 1): void + { + $request = (new DeleteNexusEndpointRequest()) + ->setId($endpointId) + ->setVersion($expectedVersion); + + [, $status] = $this->operator->DeleteNexusEndpoint($request)->wait(); + + if ($status->code !== \Grpc\STATUS_OK) { + // Best-effort cleanup; surface, don't crash other tests. + \trigger_error( + "DeleteNexusEndpoint failed (gRPC code {$status->code}): {$status->details}", + E_USER_WARNING, + ); + } + } +} diff --git a/app/tests/Feature/Nexus/NexusServiceMockTest.php b/app/tests/Feature/Nexus/NexusServiceMockTest.php new file mode 100644 index 0000000..a5bc621 --- /dev/null +++ b/app/tests/Feature/Nexus/NexusServiceMockTest.php @@ -0,0 +1,40 @@ +newCaller(EchoCallerWorkflow::class); + + $result = $workflow->echo('ignored'); + + self::assertSame(MockSampleNexusServiceImpl::ECHO_CANNED, $result); + } + + public function testHelloFromMockedService(): void + { + $workflow = $this->newCaller(HelloCallerWorkflow::class); + + $result = $workflow->hello('World', Language::DE); + + self::assertSame(MockHelloHandlerWorkflowImpl::CANNED, $result); + } +} diff --git a/app/tests/Feature/Nexus/NexusTestCase.php b/app/tests/Feature/Nexus/NexusTestCase.php new file mode 100644 index 0000000..1ced641 --- /dev/null +++ b/app/tests/Feature/Nexus/NexusTestCase.php @@ -0,0 +1,82 @@ +setupEndpoint( + namespace: 'default', + taskQueue: static::TASK_QUEUE, + name: static::ENDPOINT_NAME === '' ? null : static::ENDPOINT_NAME, + ); + } + + public static function tearDownAfterClass(): void + { + if (self::$nexusHelper !== null) { + if (self::$sharedEndpoint !== null) { + self::$nexusHelper->deleteEndpoint(self::$sharedEndpoint['id']); + } + + self::$nexusHelper->close(); + } + + self::$nexusHelper = null; + self::$sharedEndpoint = null; + + parent::tearDownAfterClass(); + } + + protected function setUp(): void + { + parent::setUp(); + + $this->endpoint = self::$sharedEndpoint; + } + + /** + * @template T of object + * @param class-string $workflowClass + * @return T + */ + protected function newCaller(string $workflowClass, ?WorkflowOptions $options = null): object + { + return $this->workflowClient->newWorkflowStub( + $workflowClass, + ($options ?? WorkflowOptions::new()->withWorkflowExecutionTimeout(CarbonInterval::seconds(60))) + ->withTaskQueue(static::TASK_QUEUE), + ); + } +} diff --git a/app/tests/Feature/TestCase.php b/app/tests/Feature/TestCase.php index 2418fea..4b63c69 100644 --- a/app/tests/Feature/TestCase.php +++ b/app/tests/Feature/TestCase.php @@ -15,7 +15,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase protected function setUp(): void { - $this->workflowClient = new WorkflowClient( + $this->workflowClient = WorkflowClient::create( ServiceClient::create(\getenv('TEMPORAL_ADDRESS')), ); diff --git a/app/tests/Feature/bootstrap.php b/app/tests/Feature/bootstrap.php index 4dd680a..62dfea9 100644 --- a/app/tests/Feature/bootstrap.php +++ b/app/tests/Feature/bootstrap.php @@ -12,10 +12,23 @@ $sysInfo = \Temporal\Testing\SystemInfo::detect(); -$environment->startTemporalTestServer(); +// Nexus needs the full Temporal server; the time-skipping test server +// shipped via `startTemporalTestServer()` doesn't expose the Nexus APIs. +// Mirrors what sdk-php's acceptance harness does in TemporalStarter. +$httpPort = getenv('TEMPORAL_HTTP_PORT') ?: '7246'; + +$environment->startTemporalServer( + parameters: [ + '--http-port', $httpPort, + ], +); +// rr's `-c` is resolved relative to its `-w` workdir, while +// Environment::startRoadRunner's internal readiness check (`rr workers -c …`) +// runs from PHP's cwd. They need different paths. $environment->startRoadRunner( - rrCommand: sprintf('%s serve -c .rr.test.yaml -w tests/Feature', $sysInfo->rrExecutable), - commandTimeout: 5 + rrCommand: [$sysInfo->rrExecutable, 'serve', '-c', '.rr.test.yaml', '-w', 'tests/Feature'], + commandTimeout: 5, + configFile: 'tests/Feature/.rr.test.yaml', ); register_shutdown_function(fn() => $environment->stop()); diff --git a/app/tests/Feature/worker.php b/app/tests/Feature/worker.php index 536ed35..602a019 100644 --- a/app/tests/Feature/worker.php +++ b/app/tests/Feature/worker.php @@ -2,6 +2,27 @@ declare(strict_types=1); +use App\Tests\Feature\Nexus\CallerWorkflowMockTest; +use App\Tests\Feature\Nexus\CallerWorkflowTest; +use App\Tests\Feature\Nexus\CancellationTest; +use App\Tests\Feature\Nexus\ContextPropagationTest; +use App\Tests\Feature\Nexus\ManualOperationStartFailureTest; +use App\Tests\Feature\Nexus\ManualOperationTest; +use App\Tests\Feature\Nexus\Mock\FailingJobClient; +use App\Tests\Feature\Nexus\Mock\HeaderEchoNexusServiceImpl; +use App\Tests\Feature\Nexus\Mock\MockEchoClient; +use App\Tests\Feature\Nexus\Mock\MockHelloHandlerWorkflowImpl; +use App\Tests\Feature\Nexus\Mock\MockSampleNexusServiceImpl; +use App\Tests\Feature\Nexus\MultipleArgumentsTest; +use App\Tests\Feature\Nexus\NexusServiceMockTest; +use Temporal\Client\GRPC\ServiceClient; +use Temporal\Client\WorkflowClient; +use Temporal\Interceptor\SimplePipelineProvider; +use Temporal\Samples\Nexus\Handler\HelloHandlerWorkflowImpl; +use Temporal\Samples\Nexus\Handler\SampleNexusServiceImpl; +use Temporal\Samples\NexusContextPropagation\Propagation\NexusOutboundContextInterceptor; +use Temporal\Samples\NexusContextPropagation\Propagation\NexusStartContextInterceptor; +use Temporal\Samples\NexusContextPropagation\Propagation\WorkflowInboundContextInterceptor; use Temporal\Testing\WorkerFactory; ini_set('display_errors', 'stderr'); @@ -9,15 +30,109 @@ chdir(__DIR__ . '/../..'); require_once 'vendor/autoload.php'; -$workerFactory = WorkerFactory::create(); +// Async Nexus operations (WorkflowRunOperation) start a backing workflow, so +// the worker needs a WorkflowClient threaded through to the operation context. +$workflowClient = WorkflowClient::create( + ServiceClient::create(\getenv('TEMPORAL_ADDRESS') ?: 'localhost:7236'), + interceptorProvider: new SimplePipelineProvider([new NexusStartContextInterceptor()]), +); -$worker = $workerFactory->newWorker(taskQueue: 'tests'); +$workerFactory = WorkerFactory::create(client: $workflowClient); -// make sure to register concrete workflow implementations -$worker->registerWorkflowTypes(\Temporal\Samples\SimpleActivity\GreetingWorkflow::class); -$worker->registerActivity( - \Temporal\Samples\SimpleActivity\GreetingActivity::class, - fn() => new \Temporal\Samples\SimpleActivity\GreetingActivity(), -); +// Existing — SimpleActivity feature test. +$workerFactory->newWorker(taskQueue: 'tests') + ->registerWorkflowTypes(\Temporal\Samples\SimpleActivity\GreetingWorkflow::class) + ->registerActivity( + \Temporal\Samples\SimpleActivity\GreetingActivity::class, + fn() => new \Temporal\Samples\SimpleActivity\GreetingActivity(), + ); + +// === Nexus Feature tests === +// +// One task queue per scenario, all registered together in this single rr +// process. Each test creates its own Nexus endpoint (via gRPC OperatorService +// in setUp) targeting the matching queue, runs the test caller workflow on +// the same queue, then drops the endpoint in tearDown. + +// Scenario 1: real production handler. Mirrors `php app/app.php nexus`. +$workerFactory->newWorker(taskQueue: CallerWorkflowTest::TASK_QUEUE) + ->registerWorkflowTypes( + \Temporal\Samples\Nexus\Caller\EchoCallerWorkflowImpl::class, + \Temporal\Samples\Nexus\Caller\HelloCallerWorkflowImpl::class, + HelloHandlerWorkflowImpl::class, + ) + ->registerNexusServiceImplementation(new SampleNexusServiceImpl()); + +// Scenario 2: production service-impl with the EchoClient dependency mocked, +// and a stand-in handler workflow class that returns canned data. Demonstrates +// the DI-mock + workflow-replacement test style. +$workerFactory->newWorker(taskQueue: CallerWorkflowMockTest::TASK_QUEUE) + ->registerWorkflowTypes( + \Temporal\Samples\Nexus\Caller\EchoCallerWorkflowImpl::class, + \Temporal\Samples\Nexus\Caller\HelloCallerWorkflowImpl::class, + MockHelloHandlerWorkflowImpl::class, + ) + ->registerNexusServiceImplementation(new SampleNexusServiceImpl(new MockEchoClient())); + +// Scenario 3: the entire Nexus service implementation is replaced. Useful +// when the production impl isn't reachable from the test (e.g. it lives in +// another package). The mock service still routes async ops through a real +// workflow start so the wire-level state machine is exercised end-to-end. +$workerFactory->newWorker(taskQueue: NexusServiceMockTest::TASK_QUEUE) + ->registerWorkflowTypes( + \Temporal\Samples\Nexus\Caller\EchoCallerWorkflowImpl::class, + \Temporal\Samples\Nexus\Caller\HelloCallerWorkflowImpl::class, + MockHelloHandlerWorkflowImpl::class, + ) + ->registerNexusServiceImplementation(new MockSampleNexusServiceImpl()); + +// Scenario 4: the NexusCancellation sample — fan-out callers + a handler +// workflow that sleeps and honours cancellation. +$workerFactory->newWorker(taskQueue: CancellationTest::TASK_QUEUE) + ->registerWorkflowTypes( + \Temporal\Samples\NexusCancellation\Caller\HelloCallerWorkflowImpl::class, + \Temporal\Samples\NexusCancellation\Handler\HelloHandlerWorkflowImpl::class, + ) + ->registerNexusServiceImplementation(new \Temporal\Samples\Nexus\Handler\SampleNexusServiceImpl()); + +// Scenario 5: the NexusContextPropagation sample — the production outbound +// interceptor on the caller side, a header-echoing service double on the +// handler side so the test can observe the propagated value. +$workerFactory->newWorker( + taskQueue: ContextPropagationTest::TASK_QUEUE, + interceptorProvider: new SimplePipelineProvider([ + new NexusOutboundContextInterceptor(), + new WorkflowInboundContextInterceptor(), + ]), +) + ->registerWorkflowTypes( + \Temporal\Samples\NexusContextPropagation\Caller\EchoCallerWorkflowImpl::class, + \Temporal\Samples\NexusContextPropagation\Caller\HelloCallerWorkflowImpl::class, + \Temporal\Samples\NexusContextPropagation\Handler\HelloHandlerWorkflowImpl::class, + ) + ->registerNexusServiceImplementation(new HeaderEchoNexusServiceImpl()); + +// Scenario 6: the NexusMultipleArguments sample — single-DTO contract backed +// by a multi-argument handler workflow. +$workerFactory->newWorker(taskQueue: MultipleArgumentsTest::TASK_QUEUE) + ->registerWorkflowTypes( + \Temporal\Samples\NexusMultipleArguments\Caller\HelloCallerWorkflowImpl::class, + \Temporal\Samples\NexusMultipleArguments\Handler\HelloHandlerWorkflowImpl::class, + ) + ->registerNexusServiceImplementation(new \Temporal\Samples\NexusMultipleArguments\Handler\SampleNexusServiceImpl()); + +// Scenario 7: the NexusManualOperation sample — a manual handler object that +// owns start (sync fast-path or async with its own token) and cancel. +$workerFactory->newWorker(taskQueue: ManualOperationTest::TASK_QUEUE) + ->registerWorkflowTypes(\Temporal\Samples\NexusManualOperation\Caller\JobCallerWorkflowImpl::class) + ->registerNexusServiceImplementation(new \Temporal\Samples\NexusManualOperation\Handler\SampleNexusService()); + +// Scenario 8: same manual-operation caller, but the external job backend +// rejects the async submit so the caller must surface the start failure. +$workerFactory->newWorker(taskQueue: ManualOperationStartFailureTest::TASK_QUEUE) + ->registerWorkflowTypes(\Temporal\Samples\NexusManualOperation\Caller\JobCallerWorkflowImpl::class) + ->registerNexusServiceImplementation( + new \Temporal\Samples\NexusManualOperation\Handler\SampleNexusService(new FailingJobClient()), + ); $workerFactory->run(); diff --git a/app/tests/bootstrap.php b/app/tests/bootstrap.php index 46a57c1..5a185b7 100644 --- a/app/tests/bootstrap.php +++ b/app/tests/bootstrap.php @@ -17,7 +17,7 @@ # Check --filter parameter if (\preg_match('/--filter(?:=|\s++)([^"\']\S++|\'[^\']*+\'|"[^\']*+")/', $string, $matches)) { $filter = str_replace('\\\\', '\\', \trim($matches[1], '\'"')); - if (\preg_match('/Temporal\\\\Tests\\\\(\\w+)\\\\/', $filter, $matches)) { + if (\preg_match('/(?:Temporal|App)\\\\Tests\\\\(\\w+)\\\\/', $filter, $matches)) { return $matches[1]; } }