[RFC] Extension Managment using Composer

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
MichaelC
Development Team
Development Team
Posts: 889
Joined: Thu Jan 28, 2010 6:29 pm

[RFC] Extension Managment using Composer

Post by MichaelC »

Problem:

Despite the massive advances in 3.1 with extensions, it lacks one usability feature. There is no way to upload extensions/update easily without using FTP. Also it would be quite nice to add the ability to install extensions directly without downloading them from phpBB.com

Solution:

One of main reasons that composer was created by naderman was to be used for dependency management for phpBB - extensions and our dependencies.
We currently already use composer for our dependencies, so its a matter of adapting it to allow dependencies to be involved.

Titania would adapted to use statis and be the default repository, others could be added in the ACP interface or via CLI (I'm sure a shell script will be developed and put in develop/ adding multiple ISTs repositories).

Problem:
As I recently desribed on the composer mailing list here the issue is that editing the composer.json and composer.lock would be conflicts between issues such as the hash.

This leaves us two possible options:
  • We seperate phpBB lib from the application
    We have a single composer.json in the root of the application, which will include "require": { "phpbb/phpbb": "3.1.0" }. This would also make updating phpBB possibly a lot easier with regards to adding automated updating. Then add extensions/styles to this json file. This is along the lines of what symfony and drupal do.
  • Add functionality to composer to store deps in the DB
    This makes things easier to manage as we then don't have to edit files; however we do need to built the functionality of storing extension dependencies inside a database.
Thoughts?

NB: This will most likely not be added until 3.2, but I'm going to start at least having a look at it now (and developing) meaning it could be ready for 3.1; depending on when 3.1 alpha is released.

Ticket: http://tracker.phpbb.com/browse/PHPBB3-11150
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.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [RFC] Extension Managment using Composer

Post by DavidIQ »

What's so difficult about adding an upload form to the Extension Manager? AutoMOD has one, which I added in a while back. It simply takes in the zip file and decompresses it, making it ready for installation. I would assume the Extension Manager could do exactly that?
Image

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] Extension Managment using Composer

Post by EXreaction »

It could. Naderman decided he did not want that without composer.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [RFC] Extension Managment using Composer

Post by DavidIQ »

Not sure why composer matters. We're telling users to upload the files through FTP...why not just add the ability to upload through ACP? Sounds like a large inconvenience to me and is why it was added to AutoMOD.
Image

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

Re: [RFC] Extension Managment using Composer

Post by MichaelC »

As Nathan said, Nils said that he didn't want an upload or delete functionality added until we did the whole thing with composer.

But either way, I think composer should be added in the long run, but I think an upload form & delete functionality for now is a good idea.
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.

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC] Extension Managment using Composer

Post by imkingdavid »

In terms of including a simple upload/delete functionality, I agree that it would be a good idea to include it from the start.

As for the two options listed in the first post, does the first one require manually editing the composer.json to add extensions? If so, that is not an acceptable solution. The whole point of extensions was to remove the need for file edits. If it is being automatically edited, then that is likely the way to go so you don't have to mess with the database.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

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

Re: [RFC] Extension Managment using Composer

Post by MichaelC »

1st option (Suggested by Nils) would require it being edited yes, but it could conflict with the composer.lock file in upgrades. Hence my dislike of it.

But I agree that the DB is a safer option.
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.

User avatar
Pony99CA
Registered User
Posts: 986
Joined: Sun Feb 08, 2009 2:35 am
Location: Hollister, CA
Contact:

Re: [RFC] Extension Managment using Composer

Post by Pony99CA »

Unknown Bliss wrote:As Nathan said, Nils said that he didn't want an upload or delete functionality added until we did the whole thing with composer.

But either way, I think composer should be added in the long run, but I think an upload form & delete functionality for now is a good idea.
I agree, but are they really mutually exclusive? Couldn't we create "Composer 1.0" now which just has upload/unpack and delete built in, then add "Composer 2.0" (with dependency management and direct MOD access from the CDB and defined sites) later?

Steve

P.S. Why is it called a "Composer"?
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

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

Re: [RFC] Extension Managment using Composer

Post by MattF »

Pony99CA wrote:P.S. Why is it called a "Composer"?
Because composers write symphonies ;)
Has an irascible disposition.

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC] Extension Managment using Composer

Post by imkingdavid »

Pony99CA wrote:
Unknown Bliss wrote:As Nathan said, Nils said that he didn't want an upload or delete functionality added until we did the whole thing with composer.

But either way, I think composer should be added in the long run, but I think an upload form & delete functionality for now is a good idea.
I agree, but are they really mutually exclusive? Couldn't we create "Composer 1.0" now which just has upload/unpack and delete built in, then add "Composer 2.0" (with dependency management and direct MOD access from the CDB and defined sites) later?

Steve

P.S. Why is it called a "Composer"?
Composer is a package and dependency manager being developed, in part, by naderman. We are using it to automatically provide the dependencies used by phpBB 3.1 (i.e. some Symfony components, goutte for functional tests, etc.).

The idea is that all extensions contain a composer.json file that makes the extensions into "packages" that can be handled by Composer; it is also used internally in phpBB to provide details to the extension manager about the extension, such as the name, description, version, author(s), etc.

Eventually, this should/will allow us to connect the Extension Manager (and potentially Styles and Language Packs management) directly to the phpBB.com Customisations Database, allowing administrators to browse it and (potentially) other databases to install contributions directly from the ACP (similar to the SMF Plugin manager).

The issue is, that is currently not ready so the only way to install an extension at the moment is to physically copy the extension package/directory via FTP into an ext/ in the board root and then enable it via the Extension Manager (or the command-line tool in the develop/ directory); it then has to be removed by disabling it and then physically deleting the files via FTP as well. It would be nice to instead be able to upload and delete an extension directly from the Extension Manager in the ACP (similar to the current functionality of AutoMOD).

However, apparently naderman would like to hold off on adding the upload/delete until the Composer integration is complete. I'm not sure why, but I'm sure he has his reasons.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

Post Reply