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

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
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