For concurrent HTTP calls, should I reach for raw Fibers, ReactPHP/AMPHP, or Swoole?
Stay in FPM and start with a Guzzle Pool pinned to 20-50 concurrency; move to AMPHP v3 only if the codebase grows async, Swoole only when re-architecting.
Tag
Building applications with PHP: language features, versions and practices. questions under this tag, answered directly.
5 answered questions carry this tag.
Stay in FPM and start with a Guzzle Pool pinned to 20-50 concurrency; move to AMPHP v3 only if the codebase grows async, Swoole only when re-architecting.
A readonly withX returns a new instance: `new self` with named arguments is portable, and `clone($this, [...])` fits PHP 8.5 when validation is simple.
Integer cents in the DB, an immutable `Money` on the model: put the mapping in one `CastsAttributes` class and keep currency as a second column there.
Default to `list<Order>` docblocks with strict PHPStan in CI; add one generic `Collection<T>` for behavior, a concrete class only at a trust boundary.
Add a backed enum on the same integer values, use tryFrom() at the boundaries, and keep the old constants as deprecated aliases while you move call sites.