Removing deprecated code

Nao

  • Dadman with a boy
  • Posts: 16,079
Removing deprecated code
« on May 6th, 2011, 05:09 PM »Last edited on February 20th, 2012, 03:09 PM by Nao
Feature: Removing deprecated code
Developer: Arantor & Nao
Target: admins, modders, themers
Status: 99% (believed to be complete, but it's a never-ending feature implementation because of its very nature.)
Comment:

We believe that software should live in the present, not in the past. Libraries that were deprecated years ago should not be supported anymore, because they mean overhead, bloat, and usually prevent developers from using new features, for fear of breaking something on older platforms. Because some people are too afraid of "fixing what isn't broken", they're still using PHP 4.x and MySQL 4.0 these days.
They shouldn't be afraid.
So we removed support for PHP < 5.1.2, MySQL < 4.1.2, and are requiring support for the GD2 graphics library (which shouldn't be a problem in 99% of the cases.)
Dozens of other minor libraries, functions and programming methods that didn't belong in this age were also deprecated, such as support for the Wap, Wap2 and iMode wireless modes, the boardmod installation system for add-ons, or older SMF1 compatibility code.




Re: Removing deprecated code
« Reply #19, on June 10th, 2011, 10:28 PM »
PHP   5.2.17
MySQL 5.1.56-community-log

and

PHP  5.2.13
MySQL 5.0.92-community

Re: Removing deprecated code
« Reply #20, on June 10th, 2011, 11:33 PM »
PHP 5.3.6 on my production server and MYSQL version 5.1.?. My test server has PHP 5.2.17 and MYSQL 5.1.57.

Code: [Select]
// IE 4 is rather annoying, this wouldn't be necessary...
    echo '
            var fSetupCredits = function ()
            {
                smfSetLatestSupport();
                smfCurrentVersion()
            }
            addLoadEvent(fSetupCredits);
        // ]]></script>';

Re: Removing deprecated code
« Reply #21, on June 10th, 2011, 11:53 PM »
In my main production servers:

PHP 5.2.17
MySql 5.0.67

But I have the choice to use other versions in subfolders if needed (included PHP 5.3)

Re: Removing deprecated code
« Reply #22, on June 11th, 2011, 12:18 AM »
TE, you made the jump to SimpleXML? I was carefully going to reuse Subs-Package.php to interpret XML in the package manager overhaul but if SXML is already used in one area, hell, let's reuse it properly! (And, incidentially, I had to bone up on it for my Zend exam that was supposed to be next week but won't be due to an administrative fuck up caused by my not having a passport.)

Re: Removing deprecated code
« Reply #23, on June 11th, 2011, 02:53 AM »
PHP is 5.3.6 & MySQL MySQL version 5.1.49  on main VPS and  PHP 5.2.something old & MySQL 5.Idon't know on the other.

Re: Removing deprecated code
« Reply #24, on June 11th, 2011, 02:55 AM »
Judging by the comments here, 5.2 is easily a safe bet, but that 5.3 isn't unrealistic... :) (Crap, I might actually have to update my local machine in that case)


Re: Removing deprecated code
« Reply #26, on June 11th, 2011, 07:58 AM »
PHP 5.3.3
MySQL 5.1.49

Dropping PHP 5.2 might be okay for a future release, marking code as 'we'd like to replace this with' or 'would like to use'...

Re: Removing deprecated code
« Reply #27, on June 11th, 2011, 09:02 AM »
Quote from Arantor on June 11th, 2011, 12:18 AM
TE, you made the jump to SimpleXML? I was carefully going to reuse Subs-Package.php to interpret XML in the package manager overhaul but if SXML is already used in one area, hell, let's reuse it properly!
I had the use of Subs-Package.php in mind but skipped it at the end, simply because it doesn't match with my ideas reading the XML-structure, thus I had two options: rewrite it entirely to fit my own needs or use SimpleXML instead. Using SimpleXML  is damn simple  :)

The one thing I still miss in SimpleXML is proper error handling (broken XML files, e.g. unclosed tags etc) but that's already solved within the new importer engine (the one in the team board is totally outdated, I'll upload the new one tomorrow).

Re: Removing deprecated code
« Reply #28, on June 11th, 2011, 11:36 AM »
Quote from Arantor on June 11th, 2011, 12:18 AM
TE, you made the jump to SimpleXML? I was carefully going to reuse Subs-Package.php to interpret XML in the package manager overhaul but if SXML is already used in one area, hell, let's reuse it properly! (And, incidentially, I had to bone up on it for my Zend exam that was supposed to be next week but won't be due to an administrative fuck up caused by my not having a passport.)
I'd go for 5.3... we're not looking for the largest audience (as SMF does)! As already said, 5.2 is TWO YEARS OLD!
Let's PUSH the innovation! :D

Re: Removing deprecated code
« Reply #29, on June 11th, 2011, 12:02 PM »
Sure, we're not looking for a large audience, but... What about the existing Wedge enthusiasts who are on PHP 5.2? I don't know if I can 'force' them to switch to 5.3 just because I want to be able to use lambda functions...

Re: Removing deprecated code
« Reply #30, on June 11th, 2011, 12:05 PM »
Uhm.. let's ask them if they're willing to ask their hosting to update their PHP install or change hosting (hosting with an outdated PHP environment IMHO aren't worth to be used)!

Ok, I'm sure I've made a lot of errors in this phrase.. but it's complex!! :P