phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

[RFC] Use composer.json for styles and track phpBB version

Publish your own request for comments or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.1/Ascraeus and 3.2/Arsia.

[RFC] Use composer.json for styles and track phpBB version

Postby Arty » Mon Apr 02, 2012 12:48 pm

Introduction

Each style has field "version" in style.cfg
Prosilver and subsilver2 use it to display phpBB version, customized styles use it to display style version that is often different from phpBB version.

To make styles more compatible with extensions, they should use the same metadata format: composer.json.

Suggestion

Original suggestion:
I suggest to split it into 2 fields:
  • style_version
  • phpbb_version


New suggestion: Use composer.json's require option to list a particular phpbb version that is required for the style to work. Use a custom composer package type (phpbb3-style since we use phpbb3-extension) for styles.

Advantages

If phpBB version is known, it makes it easier to track compatibility, allowing to warn user that style is outdated when he tries to install it and show list of outdated styles to user.

Patch for change to composer.json
http://tracker.phpbb.com/browse/PHPBB3-10824

(Merged) Patch for simple change to .cfg file
Ticket: http://tracker.phpbb.com/browse/PHPBB3-10762
Patch: https://github.com/phpbb/phpbb3/pull/706
Formerly known as CyberAlien.
User avatar
Arty
Styles Team
Styles Team
 
Posts: 796
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars

Re: [RFC] Separate style and phpBB versions in style.cfg

Postby MichaelC » Mon Apr 02, 2012 12:53 pm

+1 and the phpBB version the style is for should be shown in the ACP?
Unknown Bliss
psoTFX wrote:I went with Olympus because as I said to the teams ... "It's been one hell of a hill to climb"

No unsolicited PMs please except for quotes.
User avatar
MichaelC
Website Team
Website Team
 
Posts: 797
Joined: Thu Jan 28, 2010 6:29 pm

Re: [RFC] Separate style and phpBB versions in style.cfg

Postby Senky » Mon Apr 02, 2012 1:14 pm

+1
I would maybe also consider connecting this with Customisation Database at phpbb.com - check for newer version of style in the same way as new version of phpBB is checked on index of ACP...
Senky
Registered User
 
Posts: 222
Joined: Thu Jul 16, 2009 4:41 pm

Re: [RFC] Separate style and phpBB versions in style.cfg

Postby brunoais » Mon Apr 02, 2012 1:15 pm

I like that suggestion, also, +1.
A warning should be sent to the admins about the style being outdated, yes.
brunoais
Registered User
 
Posts: 626
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] Separate style and phpBB versions in style.cfg

Postby naderman » Wed Apr 04, 2012 5:58 pm

So with style inheritance, you can have a style which only overwrites one small template file and adds an image. It's most likely going to work with a lot of phpBB versions. Does this mean that the style will have to be updated for every phpBB version anyway? Also if you can only specify one phpBB version, the new version of a style is not going to be compatible with old versions of phpBB anymore by definition, even if it is? Or does that not matter cause we want people to upgrade immediately anyway?

Maybe rather than doing this, we should look at replacing style.cfg with the same kind of json file we will be using for extensions. I'd appreciate it if Igor, imkingdavid and whoever else was involved in that could take a look at this.
www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1649
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

Re: [RFC] Separate style and phpBB versions in style.cfg

Postby Arty » Wed Apr 04, 2012 6:04 pm

I suggest to check it only for major version changes. For example, new captchas were introduced in phpBB 3.0 a while ago, yet many styles are still not compatible with it, especially styles on third party websites that hoard all possible styles. Forum admins install such style, then wonder why registrations stopped.

naderman wrote:Maybe rather than doing this, we should look at replacing style.cfg with the same kind of json file we will be using for extensions. I'd appreciate it if Igor, imkingdavid and whoever else was involved in that could take a look at this.

I do like this idea!

Extensions will use JSON, Composer uses JSON, AJAX replies use JSON. It does make sense to change everything to JSON, including style.cfg
Formerly known as CyberAlien.
User avatar
Arty
Styles Team
Styles Team
 
Posts: 796
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars

Re: [RFC] Separate style and phpBB versions in style.cfg

Postby callumacrae » Wed Apr 04, 2012 6:04 pm

+1
"In JavaScript, there is a beautiful, elegant, highly expressive language that is buried under a steaming pile of good intentions and blunders"
—Douglas Crockford

View my MOD, phpBB Mobile
User avatar
callumacrae
Website Team
Website Team
 
Posts: 883
Joined: Tue Apr 27, 2010 9:37 am
Location: England

Re: [RFC] Separate style and phpBB versions in style.cfg

Postby igorw » Wed Apr 04, 2012 6:11 pm

IMO it makes sense for phpBB styles to specify the target phpBB version. It doesn't have to be a hard requirement, since styles will mostly work after an update, but it should warn the admin that he may want to update his style to one targeting the latest phpBB.

I don't really care what format we use for that, as long as it is consistent. IMO json and the composer.json format make sense, but we can also use the ini-format used by the cfg files currently. The most important thing is that it gets done.
User avatar
igorw
Registered User
 
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Re: [RFC] Separate style and phpBB versions in style.cfg

Postby Oleg » Wed Apr 04, 2012 6:40 pm

My understanding of the current situation is:

1. Any style or modification can break at the next minor version.
2. Support team only supports the latest version.

Until these policies are changed specifying a single compatible version seems at least sensible to me.
Oleg
3.1 Release Manager
3.1 Release Manager
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: [RFC] Separate style and phpBB versions in style.cfg

Postby MichaelC » Wed Apr 04, 2012 7:18 pm

I'd agree with using JSON.
Unknown Bliss
psoTFX wrote:I went with Olympus because as I said to the teams ... "It's been one hell of a hill to climb"

No unsolicited PMs please except for quotes.
User avatar
MichaelC
Website Team
Website Team
 
Posts: 797
Joined: Thu Jan 28, 2010 6:29 pm

Next

Return to [3.x] RFCs

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 11 guests