stable
Clone or download
Read-only
feat: Implement request #35866 Have an equivalent to Dispose pattern in PHP
No functional change. LocaleSwitcher was turned to Disposable to showcase an example of usage. Dispose pattern should help us with cleaning test data in DB integration tests. Change-Id: I8880bb30f64906a96f93dc5aacb59365d7190f2c
Modified Files
Name | ||||
---|---|---|---|---|
A | adr/0025-disposable.md | +138 | −0 | Go to diff View file |
M | adr/index.md | +2 | −1 | Go to diff View file |
A | src/common/Disposable/Disposable.php | +37 | −0 | Go to diff View file |
A | src/common/Disposable/Dispose.php | +54 | −0 | Go to diff View file |
A | src/common/Disposable/README.md | +22 | −0 | Go to diff View file |
M | src/common/NeverThrow/Result.php | +1 | −1 | Go to diff View file |
M | src/common/language/LocaleSwitcher.php | +15 | −6 | Go to diff View file |
M | tests/psalm/psalm.xml | +1 | −0 | Go to diff View file |
A | tests/unit/common/Disposable/DisposeTest.php | +80 | −0 | Go to diff View file |
A | tests/unit/common/Disposable/Tests/TestDisposable.php | +40 | −0 | Go to diff View file |