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

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
User avatar
Arty
Former Team Member
Posts: 985
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

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

Post by Arty »

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

User avatar
MichaelC
Development Team
Development Team
Posts: 889
Joined: Thu Jan 28, 2010 6:29 pm

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

Post by MichaelC »

+1 and the phpBB version the style is for should be shown in the ACP?
Formerly known as 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.

Senky
Extension Customisations
Extension Customisations
Posts: 315
Joined: Thu Jul 16, 2009 4:41 pm

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

Post by Senky »

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

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

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

Post by brunoais »

I like that suggestion, also, +1.
A warning should be sent to the admins about the style being outdated, yes.

User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Berlin, Germany
Contact:

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

Post by naderman »

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.

User avatar
Arty
Former Team Member
Posts: 985
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

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

Post by Arty »

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

User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

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

Post by callumacrae »

+1
Made by developers, for developers!
My blog

igorw
Registered User
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

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

Post by igorw »

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.

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

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

Post by Oleg »

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.

User avatar
MichaelC
Development Team
Development Team
Posts: 889
Joined: Thu Jan 28, 2010 6:29 pm

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

Post by MichaelC »

I'd agree with using JSON.
Formerly known as 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.

Post Reply