Last modified: 2011-11-29 19:42:10 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T10023, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 8023 - Migrate to PHP 5 proper
Migrate to PHP 5 proper
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Lowest enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: code_quality
  Show dependency treegraph
 
Reported: 2006-11-23 22:20 UTC by Carl Fürstenberg
Modified: 2011-11-29 19:42 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Carl Fürstenberg 2006-11-23 22:20:02 UTC
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.
Comment 1 Rob Church 2006-11-23 22:25:32 UTC
This is an ongoing enhancement, as I've pointed out before, and shouldn't be
rushed in one go, because that *will* break things.
Comment 2 Chad H. 2011-11-29 19:42:10 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links