Dmitri Perunov

Results 64 comments of Dmitri Perunov
trafficstars

> Okay, so I think I can go with changing the "Wholesale" keyword everywhere to "Order Item Unit generation mode". The option will have possible values: "Single Order Item Unit",...

If it will be merged, then it will be part of BC promise, which is not optimal as it really should be implemented via filters system, rather than separate endpoint....

@mamazu Personally I was thinking of ShopApiPlugin/Request filters system, where only goal is to convert querystring arguments into Command/Query variables. A sort of mini-library to handle querystring. Here is pseudo-code...

No, it should be implemented as validator and return validation error instead of 500 critical error. Case: Last item is bought by someone else within browsing session of current customer....

@alexander-schranz Yes, that would be correct to put check both in handler and in validator. Sorry, I've misread originally, thought it was in Action itself.

Using `ChannelContext` inside `ViewRepository` makes it stateful, which should be avoided. (`ViewRepository` is a sort of QueryHandler in Command/CommandHandler and CQS terms) We can add `ChannelProvider` or just `ChannelRepository` method,...

https://github.com/Sylius/ShopApiPlugin/blob/0cd451b923cec477884628bcc6104b4cbe1998d0/src/EventListener/CartBlamerListener.php#L48 Also it should be `$request->attributes->get('token')`, not `$request->request->get('token')`

Extra race condition/deadlocks are avoidable with check if customer already assigned, so no extra `order processing` would be necessary. By the way, race conditions are pretty heavy right now without...

It's not just `/me` endpoint, we're having deadlocks in `checkout` and whatever places just from concurrent requests. Another problem is when deadlock doesn't actually happen, but order totals are incorrect,...

Great to know, that it helped. :) A tip on implementation, try a decoration for `CompositeOrderProccesor` instead of replacement. For example `LockingOrderProcessor`, that will handle lock and call underling `CompositeOrderProcessor`,...