Page MenuHomePhabricator

Convert stdclass-cast objects to classes wherever possible and use associative arrays elswhere as far as possible
Open, NormalPublic


There are a number of places in the Parsoid/PHP code base where we use standard class objects instead of associative arrays. data-parsoid and data-mw being the two prominent ones currently. There are probably a few others. We should probably create classes and use them everywhere which gives us better documentation and type safety benefits. @Tgr already has work in progress code for data-parsoid uses.

In some cases, for ease of porting, we probably have used stdclasses where associative arrays would make sense. These are usually temporary values as holder of information between functions / passes in the codebase and may not merit a separate class.

Event Timeline

ssastry created this task.Jun 24 2019, 4:26 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 24 2019, 4:26 PM
ssastry triaged this task as Normal priority.Jun 24 2019, 4:27 PM
ssastry added a project: Technical-Debt.
ssastry moved this task from Backlog to Post-Port Work on the Parsoid-PHP board.