Removing deprecated code

Nao

  • Dadman with a boy
  • Posts: 16,063
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 #1, on June 10th, 2011, 06:24 PM »
Update: we're considering dropping support for PHP < 5.3, instead of 5.1.2.

The reasons behind it:
- 5.3 is already 2 years old (will be in two weeks). We can no longer consider it 'young'. It has received several incremental updates, and should be perfectly stable now.
- 5.2 and 5.3 add some features that, although not vital, are nice enough that we sometimes used them without realizing we couldn't. Then we had to write our code differently, etc... It's not cool.
- It's best to keep up with the current version, if only because it allows us to test for compatibility. Sometimes new PHP versions break compatibility, so we need to install these versions... Might as well ask everyone to use the same branch as we do.
- And finally, really -- here's the thing we'll always say to people who complain about version numbers in Wedge.

If you're really serious about outdated software, use SMF 2.0!

Your host should have PHP 5.3 installed. If it doesn't, maybe it's a cheap, bad host, and maybe they're not up to date on most of their software -- as a result, it may create other issues in Wedge that wouldn't trigger otherwise.

Guys & gals, we'd be interested in knowing what PHP (and MySQL) version you're running your main SMF install on! This information should be in your admin homepage.

Re: Removing deprecated code
« Reply #2, on June 10th, 2011, 06:39 PM »
the php version on oldest linux (debian etch) is 5.2.0-8  :huh:

Re: Removing deprecated code
« Reply #3, on June 10th, 2011, 07:10 PM »Last edited on June 10th, 2011, 07:26 PM by billy2
PHP version   5.2.17
MySQL version   5.1.56
 :sob:
Host moving me to 5.3 server sometime
:)


Re: Removing deprecated code
« Reply #5, on June 10th, 2011, 07:24 PM »
PHP version   5.2.9
MySQL version   5.0.91-community
 :sob:





Re: Removing deprecated code
« Reply #10, on June 10th, 2011, 07:58 PM »
I have no idea what my VPS has but my local has PHP 5.2.quiteold...

Re: Removing deprecated code
« Reply #11, on June 10th, 2011, 08:10 PM »
Thank you guys...
I can assume that everyone's at least at 5.2, that's the good news.
The bad news being that over half of you are at 5.2, so maybe 5.3 is a tad too demanding as the minimum version.
5.2 would still be good. It has JSON and ZIP by default, as well as file upload progress. But 5.3 would be great. Namespaces, lambda functions for me (I learned to love them in JS), MySQLi for Pete... Sweet.
Pete, locally you could use WampServer. It's working great for me, and the lowest default version of PHP on it is 5.3.0.

Etch was the Debian I'd installed on my server last time I had one -- a couple of years ago. I would assume if I'd kept it, I'd have updated the main packages, but apparently PHP 5.3 is only available either through recompiling, or through non-official package servers like php53.dotdeb.org... Hmm. That'd mean I'd be locked out of my own forum system, eh. Or that I'd get a good reason to try and upgrade it, obviously.

Need more configuration samples. Keep 'em coming! :)


Re: Removing deprecated code
« Reply #13, on June 10th, 2011, 08:15 PM »
I just found on my cheap shared hosting (Hostgator) that 5.2 is the default but 5.3 is available so I changed it and it is now at 5.3.6.

Re: Removing deprecated code
« Reply #14, on June 10th, 2011, 08:19 PM »
WampServer... no thanks, I've been building configurations manually for years, I'd hate to stop now ;) I may have to bump Apache too but since I checked and find myself on Apache 2.0 and PHP 5.2.6 it's probably time to update localhost anyway.

Btw, Ubuntu 10.04 LTS (Lucid Lynx) has 5.3.2 so if Ubuntu does it on an LTS release, it might not be so hard to convince others to do so...

Re: Removing deprecated code
« Reply #15, on June 10th, 2011, 08:24 PM »
Quote from Nao/Gilles on June 10th, 2011, 08:10 PM
5.2 would still be good. It has JSON and ZIP by default, as well as file upload progress. But 5.3 would be great.
yep, and simplexml which is required by the new import engine :whistle: