? ? ? Success

User tests: Successful: Unsuccessful:

avatar wilsonge
wilsonge
14 Apr 2014

http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33612&start=0

Feature Basics

This is a helper for developers using install scripts in their extensions it allows you to:

  • Get and set parameters (method getParams and setParam available for this - you can also get all instances of a module with getInstances to help)
  • Stop users from downgrading versions (set allowDowngrades class var to true)
  • Move CLI scripts into the CLI folder (by putting the path to the cli scripts in the class var array)
  • Check for a minimum PHP and Joomla version (by setting the strings for the minimum versions in the relevant class var)
  • Remove out of date files and folders (by putting the path to the files in the class var array)

Usage

Simply by extending the helper class and setting the extension name in the form of com_foobar, mod_foobar etc. in the $this->extension class var

Testing

Try using the feature in extensions - as this is a utility class for developers there's no easy visible effects for user testing

avatar wilsonge wilsonge - open - 14 Apr 2014
avatar wilsonge wilsonge - change - 14 Apr 2014
Labels Added: ? ?
avatar brianteeman
brianteeman - comment - 14 Apr 2014

Please alpha sort the new strings

avatar wilsonge wilsonge - change - 17 Apr 2014
Title
Add a extension installer script feature
[#33612] Add a extension installer script feature
avatar brianteeman brianteeman - change - 8 Aug 2014
Description <p><a href="http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&amp;tracker_item_id=33612&amp;start=0">http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&amp;tracker_item_id=33612&amp;start=0</a></p> <h2>Feature Basics</h2> <p>This is a helper for developers using install scripts in their extensions it allows you to:</p> <ul> <li>Get and set parameters (method getParams and setParam available for this - you can also get all instances of a module with getInstances to help)</li> <li>Stop users from downgrading versions (set allowDowngrades class var to true)</li> <li>Move CLI scripts into the CLI folder (by putting the path to the cli scripts in the class var array)</li> <li>Check for a minimum PHP and Joomla version (by setting the strings for the minimum versions in the relevant class var)</li> <li>Remove out of date files and folders (by putting the path to the files in the class var array)</li> </ul><h2>Usage</h2> <p>Simply by extending the helper class and setting the extension name in the form of com_foobar, mod_foobar etc. in the <code>$this-&gt;extension</code> class var</p> <h2>Testing</h2> <p>Try using the feature in extensions - as this is a utility class for developers there's no easy visible effects for user testing</p> <p><a href="http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&amp;tracker_item_id=33612&amp;start=0">http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&amp;tracker_item_id=33612&amp;start=0</a></p> <h2>Feature Basics</h2> <p>This is a helper for developers using install scripts in their extensions it allows you to:</p> <ul class="task-list"> <li>Get and set parameters (method getParams and setParam available for this - you can also get all instances of a module with getInstances to help)</li> <li>Stop users from downgrading versions (set allowDowngrades class var to true)</li> <li>Move CLI scripts into the CLI folder (by putting the path to the cli scripts in the class var array)</li> <li>Check for a minimum PHP and Joomla version (by setting the strings for the minimum versions in the relevant class var)</li> <li>Remove out of date files and folders (by putting the path to the files in the class var array)</li> </ul><h2>Usage</h2> <p>Simply by extending the helper class and setting the extension name in the form of com_foobar, mod_foobar etc. in the <code>$this-&gt;extension</code> class var</p> <h2>Testing</h2> <p>Try using the feature in extensions - as this is a utility class for developers there's no easy visible effects for user testing</p>
Labels Added: ?
avatar nicksavov nicksavov - change - 21 Aug 2014
Labels Removed: ?
avatar brianteeman brianteeman - change - 21 Aug 2014
Status New Pending
avatar compojoom
compojoom - comment - 14 Mar 2015

Don't you think that we should find a different name for this class?
the supposed way we should use this is by extending, but extending from a helper class doesn't seem right to me. A helper class should not be extended from - it is normally something that we have just because we have no clue where to put the functionality.
I would actually prefer if you move this to the installer folder and call the class something like installerscriptbase???
Other than that - great! A lot of us have written their own installers. You are covering a lot of things. What would make it even better is if you had plugin, module & library installers there :)
Something like here: https://github.com/compojoom/lib_compojoom/blob/master/source/libraries/compojoom/installer/installer.php#L110

avatar compojoom compojoom - test_item - 14 Mar 2015 - Not tested
avatar wilsonge
wilsonge - comment - 14 Mar 2015

I'm easy as to the name of the class and it's location. Yes you're right it might well be better in libraries/cms/installer.

I considered the library, module and plugin installers but in my opinion core should be persuading people to use packages - they're getting much better in terms of core support since the standardisation we did in 3.4. What do you think?

avatar mbabker
mbabker - comment - 27 Jun 2015

@wilsonge see wilsonge#13

The helper class is renamed to JInstallerScript and I've updated 3.4 references to 3.5.

avatar mbabker
mbabker - comment - 27 Jun 2015

What would make it even better is if you had plugin, module & library installers there

I tend to agree with @wilsonge on using packages instead of extending a specific adapter to add more extensions. Admittedly there are some weaknesses in the package adapter that need to be worked on to make it more enticing for developers (i.e. one failed extension install aborts the whole thing leaving a partial package install), but I think our focus for core should be moving in that direction.

avatar joomla-cms-bot joomla-cms-bot - change - 27 Jun 2015
Labels Added: ?
avatar roland-d roland-d - change - 7 Nov 2015
Milestone Added:
avatar brianteeman brianteeman - change - 28 Feb 2016
Labels
avatar brianteeman brianteeman - change - 28 Feb 2016
Category Installation
avatar brianteeman brianteeman - change - 27 Apr 2016
Labels
avatar brianteeman brianteeman - change - 27 Apr 2016
Category Installation Installation Language & Strings
avatar wilsonge wilsonge - change - 5 May 2016
Labels
avatar joomla-cms-bot
joomla-cms-bot - comment - 5 May 2016

This PR has received new commits.

CC: @compojoom


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/3447.

avatar joomla-cms-bot
joomla-cms-bot - comment - 5 May 2016

This PR has received new commits.

CC: @compojoom


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/3447.

avatar Kubik-Rubik
Kubik-Rubik - comment - 7 May 2016

Thank you @wilsonge, great addition!

avatar Kubik-Rubik Kubik-Rubik - change - 7 May 2016
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-05-07 14:25:06
Closed_By Kubik-Rubik

Add a Comment

Login with GitHub to post a comment