Project:Drupal core
Version:8.x-dev
Component:base system
Category:bug report
Priority:major
Assigned:Unassigned
Status:closed (fixed)
Issue tags:Novice, PHP 5.3

Issue Summary

At the very least we should try to require PHP5.2.8 for check_plain() if it's in Debian and/or Red Hat by then.

Namespacing and lambda/enclosures make it tempting to try requiring PHP5.3. Obviously we'll have to track usage.

Change records for this issue

Comments

#1

-1

IMHO requiring PHP 5.3 would be a rush
too many hosting won't get there that soon
PHP 5.3 seems pretty unstable, even introducing new features like namespaces having huge changes/improvement between 5.3 minor versions

#2

Relates to #360605: PHP 5.3 Compatibility and #867772: Use PHP 5.3 namespaces . Among other reasons for requiring it, PHP 5.3 is now the only officially supported PHP version. Security updates are only done for PHP 5.3.

I imagine that D8 will require PHP 5.3. Can we document it and close that issue?

#3

I've already seen several web hosts switch to 5.3 as default, or offer it as an option. +1 for D8.

#4

Title:Up PHP requirements» Increase Drupal 8 Minimum PHP version to 5.3

In my searches I did not find this issue. Updating the title to make it easier to find and use. There was some conversation on #1167160: Bump Drupal 8 Minimum PHP version to 5.3 as well.

To restate what I said there....

PHP 5.3 has been our for some time and has a number of new features that would be useful for core and contrib. PHP 5.3 adoption is on an upswing with hosts making it the default. If Drupal 8 is going to be a couple years out we could start developing in PHP 5.3 now so we are on top of technology when D8 is released.

#5

@tmuras Drupal has a check for the minimum php version. So, there is a tiny amount of code to change on this issue.

#6

Title:Increase Drupal 8 Minimum PHP version to 5.3» Require PHP 5.3
Priority:normal» major

Retitling, we need to make a decision on 5.3 or not, I can't think of any minor 5.2 versions that are relevant at the moment (check_plain() was solved with 5.2.4 in 7/8 over a year ago).

Marked #1167160: Bump Drupal 8 Minimum PHP version to 5.3 as duplicate.

I'm currently in favour of requiring 5.3 and think it's worth basing the release date on this requirement (as opposed to basing the requirement on the release date).

Regardless of any features in 5.3, there's a chance that PHP 5.4 will come out during the 8.x lifecycle. This is going to mean we may have to retrofit 5.4 support into Drupal 7, we may or may not see early 5.4 releases by the time 8.x is on its way out.

I would much rather worry about supporting two major PHP versions, especially in contrib, than three - Drupal 6 supporting PHP4 all the way through to PHP 5.3 has not been an easy path.

Bumping this to 'major' - the patch is tiny but the ramifications are large.

#7

Title:Require PHP 5.3» Increase Drupal 8 Minimum PHP version to 5.3
Priority:major» normal

Whoever submits the first Drupal patch with a goto in it gets a cookie.

#8

Title:Increase Drupal 8 Minimum PHP version to 5.3» Require PHP 5.3
Priority:normal» major

Good ol' comment module not protecting from issue status changes.

#9

Title:Require PHP 5.3» Increase Drupal 8 Minimum PHP version to 5.3

I am 100% in support of this move. Remember, we're looking at what the market will look like at the end of 2012 or thereabouts. By then, 5.3 should be readily available on anything capable of running Drupal in the first place.

#10

Title:Increase Drupal 8 Minimum PHP version to 5.3» Require PHP 5.3

Argh!

#11

I didn't actually mean to change the title from mfer's, just the original one, that was also a crosspost ;)

#12

I have a very cheap host (one.com) and even they switched to php 5.3 a few months ago. (Thnx to this issue I started reading more about php 5.3, and now I'm convinced we should do this :p )

#13

Remember: goto should only be used as a break to a labelled destination. ;-)

#14

2012 is the end of the world, we have to try it and release D8, LOL

#15

+1 for PHP 5.3 only and D8
@mfer I can look at the patch

#16

Status:active» needs review
AttachmentSizeStatusTest resultOperations
576508.patch397 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 29,841 pass(es).View details

#17

+1

We already have to support 5.3, without being able to take advantages of its new features. Let's make this a D8 requirement.

#18

Do we want 5.3.0, or one of the later releases with bug fixes?

I'd say the oldest 5.3 that's used by current stable versions of: Debian, Ubuntu, Red Hat, Suse. (Those cover the vast majority of the market.)

#19

I was also thinking about requiring as high as possible version of PHP 5.3.x but I think that requiring 5.3.0 is good enough. Debian for instance has 5.3.3 but this includes security patches from 5.3.4 and 5.3.5.
We should be requiring higher version only if there are some features that we would like to use. Are there?

#20

There should be no new features in 5.3.x after 5.3.0. What there are is fewer bugs. Fewer bugs == fewer workarounds for us.

Perhaps we should commit 5.3.0 for now, and then be comfortable with bumping that requirement later if we find a bug that's fixed in 5.3.2 or some such that we don't want to have to deal with.

#21

I agreed with @Crell in #20.

We should require 5.3.0 so we can take advantage of new features. We can require a later 5.3 release if its absolutely necessary to fix a bug, but this should be avoided if possible to maintain maximum compatibility.

#22

A little research from DistroWatch:

Current releases:
RHEL 6.1 (stable): PHP 5.3.3
Debian 6.0 Squeeze (stable): PHP 5.3.3
Ubuntu 11.04 (stable): PHP 5.3.5
openSUSE 11.4 (stable): 5.3.5
Mandriva 2010.2 (stable): 5.3.4
CentOS 5.6 (stable): 5.1.6
Fedora 15 (stable): 5.3.6

Old releases:
RHEL 5.6 (oldstable): PHP 5.1.6
Debian 5.0 Lenny (oldstable): PHP 5.2.6
Ubuntu 10.10 (oldstable): PHP 5.3.3
openSUSE 11.3 (oldstable): 5.3.2
Mandriva 2010.1 (oldstable): 5.3.2
Fedora 14 (oldstable): 5.3.3

Since we don't support 5.1 anyway anymore, it looks like PHP 5.3.3 would cover every current distribution. 5.3.2 would cover every current distribution and one version back (except on Debian, where Lenny is very very old anyway and using 5.2).

I'm happy with either 5.3.2 or 5.3.3 as a target.

#23

+1 for 5.3.2 so.

#24

Status:needs review» needs work
Issue tags:+Novice

Anyone else want to update that patch to 5.3.2? Easy one to do.

#25

Status:needs work» needs review

I think I can handle that :-)

AttachmentSizeStatusTest resultOperations
576508-php-5-3-2.patch397 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 29,909 pass(es).View details

#26

Status:needs review» reviewed & tested by the community

Test bot approved!

#27

Status:reviewed & tested by the community» fixed

This is a good one to have. Committed to 8.x.

#28

Status:fixed» needs work

Patch still needs work (try running "grep -R 5\\.2 ." on a D8 checkout).

Biggest problem is probably install.php which still tells you "Drupal requires at least PHP 5.2.4", but there are others.

#29

Category:task» bug report

Now it's a bug.

#30

Assigned to:Anonymous» aspilicious

I'm on it

#31

Status:needs work» needs review

I put one todo in the code. (can someone give advice or reroll :) )
And this needs a review.
I'm wondering if this broke something...

#32

forgot patch

AttachmentSizeStatusTest resultOperations
576508-php-5-3-upgrade-31.patch6.24 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 576508-php-5-3-upgrade-31.patch.View details

#33

Assigned to:aspilicious» Anonymous

#34

Status:needs review» needs work

The last submitted patch, 576508-php-5-3-upgrade-31.patch, failed testing.

#35

Status:needs work» needs review

Lets try again

AttachmentSizeStatusTest resultOperations
576508-php-5-3-upgrade-35.patch5.88 KBIdlePASSED: [[SimpleTest]]: [MySQL] 29,897 pass(es).View details

#36

Status:needs review» needs work

+++ b/install.php
@@ -16,8 +16,8 @@
+if (version_compare(PHP_VERSION, '5.3.2') < 0) {
+  print 'Your PHP installation is too old. Drupal requires at least PHP 5.3.2. See the <a href="http://drupal.org/requirements">system requirements</a> page for more information.';
   exit;
}

Shouldn't we use DRUPAL_MINIMUM_PHP here?

Something like:

+if (version_compare(PHP_VERSION, DRUPAL_MINIMUM_PHP) < 0) {
+  print 'Your PHP installation is too old. Drupal requires at least PHP ' . DRUPAL_MINIMUM_PHP . '. See the <a href="http://drupal.org/requirements">system requirements</a> page for more information.';
   exit;
}

Powered by Dreditor.

#37

Status:needs work» needs review

DRUPAL_MINIMUM_PHP isn't available that early.

#38

To make it available we'd need to include bootstrap.inc, which (last time someone checked, at least) causes a parse error in PHP 4... see #722974-10: Install script returns a blank page for PHP4, PHP 5.1 (should display *something* instead)

Might be worth adding this fact to the code comment in install.php. (Or we could just decide to let PHP 4 users whitescreen by the time Drupal 8 comes around, but I'm not sure that's a good idea, and anyway, it's a different issue.)

#39

Updated patch.

Performed the TODO in authorize_get_filetransfer()
Tidied up drupal_error_levels()
Added a comment to install.php per #38

AttachmentSizeStatusTest resultOperations
php-5.3-tweaks.patch7.55 KBIdlePASSED: [[SimpleTest]]: [MySQL] 29,886 pass(es).View details

#40

Category:bug report» feature request

Bug report??

#41

Sun, it's a bug now because the installer tells you to use 5.2 when it now actually requires 5.3.

#42

Category:feature request» bug report

Moving back. It'd be good if we could start just rolling back patches when they're immediately found to introduce bugs then it wouldn't put the bug count higher.

#43

Patch looks good on a visual review (I haven't tested it though). One minor typo:

+// The minimum version is specified explicity, as DRUPAL_MINIMUM_PHP is not yet

Should be "explicitly".

#44

AttachmentSizeStatusTest resultOperations
php-5.3-tweaks.patch7.55 KBIdlePASSED: [[SimpleTest]]: [MySQL] 29,928 pass(es).View details

#45

Status:needs review» reviewed & tested by the community

I only tested one or two parts of this directly, but the testbot says the whole thing is good and the patch itself looks very straightforward, so I'm marking it RTBC.

#46

While PHP 5.3 is requirement there's a great ability to cleanup D8 codebase to make it compatible with True FastCGI support introduced.
Is there any issue / post at g.d.o about making Drupal compatible with FastCGI?

This ability could be illustrated with

<?php
Framework
::init();
while(
$request = FastCGI::accept()) {
 
// Process request
}
Framework::shutdown();
?>

#47

Status:reviewed & tested by the community» fixed

Committed #44 to Drupal 8. Thanks for the rigor, David.

#48

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

#49

Status:closed (fixed)» needs work
Issue tags:+Needs Documentation

Unfortunately this is the error message:

Your PHP installation is too old. Drupal requires at least PHP 5.3.2. See the system requirements page for more information.

However, http://drupal.org/requirements says:

PHP:
Drupal 5 and 6: 4.4.0 or higher (5.2 recommended)
Drupal 7: PHP 5.2.5 or higher (5.3 recommended)

#50

I updated http://drupal.org/requirements just in that one place. This is a pretty major change, and caught me by surprise. Are there other places that we should be fixing docs? Wouldn't this be called something like a major API change in midstream?

#51

Status:needs work» closed (fixed)
Issue tags:-Needs Documentation

Sorry, I'm just lost. I fooled myself checking out 8.x

#52

A note that the requirements were raised to PHP 5.3.3 as of #1321540: Convert DBTNG to namespaces; separate Drupal bits.

nobody click here