Post by rph » Mon Sep 15, 2014 2:57 am

RFC: Make PHP 5.4 OpenCart's Minimum Version

PHP 5.3, the minimum version for OpenCart 2.0-dev, reached end of life on August 14, 2014. This means it will no longer receive security updates. Migrating OpenCart to PHP 5.4 allows users to receive security updates through 2015 while providing developers new tools. (The current PHP version as of this RFC is 5.6.)

Advantages

Powerful New Developer Features Have Been Added

As OpenCart now supports a built-in modification system adding PHP 5.4 support would allow developers to take advantage of the features that were added or improved from PHP 5.3. They include:
  • Array shorthand
  • Array dereferencing
  • Closures/anonymous functions
Additionally old security risks like register_globals and magic_quotes have been removed so OpenCart will no longer need to disable them.

No Core Code Changes Are Required

OpenCart 2.0 is already compatible with PHP 5.4. No additional code modification is needed beyond updating version_compare() in startup.php.

Support For PHP 5.3 Has Been Removed From Developer Tools

PHP 5.3 is no longer available in many popular AMP stacks including XAMPP, WAMP, MAMP, and AMPPS. Developers who use those solutions will not be able to detect backward compatibility breaks in their code.

Many Projects Have Migrated or Are Migrating To PHP 5.4

Popular software such as Magento, Joomla, Drupal 8, and Laravel already use PHP 5.4. More projects are switching every day. By requiring PHP 5.4 OpenCart would signal its commitment to modern web development.

PHP 5.4 Is Common On Many Hosts

Some of the largest shared hosts like GoDaddy, Hostgator, Bluehost, 1 & 1, and Dreamhost already come with PHP 5.4 as default or available for use. It's also distributed through web control panels like WHM/cPanel and Plesk.

OpenCart 2.0 Provides A Good "Break" Point

OpenCart 2.0 is an opportune time to introduce this change as several other backwards compatibility breaks are already being introduced.

Cons

Some Hosts May Lag

Low end hosts can be very slow to upgrade software. It may be best to encourage users to migrate away from these hosts as they generally lack in security and adequate resources to host an OpenCart site.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by Qphoria » Mon Sep 15, 2014 9:34 pm

I agree with this. 5.4 is the new baseline and 5.5 will remove mysql completely which opencart has already done.
So this is a good time to put a solid break in all the old stuff.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Johnathan » Mon Sep 15, 2014 11:38 pm

+1, good suggestion

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by Dhaupin » Sat Sep 20, 2014 8:17 am

+1 I also agree with this - its such a convenient time to do this before 2.0. Old OC seems to run ok on 5.4 so legacy folks could still upgrade PHP for running 2.0 even as just testing.

Ive seen those reluctant hosts too - If they say no, bring up this: if upgrading to 5.4 would break other apps on other accounts on your CentOS VPS/shared servers, check out CloudLinux - you can choose PHP version (and tons more) based on app account. Users at cPanel level can choose between PHP versions/packages that you as a host set up.

https://creadev.org | support@creadev.org - Opencart Extensions, Integrations, & Development. Made in the USA.


User avatar
Active Member

Posts

Joined
Tue May 13, 2014 3:45 am
Location - PA

Post by Doorzy » Mon Sep 29, 2014 4:23 am

I think it's crazy for a commercial host to still offer 5.3 at this point. 5.6 is the current stable of PHP while 5.5 and 5.4 continue to be supported. 5.3 no longer has any support and any security related issue will not be fixed. This makes for insecure and unstable systems. 5.4 should be the minimum.

If it matters, as of a few months ago Magento requires 5.4 or higher and they are very conservative in their decisions.

Newbie

Posts

Joined
Sun Jan 26, 2014 2:37 am

Post by budgetneon » Thu Oct 09, 2014 4:02 am

I see that this didn't actually make it into opencart 2.0.

startup.php is still looking for php 5.3.

Any chance that will change?

New member

Posts

Joined
Sat Sep 20, 2014 11:32 pm


Post by rph » Thu Oct 09, 2014 6:11 am

Doubt it.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska
Who is online

Users browsing this forum: No registered users and 7 guests