]> khamidou — GitHub mirrors - arcanist.git/commit
Don't instantiate abstract classes in ArcanistConfiguration::buildAllWorkflows
authorMiorel-Lucian Palii <mlpalii@gmail.com>
Sat, 29 Jun 2013 01:24:30 +0000 (18:24 -0700)
committerMiorel-Lucian Palii <mlpalii@gmail.com>
Sat, 29 Jun 2013 01:24:30 +0000 (18:24 -0700)
commit7130004015f93a6733dc9b8f5357728408c57469
tree18f535e454da16f6c292d5d696522e530235e189
parenta746ad8757d70d51ef9cbba18674ffd66d925a42
Don't instantiate abstract classes in ArcanistConfiguration::buildAllWorkflows

Summary:
I wanted to write a couple of workflows that shared some code in an abstract superclass, but ##arc## would fail trying to instantiate the abstract class.

As it turns out, we can modernize the ##buildAllWorkflows## function a bit, and it will only load concrete objects.

Test Plan:
1. Define an abstract subclass of ##ArcanistBaseWorkflow##.
2. ##arc liberate## the source directory that contains it.
3. Try any ##arc## operation without this diff, and see it fail.
4. Patch this diff and see that ##arc## operations work now.

Reviewers: epriestley, vrana

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D6324
src/configuration/ArcanistConfiguration.php