Skip to content

Conversation

rez1dent3
Copy link
Member

@rez1dent3 rez1dent3 commented Apr 22, 2022

An old, incorrect architectural decision prevents us from adding full support for uuid. Unfortunately, I can no longer maintain backward compatibility in this part.

As part of this pull request, a migration team will be developed for your projects. Also, I will write documentation on usage.

And now to the problem. At the very beginning of the development of the package, it was possible to work with only one wallet, and later the ability to create many was added. Users asked for transfers between wallets and I implemented them.

Now if you make a transfer to a user, then the recipient will be the user. And here is an example:

$transfer = $user1->transfer($user2, 500);
assert($transfer->from instance Wallet); // true
assert($transfer->to instance Wallet); // false

And here is the problem itself, in relation to "to" the wallet model should be architecturally written. After accepting this pull request, this statement will be correct.

$transfer = $user1->transfer($user2, 500);
assert($transfer->from instance Wallet); // true
assert($transfer->to instance Wallet); // true

Previously, this behavior could only be achieved in this way:

$transfer = $user1->transfer($user2->wallet, 500);
assert($transfer->from instance Wallet); // true
assert($transfer->to instance Wallet); // true

Because of what there was a different behavior in payments.


So why didn’t it bother you before, but now it was decided to change the logic of the package? It's about UUID (GUID) support. Without this change, the speed of working with uuid will drop by 25-50 times, even on rather small samples.

@rez1dent3 rez1dent3 added bug Something isn't working enhancement New feature or request 9.x-dev labels Apr 22, 2022
@rez1dent3 rez1dent3 self-assigned this Apr 22, 2022
@rez1dent3 rez1dent3 merged commit a78bfd4 into develop Apr 22, 2022
@rez1dent3 rez1dent3 deleted the logicTransfer branch April 27, 2022 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

9.x-dev bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant