CLI / Console

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

CLI / Console

Post by MichaelC »

Currently we have a develop/ file in the repository which is stripped out when building. This contains many files for use on the CLI to perform actions like enabling/disabling/purging extensions. Many of these things could be useful in phpBB itself.

So instead of stripping them out, they should be available in the phpBB package.

The best way to do this is create a `console` file (.php or no extension) which, using the symfony console component, can run commands from many parts of phpBB, including extensions. It is very easy to add new commands.

This can help assist the support team in fixing things on boards (this might even reduce the need to install the whole STK as some actions could be added onto this, i.e. resetting passwords, creating users, making users founder or just disabling extensions that have made it impossible to access the ACP [and therefore the extensions admin interface] etc.), more advanced phpBB users and sites using deployment scripts all in addition to the current usage of phpBB core development.

Comments?
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: CLI / Console

Post by imkingdavid »

I'm not sure all of the tools in the develop directory need to be made available in the main package. The extensions tool is helpful, and maybe a couple of other might be, but we should at the very least determine which ones really need to be included in the package. We could add a number of stk-type tools, as you mentioned, but I'm not sure all of the current ones need to be there by default.

As for including the Symfony console component, +1.
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: CLI / Console

Post by MichaelC »

Ultimately, what difference does it make by including all of them (although obviously not the python or shell ones) beyond a few KB? A user won't even know the command exists unless they need it.

Although, some of the develop scripts seem to be a bit of a one-time use (i.e. remove-php-end-tags.py) and they should either be removed or left as they are.
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.

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

Re: CLI / Console

Post by Oleg »

MichaelC wrote:Ultimately, what difference does it make by including all of them
Security concerns? I would not want existing develop scripts in my webroot.

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

Re: CLI / Console

Post by MichaelC »

Oleg wrote:
MichaelC wrote:Ultimately, what difference does it make by including all of them
Security concerns? I would not want existing develop scripts in my webroot.
It can only be run via console, and if someone has CLI access all they need to do is upload a file (or change an existing one) and run it to achieve the same effect.
The console file is obviously only executable via CLI.
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
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Berlin, Germany
Contact:

Re: CLI / Console

Post by naderman »

I think it'd be great to make some tools available via console and I think we should use the Symfony Console component for that. However I also agree that a lot of the develop tools are not useful for maintenance of the forum.

For example it'd be great to provide the db updater also as a cli tool in the future, rather than just having a page that has to be loaded through a web browser for no reason.

Post Reply