Skip to content

Commit 8816f08

Browse files
author
vrana
committed
Throw instead of log for invalid properties
Summary: Continue work started at D3601. Test Plan: Commented declaration `AphrontController::$request`, saw exception. Brought it back, didn't see exception. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4233
1 parent 4a81ae6 commit 8816f08

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

src/__phutil_library_map__.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,6 +1361,7 @@
13611361
'AphrontCalendarEventView' => 'AphrontView',
13621362
'AphrontCalendarMonthView' => 'AphrontView',
13631363
'AphrontContextBarView' => 'AphrontView',
1364+
'AphrontController' => 'Phobject',
13641365
'AphrontCrumbsView' => 'AphrontView',
13651366
'AphrontCursorPagerView' => 'AphrontView',
13661367
'AphrontDefaultApplicationConfiguration' => 'AphrontApplicationConfiguration',
@@ -1422,6 +1423,7 @@
14221423
'AphrontTokenizerTemplateView' => 'AphrontView',
14231424
'AphrontTypeaheadTemplateView' => 'AphrontView',
14241425
'AphrontUsageException' => 'AphrontException',
1426+
'AphrontView' => 'Phobject',
14251427
'AphrontWebpageResponse' => 'AphrontHTMLResponse',
14261428
'CelerityPhabricatorResourceController' => 'CelerityResourceController',
14271429
'CelerityResourceController' => 'PhabricatorController',

src/aphront/AphrontController.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* @group aphront
55
*/
6-
abstract class AphrontController {
6+
abstract class AphrontController extends Phobject {
77

88
private $request;
99
private $currentApplication;
@@ -45,9 +45,4 @@ final public function getCurrentApplication() {
4545
return $this->currentApplication;
4646
}
4747

48-
public function __set($name, $value) {
49-
phlog('Wrote to undeclared property '.get_class($this).'::$'.$name.'.');
50-
$this->$name = $value;
51-
}
52-
5348
}

src/view/AphrontView.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
abstract class AphrontView {
3+
abstract class AphrontView extends Phobject {
44

55
protected $children = array();
66

@@ -42,9 +42,4 @@ final protected function renderSingleView($child) {
4242

4343
abstract public function render();
4444

45-
public function __set($name, $value) {
46-
phlog('Wrote to undeclared property '.get_class($this).'::$'.$name.'.');
47-
$this->$name = $value;
48-
}
49-
5045
}

0 commit comments

Comments
 (0)