Page MenuHomePhabricator

Migrate to PHP 5 proper
Closed, DeclinedPublic

Description

There are lot of places in the source code that contains "old" code, pre php 5.
Most notable is the lack of private/protected and public specifier. Stated in
docs/desing.txt:

  • PHP doesn't have "private" member variables of functions, so I've used the comment "/* private */" in some places to indicate my intent. Don't access things marked that way from outside the class def--use the accessor functions (or make your own if you need them). Yes, even some globals are marked private, because PHP is broken and doesn't allow static class variables.

As php isn't "broken" in this way any more, this should be fixed.

On an other note is that there is an extensive use of is_object($var) and $var

false, most of those uses I think would be more logical by using exceptions

instead.


Version: unspecified
Severity: enhancement

Details

Reference
bz8023

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 9:28 PM
bzimport set Reference to bz8023.
bzimport added a subscriber: Unknown Object (MLST).

robchur wrote:

This is an ongoing enhancement, as I've pointed out before, and shouldn't be
rushed in one go, because that *will* break things.

I'm going to go ahead and mark this WORKSFORME. All new code should be explicit with things like visibility. Old code shouldn't be changed en-masse, but is slowly being updated. No need to leave a bug open for this.