This updates the backend of PhortuneAccount to use EditEngine and Modular Transactions and updates language to "account manager" for clarity of role.
Details
- Wiped phortune_account table
- Visit Phortune, see new account automatically created.
- Edit name and managers
- Try to set no name or remove myself as a manager, get error messages
- Visit /phortune/ and create another new account
Diff Detail
- Repository
- rP Phabricator
- Branch
- account-xaction (branched from master)
- Lint
Lint Passed - Unit
Tests Passed - Build Status
Buildable 16395 Build 21809: Run Core Tests Build 21808: arc lint + arc unit
Event Timeline
src/applications/phortune/editor/PhortuneAccountEditEngine.php | ||
---|---|---|
90–91 | Probably fine to drop "member" stuff, there shouldn't be any backward compatibility issues. | |
src/applications/phortune/editor/PhortuneAccountEditor.php | ||
20 | You should be able to get rid of this (ModularTransactions should figure it out automatically.) | |
60–71 | Does this prevent you from creating an account without yourself as a manager? | |
src/applications/phortune/storage/PhortuneAccountTransaction.php | ||
18–27 | I don't want to add new mailtags -- they make T10448 harder and I don't think we get anything out of them in this case. | |
src/applications/phortune/xaction/PhortuneAccountNameTransaction.php | ||
38–39 | $errors should just be a list, without keys ('name', 'length'). One issue we might run into with named keys like this is that it's possible that two different fields could both raise length errors. If they did, they might overwrite one another. |
So I don't need mailtags to send mail? Specifically I think we should send mail if people add new managers, change contact info, yada yada, will that just work?
I don't think mail needs to have any mail tags. If it does, we could remove that requirement to simplify the eventual implementation of T10448. We sent plenty of mail with no tags, though (password reset, email verify, etc).
src/applications/phortune/xaction/PhortuneAccountNameTransaction.php | ||
---|---|---|
38–39 | It prints out the error twice, I'll take another look. |
src/applications/phortune/editor/PhortuneAccountEditor.php | ||
---|---|---|
60–71 | Uh no, also can't seem to find a good fix for that. $old = $xaction->getOldValue(); doesn't seem to return anything, ever. |
ok I found a better workaround I think. Tested creation with 0 members, adding 1, adding 1 + removing 1.
This ended up in my "Waiting on Other Reviewers" bucket, which looks like yet another bug.
src/applications/phortune/storage/PhortuneAccount.php | ||
---|---|---|
98 | Probably fine to call this just getURI(), that's the behavior of other getURI() methods. |