docs: rewrite JsonRpcBundle docs, add SDK docs, move them under docs/api
en/docs/api/json-rpc-bundle/developers/known_issues/open.md
new file +25
−0
Open issues
Known bugs and inconsistencies in the current version of JsonRpcBundle (10.4.2): symptom, cause and workaround. Fixed ones are on the Fixed issues page.
<include>(.issues/lock-waits-instead-of-error.md)
<include>(.issues/rpc-error-not-for-all-http-errors.md)
<include>(.issues/async-request-event-not-fired.md)
<include>(.issues/dto-collection-on-method.md)
<include>(.issues/translations-locales-shared.md)
<include>(.issues/bundle-docs-link.md)
en/docs/api/json-rpc-bundle/developers/known_issues/.issues/lock-waits-instead-of-error.md
new file +13
−0
#[RPC\Lock] waits for release instead of a "locked" error
Affected versions: 7.4.0 — 10.4.2 (current): the blocking acquire(true) has been in RPC\Lock since its first version (ufo-tech/rpc-objects 2.9.0). An inconsistency between the 7.4 release notes and the behavior.
Symptom. The 7.4 notes promise that calling a locked method ends with error -32400 "Method '…' is locked". In fact, a parallel call with the same key waits until the first one finishes and is executed after it.
Cause. RPC\Lock::acquire() calls $lock->acquire(true) (blocking mode), and the UfoLockerStore store does not implement BlockingStoreInterface. In this case Symfony Lock retries in a loop until the lock is released, and LockConflictedException never surfaces.
Consequences. Repeated calls are not rejected but pile up and hold workers. Without ttl the wait is not limited in time.
Workaround. Always set ttl. If you need an actual rejection rather than a queue, check whether the lock is taken with your own Symfony Lock service using acquire(false) inside the method.
en/docs/api/json-rpc-bundle/developers/known_issues/.issues/rpc-error-not-for-all-http-errors.md
new file +13
−0
rpc.error is not fired for all errors of a single HTTP request
Affected versions: 10.4.2 (current). An inconsistency between entry points.
Symptom. For a single HTTP request, some errors do not go through the rpc.error event and are not written to the bundle's log: invalid JSON, missing or invalid token, unknown method, unsupported jsonrpc version, empty or disabled batch, missing positional parameters, an exception from your listener. The client does receive the error response, but your rpc.error listeners do not see it, and it does not get logged at all: SymfonyErrorListener stops propagation of kernel.exception, so the standard Symfony logging (ErrorListener::logKernelException) does not run either.
For the same errors in the console (ufo:rpc:process), inline batch and via RpcExecutor, the rpc.error event is fired.
Cause. In HTTP, these exceptions are caught by SymfonyErrorListener on kernel.exception, which immediately builds the response.
Workaround. To see all HTTP errors, subscribe to Symfony's kernel.exception with a priority higher than 999 for RPC routes.
en/docs/api/json-rpc-bundle/developers/known_issues/.issues/async-request-event-not-fired.md
new file +11
−0
The rpc.async_request event is declared but never fired
Affected versions: 7.0.0 — 10.4.2 (current). Verified against the code of tags 7.0.0, 8.0.5, 9.2.1, 10.2.3, 10.4.2: the fireAsyncRequest() method is not called anywhere.
Symptom. A listener on RpcEvent::REQUEST_ASYNC (rpc.async_request) is never called.
Cause. RpcEventFactory::fireAsyncRequest() is not called in the bundle's code. The Symfony Messenger handler (RpcAsyncProcessor) passes the request straight to RpcServer::handle(), bypassing both rpc.request and rpc.async_request.
Workaround. For requests from the queue, subscribe to rpc.pre_execute: it is fired for every method execution regardless of the source.
en/docs/api/json-rpc-bundle/developers/known_issues/.issues/dto-collection-on-method.md
new file +11
−0
#[RPC\DTOCollection] on a method does not set the response format
Affected versions: verified against the code of tags 10.0.6 — 10.4.2 (current); DTOCollection appeared in ufo-tech/rpc-objects 3.8.2.
Symptom. A method with #[RPC\DTOCollection(UserDto::class)] and return type array does not get a DTO collection schema in the documentation, and the result items are not processed as DTOs.
Cause. ResponseFiller reads the attribute via getAttributes(DTO::class) without the ReflectionAttribute::IS_INSTANCEOF flag, so the DTOCollection subclass is not found.
Workaround. Use #[RPC\DTO(UserDto::class, collection: true)] or specify the type in PHPDoc: @return UserDto[].
en/docs/api/json-rpc-bundle/developers/known_issues/.issues/translations-locales-shared.md
new file +12
−0
Documentation translation languages are shared across all API groups
Affected versions: 10.4.0 — 10.4.2 (current). Based on the 10.4 release notes ("Known issues" section).
Symptom. If a language exists only in a group file (for example, translations/rpc/bfa.pl.yaml), the documentation of another group with Accept-Language: pl returns Content-Language: pl, although its texts are in the default language.
Cause. The list of available languages is collected once for all groups.
Workaround. Keep the same set of languages in the base and group translation files.
en/docs/api/json-rpc-bundle/developers/known_issues/.issues/bundle-docs-link.md
new file +9
−0
Outdated links and policies in the bundle repository
Affected versions: 10.4.2 (current). A documentation inconsistency; does not affect how the bundle works.
README.md, README-UA.md and homepage in the bundle's composer.json point to the old wiki docs.ufo-tech.space/bin/view/docs/JsonRpcBundle/. The up-to-date documentation is on this site.
In SECURITY.md, the list of supported versions ends at 6.1.x, although the current branch is 10.x.