1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-13 02:12:41 +01:00
phorge-phorge/src/aphront
vrana 4682e0c104 Warn against writing to undeclared properties
Summary:
I make this error quite often: I forget to declare a property I am writing to or I make a typo in it.
PHP implicitly creates a public property which I don't like.

I would much rather see a linter warning me against this than this runtime check but writing it is very difficult:

- We need to explore all parents of the class we are checking.
- It is even possible that children will declare that property but it's OK to treat this as error anyway.
- We can extend also builtin or external classes.
- It's somewhat doable for `$this` but even more complex for any `$obj` because we don't know the class of it.

This should catch significant part of these errors and I'm fine with that.

I don't plan escalating to exception because this error is not fatal and should not stop the application from working.

Test Plan: Loaded homepage, checked log.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3601
2012-10-03 11:54:03 -07:00
..
__tests__ Move files in Phabricator one level up 2012-06-01 12:32:44 -07:00
configuration Modernize phame and add concept of "blog style" to blog post list view 2012-10-01 15:37:02 -07:00
console Do sampled profiling of requests 2012-09-17 10:53:45 -07:00
exception Move files in Phabricator one level up 2012-06-01 12:32:44 -07:00
response Polish removal of conduit shield, including legacy stripping for phabricator on phabricator oauth scenarios 2012-08-13 16:05:56 -07:00
sink Minor; fix a unit test 2012-08-15 09:53:25 -07:00
AphrontController.php Warn against writing to undeclared properties 2012-10-03 11:54:03 -07:00
AphrontRequest.php Make AphrontRequest::getHost() work properly in the presence of a port 2012-09-30 21:19:35 -07:00
AphrontURIMapper.php Move files in Phabricator one level up 2012-06-01 12:32:44 -07:00