[#33612] Add a extension installer script feature#3447
[#33612] Add a extension installer script feature#3447Kubik-Rubik merged 22 commits intojoomla:stagingfrom
Conversation
There was a problem hiding this comment.
I would prefer
Your server does not
to
You don't
|
Please alpha sort the new strings |
There was a problem hiding this comment.
Can you explain this a bit more. Not sure I understand but from my guess the language string is not "the best"
There was a problem hiding this comment.
Which string? The final one. It's basically designed to stop people downgrading an extension version - so you can't go from extension v1.5 to 1.4 etc.
There was a problem hiding this comment.
So why not say something like "Oops it looks like you are trying to install
an older version. You can only use this method to upgrade an extension.
On 15 April 2014 00:23, George Wilson notifications@github.com wrote:
In language/en-GB/en-GB.files_joomla.sys.ini:
@@ -7,4 +7,7 @@ FILES_JOOMLA="Joomla CMS"
FILES_JOOMLA_ERROR_FILE_FOLDER="Error on deleting file or folder %s"
FILES_JOOMLA_ERROR_MANIFEST="Error on updating manifest cache: (type, element, folder, client) = (%s, %s, %s, %s)"FILES_JOOMLA_XML_DESCRIPTION="Joomla! 3 Content Management System"
+FILES_JOOMLA_ERROR_MOVE="Error on moving file %s"
+JGLOBAL_MINIMUM_PHP="You don't meet the minimum PHP version requirement of %s"
+JGLOBAL_MINIMUM_JOOMLA="You don't meet the minimum Joomla version requirement of J%s"
+JGLOBAL_INCORRECT_SEQUENCE="Incorrect version sequence. Cannot upgrade %s to %s"Which string? The final one. It's basically designed to stop people
downgrading an extension versionReply to this email directly or view it on GitHubhttps://github.com//pull/3447/files#r11613485
.
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/
There was a problem hiding this comment.
defined('_JEXEC') or die; without the comment on the previous line
There was a problem hiding this comment.
Is this REALLY only supposed to be for modules?
Also, the right doc block would be JAdapterInstance (even though we really should have an abstract JInstallerAdapter, maybe I'll pull that out of the installer refactoring branch on the projects repo)
There was a problem hiding this comment.
nope. this is based on the scripts for some of my own modules and I've forgotten to change a few docblocks
There was a problem hiding this comment.
Personal preference - Use is_file instead of JFile::exists (my rule of thumb is only use JFile for actual write operations)
There was a problem hiding this comment.
My personal preference is to use the abstraction layer whilst it's not deprecated :)
There was a problem hiding this comment.
exists() is something we should have deprecated with everything else in JFile honestly. Only advantage over just calling is_file directly is it calls JPath::clean() on the supplied path.
|
Don't you think that we should find a different name for this class? |
Conflicts: administrator/language/en-GB/en-GB.lib_joomla.ini language/en-GB/en-GB.lib_joomla.ini
470c0d2 to
779e7bc
Compare
|
I'm easy as to the name of the class and it's location. Yes you're right it might well be better in 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? |
|
@wilsonge see wilsonge#13 The helper class is renamed to |
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. |
PR updates
libraries/cms/installer/script.php
Outdated
| /** | ||
| * Base install script for use by extensions providing helper methods for common behaviours. | ||
| * | ||
| * @since 3.5 |
|
This PR has received new commits. CC: @compojoom This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/3447. |
|
This PR has received new commits. CC: @compojoom This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/3447. |
|
Thank you @wilsonge, great addition! |
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:
Usage
Simply by extending the helper class and setting the extension name in the form of com_foobar, mod_foobar etc. in the
$this->extensionclass varTesting
Try using the feature in extensions - as this is a utility class for developers there's no easy visible effects for user testing