Deprecating Support for PHP <= 5.2?

thread: 11 messages  |  last: about 9 years ago  |  started: tuesday, august 23, 2011, 9:18 am pdt

#1  |  Mike Ho (San Diego, CA) United States of America Qcodo Administrator
Tuesday, August 23, 2011, 9:18 AM PDT


For quite some time now, PHP has ended support for PHP 5.2 (as well as PHP 5.1).  Currently, the minimum supported version of PHP for Qcodo is 5.1.2.

With The PHP Group no longer supporting 5.2, and with no major/current linux distribution including any version of PHP prior to 5.3, I was wondering if now is the time to start moving away from PHP 5.2 and earlier, and to make 5.3 the minimum PHP version.

The advantage is that we can get rid of some no longer needed classes (e.g. the legacy version of QDateTime), and we can begin to support PHP 5.3-specific features like closures, namespaces, etc.

I'd be curious to hear everyone's thoughts.

#2  |  marcosdsanchez (Buenos Aires, Argentina) Argentina
Wednesday, August 24, 2011, 10:07 AM PDT

Agree 10000%

#3  |  Fernando Lordán (Barcelona, CAT, Spain) Spain
Wednesday, August 24, 2011, 5:38 PM PDT

Obviously it's a good idea from the development point of view: late static binding (that means easier to extend Qcodo classes), possibility of code organized in namespaces, and more.

But I think the main factor to consider is not which version is supported by the PHP group, but which version is currently being offered by the majority of hosting services in the real world. The hosting services market goes pretty behind the sofware releases. And unfortunately, when coming to websites deployments, the reality of the market matters more than the developers' desires (and that includes the desires of the PHP group).

Time is on our side, but I think this is a matter to consider carefully. Otherwise, we could be developing wonderful Qcodo applications that can be hosted almost nowhere.

Real scenario case: Just one month ago I had to release a customer website in a CentOS based hosting that offered PHP version 5.1.6. I must remark that it's not a case of ancient hosts or lack of updating, ALL CentOS 5.x distributions come with PHP 5.1.x.

The most recent CentOS 6.0 comes with PHP 5.3.2, but it was released just one month ago. So no hosting service based on CentOS is currently offering more than PHP 5.1 by default. In CentOS 5.x the PHP version can be updated, of course, but administrative rights for the host are needed and it's not a piece of cake for everyone.

In fact, CentOS is the Linux distribution that currently offers a longer support lifecycle. That means a great advantage in stability and maintenance cost for small enterprise websites, at the cost of not distributing the cutting edge versions of everything (as we're used in Ubuntu and other more domestic distributions).

#4  |  Mike Ho (San Diego, CA) United States of America Qcodo Administrator
Thursday, August 25, 2011, 10:20 AM PDT

Fernando, you definitely bring up a good point about hosting.

But I wonder -- in this day in age, with virtual hosting service providers at costs that are just barely more than shared PHP hosting providers, but with service that is significantly better (shameless plug for Media Temple, the official hosting provider of Qcodo and Quasidea =), is this as much of a problem now?

I'd be curious to hear folks' thoughts... but either way, you're right.  This is something that isn't going to happen overnight -- we do have time on our side.

#5  |  Fernando Lordán (Barcelona, CAT, Spain) Spain
Thursday, August 25, 2011, 7:03 PM PDT

I think it's not a matter of hosting cost, as customers can impose their own hosting provider for another esoteric reasons. If upgrading the host OS is needed to fulfill the development needs, the problem that arises is system customization cost. I'm considering small business, which in my experience usually don't invest any resources in customizing a private host (be it virtual or not).

I wasn't ever considering shared hostings, as I totally agree with you that virtual private hosts are a much flexible choice and cheap enough to be the first option to consider. The real case I explained was a virtual private host, in fact. The customer service provider imposed CentOS 5.5 and it provided no way to change to other OS. Although I consider that CentOS is a good choice for small business websites, in this case the PHP version supposed a problem. And the time to upgrade it wasn't provisioned, so it was a cost for me. It wasn't a Qcodo based website, but it's a good example of what can happen if the hosting provider doesn't suit the development needs, a scenario that can become frequent if developers go too ahead the market reality.

Aside the cost, having to upgrade the system software and its dependencies can be a technical issue for a considerable number of PHP small website developers, as usually they just know how to deploy a website over a LAMP/WAMP system, but aren't supposed to know how to administrate or upgrade the host.

I want to state that, as a developer, I really see and want the benefits of using PHP 5.3 specific features in Qcodo. But my experience tells me that usually developers' desires must go after market considerations.

#6  |  romcart (Redding, CA) United States of America Qcodo Core Contributor
Friday, August 26, 2011, 9:27 AM PDT

If there are substantial benefits to had by starting to use the newer PHP 5.3 features in Qcodo, would it be worth branching the code base, and having two “supported” versions of Qcodo? The legacy branch would continue to receive bug fixes, but all new feature development would happen in the master. At some point when PHP 5.3 is ubiquitous enough, support for the legacy branch could be dropped. I suppose the benefit of the newer features would have to be weighed against the extra work involved in supporting two code bases.

#7  |  Mischa Kroon (Holland) Netherlands (Holland, Europe)
Sunday, September 4, 2011, 5:34 PM PDT

I like the downward compatibility to the level of 5.1.2, I would suggest a version number spike when the downward compatibility is removed.

And the advantage should be obvious for letting go of the backward compatibility and communicated in a clear fashion so that negative feedback can be avoided as much as possible.

#8  |  Will Fastie (Baltimore, MD) United States of America
Friday, September 9, 2011, 12:21 PM PDT

I am not a Qcodo developer at the moment so my concern may not carry much weight.

The hosting issue is real. My clients host where they like as long as PHP 5+ is available. If I was using Qcodo and it suddenly required 5.3, there is simply no way I could use that version - I'd be stuck with the 5.1+ compatible version.

Of all the hosts used by my clients, only one is considering making PHP 5.3 available and it hasn't happened yet. VPS hosting is definitely taking off, but it is far being as economical as shared hosting.

I recommend caution.

#9  |  Mike Ho (San Diego, CA) United States of America Qcodo Administrator
Wednesday, September 14, 2011, 10:19 AM PDT

I think people bring up good points about CentOS and PHP 5.1 still being the “default”.

But just out of curiosity, what do people do about security issues and updates?  5.1 hasn't been supported by PHP in over 2+ years (I believe), and I know 5.2 hasn't been supported in over 1 year.  The PHP Group is pretty explicit when it says that it will no longer fix security vulnerabilities, etc. in PHP < 5.3.

So as security advisories come up (and continue to come up) in PHP < 5.3, what do these organizations do?  Simply ignore them?

I'd be curious to hear more...

#10  |  Fernando Lordán (Barcelona, CAT, Spain) Spain
Thursday, September 15, 2011, 7:55 AM PDT

I'm afraid that hosting services and little organizations valuate a stable distribution more than an armored and 200% secure one, simply because it implies less maintenance and upgrading costs. And CentOS perfectly suits that need, with its seven-year standard support lifecycle.

From an enterprise point of view, you will spend more money if you must upgrade all your servers periodically to be on the cutting edge of all software releases. A potential security breach is appreciated as a less probable cost, as any system is supposed to be secure when it's released.

Copyright © 2005 - 2021, Quasidea Development, LLC
This open-source framework for PHP is released under the terms of The MIT License.