Extension compatibility 3.1 - 3.2

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.2/Rhea followed by 3.3.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.1. If you need support for phpBB 3.1 please visit the 3.1.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.
User avatar
david63
Registered User
Posts: 215
Joined: Mon Feb 07, 2005 7:23 am
Location: Lancashire, UK

Re: Extension compatibility 3.1 - 3.2

Post by david63 » Fri Apr 29, 2016 10:21 am

RMcGirr83 wrote:
Fri Apr 29, 2016 10:18 am
Wonder how the CDB will handle that
I'm not allowed to comment as doing so I would get my knuckles rapped (again)!
David
Remember: You only know what you know -
and you do not know what you do not know!

User avatar
John P
Posts: 156
Joined: Sun Nov 04, 2012 7:39 am
Location: Netherlands
Contact:

Re: Extension compatibility 3.1 - 3.2

Post by John P » Mon May 23, 2016 7:08 pm

Avatar drivers 3.2 need a - '@upload_imagesize' in their config file as this isn't required in 3.1.
I was hoping for an answer about rmcgirr83 question earlier.

User avatar
VSE
Extension Customisations
Extension Customisations
Posts: 670
Joined: Mon Mar 08, 2010 9:18 am

Re: Extension compatibility 3.1 - 3.2

Post by VSE » Tue May 24, 2016 4:40 pm

John P wrote:
Mon May 23, 2016 7:08 pm
Avatar drivers 3.2 need a - '@upload_imagesize' in their config file as this isn't required in 3.1.
I was hoping for an answer about rmcgirr83 question earlier.
If you want to write clean concise code, then in some cases where phpBB 3.2 has changes that break backwards compatibility, you will just have to start a new version/branch of your extension for 3.2.x, while maintaining a separate branch/version for 3.1.x....just like the way phpBB itself is maintained.

If you don't mind ugly code, then you could do version checks on the PHPBB_VERSION constant, and use conditions to generate code required for either 3.1.x or 3.2.x, depending on what the board version is. Sort of like the Quick Install. As for services, they can be made optional and null.

The best approach is if a simple tweak here and there can keep your ext B.C. then go for it. Otherwise, just go with 2 versions until 3.1 goes EOL. You're better off looking towards the future than trying to keep things well in the past (which is what has made a real mess of Quick Install's codebase).

As per Rich's question, I think it goes without saying that if you're developing an ext for both 3.1 and 3.2, you should be making sure it works on the current stable releases of each of those.
Has an irascible disposition.

Post Reply