Page MenuHomePhabricator

Clean up back-compatible code from the PHP 5.3 era
Open, Needs TriagePublic

Event Timeline

Aklapper renamed this task from Clean up back-compat code from the PHP 5.3 era to Clean up back-compatible code from the PHP 5.3 era.Oct 7 2018, 2:09 AM
Aklapper updated the task description. (Show Details)
Aklapper moved this task from Proposed tasks to Missing mentors on the Google-Code-in-2018 board.

Sorry, I forgot to explicitly volunteer to mentor this :)

Sorry, I forgot to explicitly volunteer to mentor this :)

Would you be willing to mentor this once again? :-)

Might want to consider opening a new task or tweaking this one for all work arounds for PHP < 7 since all supported versions now require at least 7.0.

can i as a beginner work on this task?

Hi @vaibhavsingh and welcome! Yes, this task is marked as a good first task.

@Aklapper can you please breif me a bit more about this task ????

@vaibhavsingh: Hi, do you have specific questions? See the task description for information. If that information is not sufficient, then please elaborate what exactly is not sufficient and why. Thanks! :)

@Aklapper in the link https://codesearch.wmflabs.org/search/?q=5%5C.3&i=nope&files=%5C.php&repos= the first mention in (includes/libs/ArrayUtils.php )theres there is information regarding benchmarking in php .but the effeciency of hash and md5 remains pretty same for all php >5.2 specially for small strings so what we need to do in here???

Masumrezarock100 updated the task description. (Show Details)
Masumrezarock100 added a subscriber: Masumrezarock100.

@Legoktm 's name in the mentor section is misleading. They haven't explicitly agreed to mentor this task for GCI2019, not yet.

@vaibhavsingh: The task description says that this is about "some back-compatible code".
includes/libs/ArrayUtils.php is not code. It is a comment only. So there is nothing to do in that file.

can we provide a late static binding method by changing all of self keyword to static in "includes/PFun_Caller.php"???

What does implicit binding of $this in closures means???

What does implicit binding of $this in closures means???

Prior to PHP 5.4, closures didn't have access to $this, so it had to be passed in explicitly. See https://www.php.net/manual/en/functions.anonymous.php.

I'm going to be making some of the changes suggested by this task today. Let me know if we're going to clash on anything.

Change 592450 had a related patch set uploaded (by Bobulous; owner: Bobulous):
[mediawiki/core@master] Replace dirname usage with PHP 7 equivalents.

https://gerrit.wikimedia.org/r/592450

Change 592450 abandoned by Bobulous:
Replace dirname usage with PHP 7 equivalents.

https://gerrit.wikimedia.org/r/592450

Change 592484 had a related patch set uploaded (by Bobulous; owner: Bobulous):
[mediawiki/core@master] Add comment to say PHP 4 only until version check.

https://gerrit.wikimedia.org/r/592484

Change 592484 abandoned by Bobulous:
Add comment to say PHP 4 only until version check.

Reason:
Abandoning due to lack of review or other feedback.

https://gerrit.wikimedia.org/r/592484

Bobulous added a subscriber: Bobulous.