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

Extension compatibility 3.1 - 3.2

Post by John P » Tue Oct 20, 2015 7:25 pm

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: 128
Joined: Thu Mar 12, 2015 1:43 pm
Location: Budapest, Hungary

Re: Extension compatibility 3.1 - 3.2

Post by CHItA » Tue Oct 20, 2015 9:22 pm

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: 156
Joined: Sun Nov 04, 2012 7:39 am
Location: Netherlands
Contact:

Re: Extension compatibility 3.1 - 3.2

Post by John P » 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?

User avatar
3Di
Registered User
Posts: 694
Joined: Tue Nov 01, 2005 9:50 pm
Location: Milano (I) Frankfurt (D)
Contact:

Re: Extension compatibility 3.1 - 3.2

Post by 3Di » Mon Apr 25, 2016 12:05 am

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..
	}

Want to compensate me for my interest? Don't ask me, just do it
I'm available for custom phpBB jobs, you can PM me the details.
New: my Live Board, Extensions and Tools for phpBB - Men at works.

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 Apr 25, 2016 6:08 am

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

User avatar
3Di
Registered User
Posts: 694
Joined: Tue Nov 01, 2005 9:50 pm
Location: Milano (I) Frankfurt (D)
Contact:

Re: Extension compatibility 3.1 - 3.2

Post by 3Di » 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
Want to compensate me for my interest? Don't ask me, just do it
I'm available for custom phpBB jobs, you can PM me the details.
New: my Live Board, Extensions and Tools for phpBB - Men at works.

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 » Wed Apr 27, 2016 5:32 pm

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: 33
Joined: Sat Dec 05, 2015 7:21 am

Re: Extension compatibility 3.1 - 3.2

Post by pierredu » Thu Apr 28, 2016 8:00 am

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: 156
Joined: Sun Nov 04, 2012 7:39 am
Location: Netherlands
Contact:

Re: Extension compatibility 3.1 - 3.2

Post by John P » Thu Apr 28, 2016 7:12 pm

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 » Thu Apr 28, 2016 7:48 pm

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