Extension compatibility 3.1 - 3.2

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.
User avatar
John P
Posts: 157
Joined: Sun Nov 04, 2012 7:39 am
Location: Netherlands
Contact:

Extension compatibility 3.1 - 3.2

Post by John P »

In my extension tests on a phbb3.2 board I found two little problems until now.
Using dbtools is changed and in metadata_manager the user object is deleted.

Does it stay this way or is there a workaround for this in future?

CHItA
Development Team
Development Team
Posts: 169
Joined: Thu Mar 12, 2015 1:43 pm
Location: Budapest, Hungary

Re: Extension compatibility 3.1 - 3.2

Post by CHItA »

This will stay this way, as language string/file handling got its own service in 3.2 (phpbb\language\language) and we use that rather than the user service for language handling. Also the user::lang() method is deprecated, and will be removed in 4.0.

In general, we kept BC of events (so if an event doesn't provide the data that it did in 3.1, then that is most likely a bug, and please report it), but for all the other interface changes that broke BC, those were (intentional) design decisions we made therefore those will not change in the (near) future.

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

Re: Extension compatibility 3.1 - 3.2

Post by John P »

How to have the notification system in extensions for both version 3.1 and 3.2
My extensions uses the notificationsystem to warn users.
How can I have only one extension version for both phpbb versions?

User avatar
3Di
Registered User
Posts: 951
Joined: Tue Nov 01, 2005 9:50 pm
Location: Milano 🇮🇹 Frankfurt 🇩🇪
Contact:

Re: Extension compatibility 3.1 - 3.2

Post by 3Di »

John P wrote: Sun Apr 24, 2016 4:18 pm How to have the notification system in extensions for both version 3.1 and 3.2
My extensions uses the notificationsystem to warn users.
How can I have only one extension version for both phpbb versions?

Code: Select all

	if ($ascraeus)
	{
		// your code here..
	}
	else if ($rhea)
	{
		// your code here..
	}
	else
	{
		// your code here..
	}

🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades

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

Re: Extension compatibility 3.1 - 3.2

Post by John P »

That's not the problem, i was more referring to constructor and service files notification.yml for example.

User avatar
3Di
Registered User
Posts: 951
Joined: Tue Nov 01, 2005 9:50 pm
Location: Milano 🇮🇹 Frankfurt 🇩🇪
Contact:

Re: Extension compatibility 3.1 - 3.2

Post by 3Di »

The same type of ifelse conditional could be done whithin configuration files.

See an example here:
https://github.com/VSEphpbb/phpbb-ext-s ... s.yml.twig
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades

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

Re: Extension compatibility 3.1 - 3.2

Post by MattF »

3Di wrote: Mon Apr 25, 2016 6:48 pm The same type of ifelse conditional could be done whithin configuration files.

See an example here:
https://github.com/VSEphpbb/phpbb-ext-s ... s.yml.twig
That's not correct. The file you linked to is treated as a template file. You can not do PHP or template logic inside of real config files.

As for the OP, regarding notifications, you need to make a new version of your extension for the 3.2.x branch...that's not backwards compatible. There's a big stickied topic on this in the ext writers forum.
Has an irascible disposition.

User avatar
pierredu
Registered User
Posts: 44
Joined: Sat Dec 05, 2015 7:21 am

Re: Extension compatibility 3.1 - 3.2

Post by pierredu »

Im some situations where there is a single little difference, you can have conditional lines in the services.yml, using the syntax - '@?files.factory'. I did it in my glossary extension to cope with the uploading differences between 3.1.x and 3.2.x. That way, I can keep a single code base.

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

Re: Extension compatibility 3.1 - 3.2

Post by John P »

Thanks Pierre, I'm going to look at it.

It's bad, if we, only for notifications, have to maintain two versions. The phpbb team should also think about all the work they generate with their versions in just so short time. Personnally I have much clients who stayed on 3.0, waiting 3.1 will be good and stable with enough extensions and now don't know anymore what to do. Wait for 3.2 but now reading about extensions not working on 3.2 or only for 3.1 etc.
This is not healthy I believe.

juliokr
Registered User
Posts: 37
Joined: Fri Mar 18, 2016 1:05 pm

Re: Extension compatibility 3.1 - 3.2

Post by juliokr »

John P wrote: Thu Apr 28, 2016 7:12 pm Personnally I have much clients who stayed on 3.0, waiting 3.1 will be good and stable with enough extensions and now don't know anymore what to do. Wait for 3.2 but now reading about extensions not working on 3.2 or only for 3.1 etc.
This is not healthy I believe.
It's not so "healthy" to stay with 3.0.x (not compatible with mobile devices) And for to be compatible with the latest version of (PHP) PHP7 must change to 3.2

Post Reply