Removing deprecated code

Nao

  • Dadman with a boy
  • Posts: 16,061
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 #31, on June 11th, 2011, 12:46 PM »
I'm not sure PHP 5.2 is 'that' outdated, really... It's certainly not flavor-of-the-day, but it's still very much usable.
Using PHP 4 definitely is outdated, though. By 10 years :P

Re: Removing deprecated code
« Reply #32, on June 11th, 2011, 01:17 PM »
Well, in this era, a host that doesn't update its "major product" (PHP environment) in 2 years, IHMO is a bad host...


Re: Removing deprecated code
« Reply #34, on June 11th, 2011, 07:49 PM »
Is there a reason they might not have updated?  Is 5.3 a major memory upgrade as well or some other reason to give it a pass like most of us did on Vista?

Re: Removing deprecated code
« Reply #35, on June 11th, 2011, 07:50 PM »
There are some backwards incompatible changes in 5.3 versus earlier, but nothing that affects properly written code and for the benefits (and performance enhancements) it's worth making the move.

Re: Removing deprecated code
« Reply #36, on June 11th, 2011, 09:02 PM »
Many personal VPS and hosts use Centos 5.x which uses the PHP 5.2.17. One of the big holdups to php 5.3 has been there isn't a pear package that runs with 5.3, so a lot of programs that need it like APC cache, etc don't work without doing custom compiles. Many hosts also provide mail interfaces (squirel mail, roundcode, etc) which all fail with 5.3

Once Centos 6 makes the air, then php 5.3 will have good support.

Re: Removing deprecated code
« Reply #37, on June 11th, 2011, 09:30 PM »
Ahhh, yes, my host has the Squirrel and a couple other mail interfaces.

Re: Removing deprecated code
« Reply #38, on June 11th, 2011, 09:53 PM »
Quote from pgordemer on June 11th, 2011, 09:02 PM
Many personal VPS and hosts use Centos 5.x which uses the PHP 5.2.17. One of the big holdups to php 5.3 has been there isn't a pear package that runs with 5.3, so a lot of programs that need it like APC cache, etc don't work without doing custom compiles. Many hosts also provide mail interfaces (squirel mail, roundcode, etc) which all fail with 5.3

Once Centos 6 makes the air, then php 5.3 will have good support.
Um you do know if your running Centos 5.6 you can use php 5.3 without having to use an external repo so you really don't have to wait for Centos 6.0.


Re: Removing deprecated code
« Reply #40, on June 12th, 2011, 05:25 AM »
Quote from Mr. Huckabunghaga on June 11th, 2011, 10:17 PM
Or you can just compile, which is quite easy.
I do know that, but using APC cache on the system running a ton of sites with heavy PHP is something I can not afford to loose at the moment.

In either case I was making a generic statement about many hosts out there using Centos and premade packages as part of CPanel, HCMS, Virtualmin, etc....


Re: Removing deprecated code
« Reply #41, on June 12th, 2011, 10:28 AM »
AFAIK cPanel, Directadmin etc install PHP/MySQL etc on their own and don't rely on system packages, and they are generally updated within a week of release.

Re: Removing deprecated code
« Reply #42, on June 15th, 2011, 12:07 PM »
Okay, so now that we've established everyone here is running at least 5.2.x, we can safely require 5.2. It's better than nothing!

As to the minimum minor version... What should it be? XenForo is 5.2.4. I considered it bold last year, but six months later I just see it as normal ;) I don't have the time to go through the PHP 5.2.x changelog and see whether some interesting bug fixes were applied later in the process.

Re: Removing deprecated code
« Reply #43, on June 15th, 2011, 12:53 PM »
The main reason XF is 5.2.4 is because of its dependencies with respect to Zend Framework components. (Please, dear god, never let us go down that road. That road is the path to madness, from experience.)

Anyone using 5.2.x should be using 5.2.17 on a production environment unless they know for certain they're using a 64 bit build of PHP, otherwise they are at trivial risk of DDoS from floating point mishandling.


Re: Removing deprecated code
« Reply #45, on June 17th, 2011, 05:32 PM »
My most outdated VPS is:
php 5.2.6-1 on Lenny
mysql 5.0.51a on Lenny

My most recent VPS is:
php 5.3.3-7 on Squeeze
mysql 5.1.49 on Squeeze

And, in all honesty, nothing I own ever falls a major version behind Debian's current stable distribution for more than 6-9 months. So 5.3/5 sounds good to me. I've only got one Lenny VPS and it is going to get nuked in ~3 months when I move the site in my sig.