Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] expunge-by-transaction #4

Open
bapcltd-marv opened this issue Jan 30, 2020 · 0 comments
Open

[Feature Request] expunge-by-transaction #4

bapcltd-marv opened this issue Jan 30, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request pr-upstream An issue to PR to the upstream project

Comments

@bapcltd-marv
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
unit tests may cause emails to not be removed

Describe the solution you'd like
Mailbox::expungeTransaction(Closure(Mailbox, & list<int>) : T): T

Mailbox::expungeTransaction(static function(Mailbox $mailbox, & list<int> $to_delete) : T {
// do something
$to_delete[] = $a;

// do something that might throw
$to_delete[] = $b;

// do something else that might throw
$to_delete[] = $c;
});

Describe alternatives you've considered
manually wrapping code in try-catch blocks is cumbersome.

Additional context
https://github.com/paragonie/easydb/blob/38cfac4bbd96960628ca3237ed98f3f344ffdd7b/src/EasyDB.php#L1249

@bapcltd-marv bapcltd-marv added enhancement New feature or request pr-upstream An issue to PR to the upstream project labels Jan 30, 2020
@bapcltd-marv bapcltd-marv self-assigned this Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pr-upstream An issue to PR to the upstream project
Projects
None yet
Development

No branches or pull requests

1 participant