PHP requirement

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Nicofuma
3.2 Release Manager
3.2 Release Manager
Posts: 299
Joined: Sun Apr 13, 2014 1:40 am
Location: Paris

PHP requirement

Post by Nicofuma »

Hi all,

I'd like to bump the required php version for phpBB 3.2. Currently I'm thinking of php 5.4. What do you think?
Member of the phpBB Development-Team
No Support via PM

User avatar
Elsensee
Former Team Member
Posts: 42
Joined: Sun Mar 16, 2014 1:08 pm
Location: Hamburg, Germany
Contact:

Re: PHP requirement

Post by Elsensee »

Why?

Nicofuma
3.2 Release Manager
3.2 Release Manager
Posts: 299
Joined: Sun Apr 13, 2014 1:40 am
Location: Paris

Re: PHP requirement

Post by Nicofuma »

because
  • php 5.3 is old and EOL for a year now
  • php 5.4 is security fix only and will be EOL in 21 days
  • php 5.5 is security fix only and will be EOL in 10 months
Member of the phpBB Development-Team
No Support via PM

User avatar
MattF
Extension Customisations
Extension Customisations
Posts: 675
Joined: Mon Mar 08, 2010 9:18 am

Re: PHP requirement

Post by MattF »

At least 5.3.6 IMO, since we have known issues in 3.1.x below that.

If we have any specific reason why it should be higher, I'm fine with that too. Though it may still be premature to leave the 5.3.x line yet (think shared hosts like GoDaddy on 5.3.24).
Has an irascible disposition.

User avatar
Elsensee
Former Team Member
Posts: 42
Joined: Sun Mar 16, 2014 1:08 pm
Location: Hamburg, Germany
Contact:

Re: PHP requirement

Post by Elsensee »

Do you know how many of our users still use PHP 5.3? If there are too many I wouldn't push the requirement then. ;)
Otherwise, it's ok for me.

Nicofuma
3.2 Release Manager
3.2 Release Manager
Posts: 299
Joined: Sun Apr 13, 2014 1:40 am
Location: Paris

Re: PHP requirement

Post by Nicofuma »

The thing is also that shared host like GoDaddy will never update if no one force them to. (refs GoPHP5)

About the version, we currently require 5.3.9 because that's what is required by Symfony.
And Symfony 3.0 will require php 5.5 http://symfony.com/blog/symfony-3-0-the-roadmap

P.S phpBB 3.2 will require Symfony 2.8, the next LTS and phpBB 3.3/4 may require Symfony 3.2, the following LTS
P.S2 Drupal8 requires php 5.6
Member of the phpBB Development-Team
No Support via PM

User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: PHP requirement

Post by brunoais »

I think that announcing phpBB 5.2 requiring php 5.5 now is too late. I believe you should warn with much more time in advance.
However, announcing phpBB 5.3 requiring php 5.5 seems fine to me. We might even require php 7 if it comes out this year...

User avatar
MattF
Extension Customisations
Extension Customisations
Posts: 675
Joined: Mon Mar 08, 2010 9:18 am

Re: PHP requirement

Post by MattF »

Nicofuma wrote: Sun Aug 23, 2015 8:30 pm The thing is also that shared host like GoDaddy will never update if no one force them to. (refs GoPHP5)

About the version, we currently require 5.3.9 because that's what is required by Symfony.
And Symfony 3.0 will require php 5.5 http://symfony.com/blog/symfony-3-0-the-roadmap

P.S phpBB 3.2 will require Symfony 2.8, the next LTS and phpBB 3.3/4 may require Symfony 3.2, the following LTS
P.S2 Drupal8 requires php 5.6
I've dealt with a fair share of shared hosts, and the really big ones won't care how many people ask them to update. They are immovable forces and just won't care, and can more easily tell their users to stick with phpBB 3.1 or even 3.0.

We kinda need to let what is being used out there influence our minimum version more so than what the developers at PHP are up to. Otherwise we will just wind up shrinking our user base and alienating a lot of phpBB users from upgrading to our latest version. Just look at TWIG which supports still PHP 5.2.x ;) We should make our min version req. as minimum as it can be, which I guess is currently 5.3.9.
Has an irascible disposition.

User avatar
JoshyPHP
Registered User
Posts: 381
Joined: Fri Jul 08, 2011 9:43 pm

Re: PHP requirement

Post by JoshyPHP »

VSE wrote: Mon Aug 24, 2015 6:53 am We kinda need to let what is being used out there influence our minimum version [...]
I think that targeting PHP 5.4 for phpBB 3.2 already does that, considering that PHP 5.4 will be dead by the time phpBB 3.2 is released.

Supporting obsolete, abandonned versions of PHP has a cost. Someone will pay it with time and/or money, there's no way around it. Resources spent supporting those obsolete versions of PHP will not be spent working on actual bugs or new features. And for many users, all it takes to upgrade to PHP 5.4 or PHP 5.5 is to tick a box in their hosting panel.

Personally, I've spent hours making s9e\TextFormatter work on PHP 5.3. Here's a partial list of the issues I encountered:
  • $this doesn't work in closures.
  • self::func() doesn't work in closures if the method isn't public.
  • $foo['bar'](); cannot be used.
  • $foo() doesn't work if... $foo is a closure I think? Or maybe another kind(s) of callback. I can't even remember the rules because PHP 5.3 is so, so old.
  • mb_substr() with a null length gives a different result.
  • Bad UTF-8 is handled differently (and silently) by preg_match_all().
  • Some reflection bugs.
I've hated every minute I spent on those. All of those issues have been solved a long time ago in PHP 5.4 and writing workarounds for them feels like such a wasted effort. Whenever I write something for phpBB, I have to make a conscious effort to not use the short array notation and stay clear of those PHP 5.3 issues. That too has a cost.

User avatar
bantu
3.0 Release Manager
3.0 Release Manager
Posts: 557
Joined: Thu Sep 07, 2006 11:22 am
Location: Karlsruhe, Germany
Contact:

Re: PHP requirement

Post by bantu »

Shared Hosting providers only supporting older PHP versions is one thing that has to be considered, but I wouldn't say it is an important one. I have nothing against people moving to better hosting providers in light of this (offering versions still maintained surely is better). Most important are probably the requirements of dependencies we have. New language features we might want to use someday is also something that needs to be considered. Also, supporting additional PHP branches implies an increase in test matrix complexity.

My suggestion for a trade off would probably be something like this: Support the PHP version not EOL on release of final, unless a dependency requires a larger version.

Post Reply