Download the PHP package ufo-tech/json-rpc-client-sdk without Composer
On this page you can find all versions of the php package ufo-tech/json-rpc-client-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ufo-tech/json-rpc-client-sdk
More information about ufo-tech/json-rpc-client-sdk
Files in ufo-tech/json-rpc-client-sdk
Package json-rpc-client-sdk
Short Description Simple clientSDK builder for any json-RPC servers
License MIT
Homepage https://docs.ufo-tech.space/bin/view/docs/JsonRpcClientSdk/?language=en
Informations about the package json-rpc-client-sdk
json-rpc-client-sdk
Simple clientSDK builder for any json-RPC servers
See the Documentations
New in version 5.0
🔌 Extensible asynchronous transports
- Async procedures use
Ufo\Component\TransportContracts\AsyncTransportFactoryfromufo-tech/component-transport-contractsto select a transport resolver by DSN scheme. Transport contracts, resolvers, and their configuration are maintained in that package. - Multiple named async transports are supported. Select one with the
transportNameconstructor argument; generated configuration uses a separate{transportName_secret}placeholder for each transport. - SDK generation detects async transports by the
RpcTransport::ASYNC_PREFIXprefix.
⚙️ Request configuration
- Added fluent
withHeaders()to merge additional HTTP headers into synchronous procedure requests. - Updated
ufo-tech/rpc-objectsto^3.7.
🔄 Breaking changes
- Async procedure constructors now require
Ufo\Component\TransportContracts\AsyncTransportFactoryinstead of Symfony'sTransportFactoryInterface. The newtransportNameargument precedesrequestId; update positional arguments accordingly. SdkConfigs::getApiEndpoint()now requires an explicit transport name instead of an optional boolean. UseRpcTransport::SYNC_PREFIXandRpcTransport::ASYNC_PREFIXinstead of the removedSdkConfigs::SYNCandSdkConfigs::ASYNCconstants.- Transport classes have moved from
Ufo\RpcSdk\Procedures\AsyncTransportResolverstoUfo\Component\TransportContracts;RPCAsyncTransportFactoryis nowAsyncTransportFactory. Update custom resolver imports and catchUfo\Component\TransportContracts\Exceptions\TransportNotFoundExceptioninstead of the SDK exception. - The legacy
asyncconfiguration key is no longer supported. Regenerate your SDK and update transport configuration and secret placeholders when upgrading.
New in version 4.4
⚙️ Automatic runtime initialization
- The DTO Transformer is initialized automatically before preparing an RPC call if it has not been initialized yet.
- Synchronous procedures use built-in response handlers for enums, collections, union types, and DTOs when the handler list is empty.
- A non-empty list of custom response handlers is preserved.
New in version 4.3
🔧 SDK generation fixes
- Fixed resolution of
$refin arrayitemsfor non-object components, including enums. - Added component resolution inside
oneOf, including nestedschema.oneOfdefinitions. - Fixed generated
@paramdocumentation for union types such asnull|string.
Regenerate your SDK to apply these generation fixes.
⚙️ Generator startup
- The CLI generator initializes the DTO Transformer automatically.
- Composer autoload detection supports both a standalone checkout and installation as a dependency.
- An empty API vendor name defaults to
SDK.
📦 Dependencies and packaging
- Updated
ufo-tech/dto-transformerfrom^2to^3.0.4and adapted enum conversion to its new API. - Updated
ufo-tech/rpc-objectsfrom^3.4to^3.6. - Excluded tests and development configuration from exported package archives.
- Removed the Docker configuration's dependency on the external
tmnetwork.
If your application uses the DTO Transformer API directly, check its compatibility with version 3 when upgrading.
New in version 4.2
⚙️ Service parameters for UFO-json-rpc servers
Support for service-level RPC parameters has been added for servers implemented with UFO-json-rpc.
The SDK now allows request configuration via a fluent chain, without changing method signatures.
🔹 Basic call (as before)
🔹 Cache control
🔹 Passing service metadata
🔹 Async-specific parameters
For async procedures, additional execution control options are available:
📌 Notes
- Service parameters are not passed as business method arguments.
- They are applied at the RPC context level and handled by the server.
- Works only with UFO-json-rpc compatible servers.
- The SDK remains type-safe — method signatures are unchanged.
New in version 4.1
🔍 Filtering methods during SDK generation
The SDK supports skipping RPC methods during generation.
This is done using the ignoredMethods option, which accepts a list of masks.
📌 Mask Rules
*— any sequence of characters!at the beginning — inversion (always generate)&at the beginning or after!— indicates a sync request~at the beginning or after!— indicates an async request- Other characters are literals, meaning they represent themselves
✔️ Example masks
| Mask | Description |
|---|---|
AdminApi.* |
ignores all methods of AdminApi class |
Command.run |
ignores only Command.run |
#Command.run |
ignores only Command.run in sync API |
*.delete |
ignores all delete() methods in any class |
!~Comment.delete |
*always generates Comment.delete for async API even if `.delete` blocks it** |
*.*Test |
ignores all methods ending with Test |
🚫 Prohibited
| Mask | Reason |
|---|---|
User.?pdate |
? is not supported |
~&User.update |
~ and & in one mask is not supported |
[A-Z]*.create |
regex is not supported |
📎 Usage Example
Masks allow you to easily remove service procedures, test methods, and unwanted CRUD operations from SDK generation.
Generate SDK
Run cli command
Or
Use SDK
This example shows working with the generated SDK. IMPORTANT: You may have other procedure classes. The example only shows the concept of interaction.
Debug request and response
Profit
All versions of json-rpc-client-sdk with dependencies
ext-readline Version *
ext-intl Version *
symfony/filesystem Version ^7.2|^8.0
symfony/cache Version ^7.2|^8.0
symfony/maker-bundle Version ^1.48
symfony/http-client Version ^7.2|^8.0
ufo-tech/rpc-objects Version ^3.9
ufo-tech/dto-transformer Version ^3.1
ufo-tech/rpc-exceptions Version ^2
ufo-tech/component-transport-contracts Version ^1
ufo-cms/colored_cli Version ^1.0
symfony/validator Version ^7.2|^8.0
symfony/serializer Version ^7.2|^8.0
symfony/yaml Version ^7.1|^8.0