Page MenuHomePhabricator

Implement fluent API for Jade entity JSON
Open, MediumPublic

Description

The flat interface to create judgments is gross, since we're passing unnamed parameters through PHP. We could improve on this with a fluent style, for example:

JudgmentPage::forEntity('Diff', $revId)->addJudgment(
    Judgment::forSchema('damaging')->setData(true)->setNotes($notes));

Hopefully this can be worked out before deployment.

Event Timeline

awight created this task.Aug 9 2018, 10:48 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 9 2018, 10:48 PM
Harej moved this task from Inbox to Feature Requests on the Jade board.Aug 14 2018, 1:23 AM
Harej triaged this task as Medium priority.Nov 14 2018, 11:46 PM
Harej moved this task from Feature Requests to Bugs on the Jade board.Nov 14 2018, 11:55 PM
awight removed a subscriber: awight.Mar 21 2019, 4:04 PM
Harej renamed this task from Provide a fluent API for JADE to Provide a fluent API for Jade.Apr 15 2019, 10:25 PM
ElanHR added a subscriber: ElanHR.Apr 23 2019, 12:09 AM
Halfak renamed this task from Provide a fluent API for Jade to Implement a fluent API for Jade.Aug 6 2019, 7:54 PM
Halfak renamed this task from Implement a fluent API for Jade to Implement fluent API for Jade entity JSON.