On Fri, Mar 7, 2025, at 09:48, Edmond Dantes wrote:
>
> >
> > As far as I know, all current SAPIs follow one of two patterns:
> >
>
> It seems that my example, although taken from real life, is more of an
> anti-pattern. Let's take a real example that is not an anti-pattern.
>
> There is a B
On 07/03/2025 08:48, Edmond Dantes wrote:
There is a B2B CRM built on services. Services are classes
instantiated in memory only once via DI, and all that. We process
requests. Requests are executed within a logical *Scope*. The scope
depends on the *TOKEN* and reflects the following entities:
>
> This sounds like you are not using DI meant for fibers/multiple requests
at the same time.
>
Spiral already supports DI containers based on *Scope *(like "per request"
injections). Symfony, if I’m not mistaken, does too.
Spiral introduces a restriction to ensure correct handling of Scope
depe