Skip to the guide
All guides

FAQ

Short answers about installing Reqtide, what it does and does not do, how errors and tests work, and where to report a bug or ask for a feature.

app Reqtide PHP 0.1.0checked reading 4 minutes

On this page

Install and status

Is it on Packagist?

Yes: composer require enaxon/reqtide, from version 0.1.0. See Install.

Is it ready for production?

No claim is made. Names and behavior may still change, and the core package keeps its state in one process. It was run on the command line in Docker and in CI lanes under PHP-FPM. See Limits.

Which PHP versions work?

PHP 8.3 or newer on a 64-bit build. The tests and the examples were run in Docker on 8.3, 8.4 and 8.5.

Does it need any other packages?

No. composer.json requires only php and php-64bit. The test helpers are in the same package.

Does it work with Guzzle, PSR-18 or Symfony HTTP Client?

A Guzzle integration, enaxon/reqtide-guzzle, is a separate package on Packagist. It was run in Docker and in CI with Guzzle 7.15.5 and PHP 8.3 to 8.5 on the command line.

PSR-18 and Symfony HTTP Client have no integration. You wrap a call made with one of those clients in a pipeline yourself. See Guzzle requests with Reqtide and Limits.

Is there Redis support?

Not in the core package, whose state lives in the memory of one PHP process. A separate package, enaxon/reqtide-redis, shares state between processes. It is on Packagist and was run in Docker and in CI with Redis 7.4.11 and 8.2.10 and PHP 8.3 to 8.5 on the command line, and in PHP-FPM lanes. Sentinel, Cluster and Valkey are not supported. See Shared state with Redis and Limits.

Behavior

Does it retry a POST?

Only if you tell it that repeating the call is safe. A retry needs three things: your replay-safety assertion for the call, a retry budget and a retryable exception class. Reqtide never infers safety, and it has no HTTP knowledge. See Getting started.

Are limits shared across PHP-FPM workers or servers?

No. State is per process. A pipeline built inside a request starts every request with a full quota and a closed circuit. The Redis package shares state between processes. See Limits.

Does it stop a callback that runs too long?

No. The deadline is checked between steps. Reqtide reports a result that arrives after the deadline as DeadlineExceeded, but your code has already run to the end. Declare the attempt timeout as Cooperative and make your code stop itself.

Does it guarantee exactly-once execution?

No. Design the operation to be safe to repeat, or do not retry it.

Why are there no default timeouts or limits?

A default would be a guess about your dependency. You pick every number, and the builder tells you which required decision is missing.

Why was my rate limit charged for a call that never ran?

Reqtide never refunds a rate charge. If a call is cancelled after admission and before dispatch, its unit stays used. See Limits.

Errors

How do I tell my own exceptions from Reqtide decisions?

Your exceptions come out unwrapped. A refusal by Reqtide is a ReqtideException. The ones that describe a policy decision also implement ProblemCarrier, with a stable ReasonCode and a redacted Problem. Branch on those, not on message text. See Error handling.

What does rate.exhausted or circuit_open mean?

The rate limit or the circuit breaker refused the call before your code ran. The Problem says whether to wait, retry or fix the setup. See Error handling.

Testing

How do I test retries without sleeping?

Use the virtual clock and the scripted runtime from Enaxon\Reqtide\Testing. Time moves only when you move it, and each attempt returns what you script. See Testing with the virtual clock.

Can I use the test helpers in production code?

They are for tests. They ship in the same package, so they are also in production installs, but production code should not call them.

Examples and help

Do the code examples really run?

Yes. Every PHP block with output in these guides comes from a script in examples/ (opens in a new tab) or in the examples folder of a package. The recorded output next to each block is the output of that script. The scripts were run in Docker on the command line.

Where is the list of classes and methods?

In the source. The classes of the core package are in src/ (opens in a new tab), and the other two packages have their own folder under packages/ (opens in a new tab).

How do I report a bug or ask for a feature?

Open an issue (opens in a new tab). Do not include secrets or production data. Report security problems privately, as described in the security policy (opens in a new tab).