summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--UserFunctions/.gitignore3
-rw-r--r--UserFunctions/.gitreview2
-rw-r--r--UserFunctions/CODE_OF_CONDUCT.md1
-rw-r--r--UserFunctions/COPYING103
-rw-r--r--UserFunctions/Gruntfile.js21
-rw-r--r--UserFunctions/UserFunctions.i18n.php35
-rw-r--r--UserFunctions/UserFunctions.php31
-rw-r--r--UserFunctions/composer.json10
-rw-r--r--UserFunctions/composer.lock199
-rw-r--r--UserFunctions/gitinfo.json1
-rw-r--r--UserFunctions/i18n/en.json8
-rw-r--r--UserFunctions/i18n/lij.json8
-rw-r--r--UserFunctions/i18n/nb.json8
-rw-r--r--UserFunctions/i18n/oc.json8
-rw-r--r--UserFunctions/i18n/pt.json8
-rw-r--r--UserFunctions/i18n/qqq.json5
-rw-r--r--UserFunctions/i18n/sr-ec.json8
-rw-r--r--UserFunctions/package.json11
-rw-r--r--UserFunctions/vendor/autoload.php2
-rw-r--r--UserFunctions/vendor/composer/ClassLoader.php87
-rw-r--r--UserFunctions/vendor/composer/autoload_files.php2
-rw-r--r--UserFunctions/vendor/composer/autoload_namespaces.php1
-rw-r--r--UserFunctions/vendor/composer/autoload_psr4.php1
-rw-r--r--UserFunctions/vendor/composer/autoload_real.php55
-rw-r--r--UserFunctions/vendor/composer/installed.json46
-rw-r--r--UserFunctions/vendor/composer/installers/.travis.yml26
-rw-r--r--UserFunctions/vendor/composer/installers/README.md89
-rw-r--r--UserFunctions/vendor/composer/installers/composer.json35
-rw-r--r--UserFunctions/vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php8
-rw-r--r--UserFunctions/vendor/composer/installers/src/Composer/Installers/BaseInstaller.php13
-rw-r--r--UserFunctions/vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php121
-rw-r--r--UserFunctions/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php96
-rw-r--r--UserFunctions/vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php5
-rw-r--r--UserFunctions/vendor/composer/installers/src/Composer/Installers/CraftInstaller.php26
-rw-r--r--UserFunctions/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php5
-rw-r--r--UserFunctions/vendor/composer/installers/src/Composer/Installers/Installer.php48
-rw-r--r--UserFunctions/vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php2
-rw-r--r--UserFunctions/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php10
-rw-r--r--UserFunctions/vendor/composer/installers/src/Composer/Installers/OxidInstaller.php48
-rw-r--r--UserFunctions/vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php4
-rw-r--r--UserFunctions/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php2
-rw-r--r--UserFunctions/vendor/composer/installers/tests/Composer/Installers/Test/AsgardInstallerTest.php26
-rw-r--r--UserFunctions/vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php58
-rw-r--r--UserFunctions/vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php134
-rw-r--r--UserFunctions/version6
45 files changed, 1105 insertions, 321 deletions
diff --git a/UserFunctions/.gitignore b/UserFunctions/.gitignore
index 98b092a9..e62fc28b 100644
--- a/UserFunctions/.gitignore
+++ b/UserFunctions/.gitignore
@@ -1,3 +1,6 @@
+node_modules/
+vendor/
+
.svn
*~
*.kate-swp
diff --git a/UserFunctions/.gitreview b/UserFunctions/.gitreview
index 5432b845..21bf9265 100644
--- a/UserFunctions/.gitreview
+++ b/UserFunctions/.gitreview
@@ -2,4 +2,4 @@
host=gerrit.wikimedia.org
port=29418
project=mediawiki/extensions/UserFunctions.git
-defaultbranch=REL1_24
+track=1
diff --git a/UserFunctions/CODE_OF_CONDUCT.md b/UserFunctions/CODE_OF_CONDUCT.md
new file mode 100644
index 00000000..d8e5d087
--- /dev/null
+++ b/UserFunctions/CODE_OF_CONDUCT.md
@@ -0,0 +1 @@
+The development of this software is covered by a [Code of Conduct](https://www.mediawiki.org/wiki/Code_of_Conduct).
diff --git a/UserFunctions/COPYING b/UserFunctions/COPYING
new file mode 100644
index 00000000..81ec8af7
--- /dev/null
+++ b/UserFunctions/COPYING
@@ -0,0 +1,103 @@
+'''[http://www.mediawiki.org/wiki/Extension:UserFunctions UserFunctions]''' is a free, open-source extension to MediaWiki that provides a set of dynamic parser functions that trigger on the current user.
+
+Copyright (C) 2006
+
+
+The license text below "====" applies to all files within this distribution, other than those that are in a directory which contains files named "LICENSE" or "COPYING", or a subdirectory thereof. For those files, the license text contained in said file overrides any license information contained in directories of smaller depth. Alternative licenses are typically used for software that is provided by external parties, and merely packaged with this extension for convenience.
+----
+----
+
+== GNU GENERAL PUBLIC LICENSE ==
+Version 2, June 1991
+
+Copyright (C) 1989, 1991 Free Software Foundation, Inc.,<br />
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Everyone is permitted to copy and distribute verbatim copies<br />
+of this license document, but changing it is not allowed.
+
+=== Preamble ===
+The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software - to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too.
+
+When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
+
+To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
+
+For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
+
+We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
+
+Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
+
+The precise terms and conditions for copying, distribution and modification follow.
+
+=== TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ===
+
+'''0.''' This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
+
+'''1.''' You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
+
+'''2.''' You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
+
+: '''a)''' You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
+
+: '''b)''' You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
+
+: '''c)''' If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
+
+'''3.''' You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
+
+: '''a)''' Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
+
+: '''b)''' Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
+
+: '''c)''' Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
+
+If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
+
+'''4.''' You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
+
+'''5.''' You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
+
+'''6.''' Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
+
+'''7.''' If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot impose that choice.
+
+This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
+
+'''8.''' If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
+
+'''9.''' The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
+
+'''10.''' If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
+
+'''<big>NO WARRANTY</big>'''
+
+'''11.''' BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+'''12.''' IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+'''<big>END OF TERMS AND CONDITIONS</big>'''
diff --git a/UserFunctions/Gruntfile.js b/UserFunctions/Gruntfile.js
new file mode 100644
index 00000000..a45071e1
--- /dev/null
+++ b/UserFunctions/Gruntfile.js
@@ -0,0 +1,21 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+ grunt.loadNpmTasks( 'grunt-jsonlint' );
+ grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+ grunt.initConfig( {
+ banana: {
+ all: 'i18n/'
+ },
+ jsonlint: {
+ all: [
+ '**/*.json',
+ '!node_modules/**',
+ '!vendor/**'
+ ]
+ }
+ } );
+
+ grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+ grunt.registerTask( 'default', 'test' );
+};
diff --git a/UserFunctions/UserFunctions.i18n.php b/UserFunctions/UserFunctions.i18n.php
deleted file mode 100644
index 44e62bcc..00000000
--- a/UserFunctions/UserFunctions.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-/**
- * This is a backwards-compatibility shim, generated by:
- * https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = array();
-if ( !function_exists( 'wfJsonI18nShimf1b8d49fc546afa0' ) ) {
- function wfJsonI18nShimf1b8d49fc546afa0( $cache, $code, &$cachedData ) {
- $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] );
- foreach ( $codeSequence as $csCode ) {
- $fileName = dirname( __FILE__ ) . "/i18n/$csCode.json";
- if ( is_readable( $fileName ) ) {
- $data = FormatJson::decode( file_get_contents( $fileName ), true );
- foreach ( array_keys( $data ) as $key ) {
- if ( $key === '' || $key[0] === '@' ) {
- unset( $data[$key] );
- }
- }
- $cachedData['messages'] = array_merge( $data, $cachedData['messages'] );
- }
-
- $cachedData['deps'][] = new FileDependency( $fileName );
- }
- return true;
- }
-
- $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 'wfJsonI18nShimf1b8d49fc546afa0';
-}
diff --git a/UserFunctions/UserFunctions.php b/UserFunctions/UserFunctions.php
index dbf4563a..ea644436 100644
--- a/UserFunctions/UserFunctions.php
+++ b/UserFunctions/UserFunctions.php
@@ -1,9 +1,11 @@
<?php
/**
* UserFunctions extension - Provides a set of dynamic parser functions that trigger on the current user.
- * @version 2.6.0 - 2014/09/18 (Based on ParserFunctions)
+ * @version 2.7.0 - 2017/07/26 (Based on ParserFunctions)
*
- * @link http://www.mediawiki.org/wiki/Extension:UserFunctions Documentation
+ * @link https://www.mediawiki.org/wiki/Extension:UserFunctions Documentation
+ * @link https://www.mediawiki.org/wiki/Extension_talk:UserFunctions Support
+ * @link https://phabricator.wikimedia.org/diffusion/EUFU/ Source code
*
* @file UserFunctions.php
* @ingroup Extensions
@@ -16,9 +18,10 @@
* @author Toniher
* @author Uckelman
* @copyright (C) 2006 Algorithm
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
+ * @license https://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
*/
+// Ensure that the script cannot be executed outside of MediaWiki.
if ( !defined( 'MEDIAWIKI' ) ) {
die( 'This file is a MediaWiki extension, it is not a valid entry point' );
}
@@ -46,16 +49,20 @@ call_user_func( function() {
$GLOBALS['wgExtensionCredits']['parserhook'][] = array(
'path' => __FILE__,
'name' => 'UserFunctions',
- 'version' => '2.6.0',
+ 'version' => '2.7.0',
'url' => 'https://www.mediawiki.org/wiki/Extension:UserFunctions',
- 'author' => array( 'Algorithm ', 'Toniher', 'Kghbln', 'Wikinaut', 'Reedy', '...' ),
+ 'author' => array(
+ 'Ross McClure',
+ 'Toni Hermoso Pulido',
+ '...'
+ ),
'descriptionmsg' => 'userfunctions-desc',
+ 'license-name' => 'GPL-2.0+'
);
- $GLOBALS['wgAutoloadClasses']['ExtUserFunctions'] = dirname(__FILE__).'/UserFunctions_body.php';
+ $GLOBALS['wgAutoloadClasses']['ExtUserFunctions'] = __DIR__ .'/UserFunctions_body.php';
$GLOBALS['wgMessagesDirs']['UserFunctions'] = __DIR__ . '/i18n';
- $GLOBALS['wgExtensionMessagesFiles']['UserFunctions'] = dirname( __FILE__ ) . '/UserFunctions.i18n.php';
- $GLOBALS['wgExtensionMessagesFiles']['UserFunctionsMagic'] = dirname( __FILE__ ) . '/UserFunctions.i18n.magic.php';
+ $GLOBALS['wgExtensionMessagesFiles']['UserFunctionsMagic'] = __DIR__ . '/UserFunctions.i18n.magic.php';
$GLOBALS['wgHooks']['ParserFirstCallInit'][] = 'wfRegisterUserFunctions';
});
@@ -99,10 +106,10 @@ function wfRegisterUserFunctions( $parser ) {
if ( $process ) {
// These functions accept DOM-style arguments
- $parser->setFunctionHook( 'ifanon', 'ExtUserFunctions::ifanonObj', SFH_OBJECT_ARGS );
- $parser->setFunctionHook( 'ifblocked', 'ExtUserFunctions::ifblockedObj', SFH_OBJECT_ARGS );
- $parser->setFunctionHook( 'ifsysop', 'ExtUserFunctions::ifsysopObj', SFH_OBJECT_ARGS );
- $parser->setFunctionHook( 'ifingroup', 'ExtUserFunctions::ifingroupObj', SFH_OBJECT_ARGS );
+ $parser->setFunctionHook( 'ifanon', 'ExtUserFunctions::ifanonObj', Parser::SFH_OBJECT_ARGS );
+ $parser->setFunctionHook( 'ifblocked', 'ExtUserFunctions::ifblockedObj', Parser::SFH_OBJECT_ARGS );
+ $parser->setFunctionHook( 'ifsysop', 'ExtUserFunctions::ifsysopObj', Parser::SFH_OBJECT_ARGS );
+ $parser->setFunctionHook( 'ifingroup', 'ExtUserFunctions::ifingroupObj', Parser::SFH_OBJECT_ARGS );
if ($wgUFEnablePersonalDataFunctions) {
$parser->setFunctionHook( 'realname', 'ExtUserFunctions::realname' );
diff --git a/UserFunctions/composer.json b/UserFunctions/composer.json
index 316b91f7..245bc692 100644
--- a/UserFunctions/composer.json
+++ b/UserFunctions/composer.json
@@ -15,6 +15,14 @@
"autoload": {
"files": ["UserFunctions.php"],
"classmap": ["UserFunctions_body.php"]
+ },
+ "require-dev": {
+ "jakub-onderka/php-parallel-lint": "0.9.2",
+ "jakub-onderka/php-console-highlighter": "0.3.2"
+ },
+ "scripts": {
+ "test": [
+ "parallel-lint . --exclude vendor"
+ ]
}
}
-
diff --git a/UserFunctions/composer.lock b/UserFunctions/composer.lock
index b52f71bc..9d77364b 100644
--- a/UserFunctions/composer.lock
+++ b/UserFunctions/composer.lock
@@ -1,24 +1,29 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
- "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+ "This file is @generated automatically"
],
- "hash": "f0355371458d0ae325656364922974f4",
+ "hash": "d0a59e2d7d0ca4fec2d16750c5afc997",
+ "content-hash": "2a8dbb4932e99ce8d49eec4234e5d1d4",
"packages": [
{
"name": "composer/installers",
- "version": "v1.0.19",
+ "version": "v1.4.0",
"source": {
"type": "git",
"url": "https://github.com/composer/installers.git",
- "reference": "89d77bfbee79e16653f7162c86e602cc188471db"
+ "reference": "9ce17fb70e9a38dd8acff0636a29f5cf4d575c1b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/installers/zipball/89d77bfbee79e16653f7162c86e602cc188471db",
- "reference": "89d77bfbee79e16653f7162c86e602cc188471db",
+ "url": "https://api.github.com/repos/composer/installers/zipball/9ce17fb70e9a38dd8acff0636a29f5cf4d575c1b",
+ "reference": "9ce17fb70e9a38dd8acff0636a29f5cf4d575c1b",
"shasum": ""
},
+ "require": {
+ "composer-plugin-api": "^1.0"
+ },
"replace": {
"roundcube/plugin-installer": "*",
"shama/baton": "*"
@@ -27,16 +32,16 @@
"composer/composer": "1.0.*@dev",
"phpunit/phpunit": "4.1.*"
},
- "type": "composer-installer",
+ "type": "composer-plugin",
"extra": {
- "class": "Composer\\Installers\\Installer",
+ "class": "Composer\\Installers\\Plugin",
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
- "psr-0": {
- "Composer\\Installers\\": "src/"
+ "psr-4": {
+ "Composer\\Installers\\": "src/Composer/Installers"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -51,68 +56,218 @@
}
],
"description": "A multi-framework Composer library installer",
- "homepage": "http://composer.github.com/installers/",
+ "homepage": "https://composer.github.io/installers/",
"keywords": [
"Craft",
"Dolibarr",
+ "Eliasis",
"Hurad",
+ "ImageCMS",
+ "Kanboard",
+ "Lan Management System",
"MODX Evo",
+ "Mautic",
+ "Maya",
"OXID",
+ "Plentymarkets",
+ "Porto",
+ "RadPHP",
+ "SMF",
"Thelia",
"WolfCMS",
"agl",
+ "aimeos",
"annotatecms",
+ "attogram",
"bitrix",
"cakephp",
"chef",
+ "cockpit",
"codeigniter",
"concrete5",
"croogo",
"dokuwiki",
"drupal",
+ "eZ Platform",
"elgg",
+ "expressionengine",
"fuelphp",
"grav",
"installer",
+ "itop",
"joomla",
"kohana",
"laravel",
+ "lavalite",
"lithium",
"magento",
"mako",
"mediawiki",
"modulework",
"moodle",
+ "osclass",
"phpbb",
"piwik",
"ppi",
"puppet",
+ "reindex",
"roundcube",
"shopware",
"silverstripe",
+ "sydes",
"symfony",
"typo3",
"wordpress",
+ "yawik",
"zend",
"zikula"
],
- "time": "2014-11-29 01:29:17"
+ "time": "2017-08-09 07:53:48"
}
],
"packages-dev": [
-
- ],
- "aliases": [
-
+ {
+ "name": "jakub-onderka/php-console-color",
+ "version": "0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/JakubOnderka/PHP-Console-Color.git",
+ "reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/e0b393dacf7703fc36a4efc3df1435485197e6c1",
+ "reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2"
+ },
+ "require-dev": {
+ "jakub-onderka/php-code-style": "1.0",
+ "jakub-onderka/php-parallel-lint": "0.*",
+ "jakub-onderka/php-var-dump-check": "0.*",
+ "phpunit/phpunit": "3.7.*",
+ "squizlabs/php_codesniffer": "1.*"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "JakubOnderka\\PhpConsoleColor": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-2-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Jakub Onderka",
+ "email": "jakub.onderka@gmail.com",
+ "homepage": "http://www.acci.cz"
+ }
+ ],
+ "time": "2014-04-08 15:00:19"
+ },
+ {
+ "name": "jakub-onderka/php-console-highlighter",
+ "version": "v0.3.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git",
+ "reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/7daa75df45242c8d5b75a22c00a201e7954e4fb5",
+ "reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5",
+ "shasum": ""
+ },
+ "require": {
+ "jakub-onderka/php-console-color": "~0.1",
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "jakub-onderka/php-code-style": "~1.0",
+ "jakub-onderka/php-parallel-lint": "~0.5",
+ "jakub-onderka/php-var-dump-check": "~0.1",
+ "phpunit/phpunit": "~4.0",
+ "squizlabs/php_codesniffer": "~1.5"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "JakubOnderka\\PhpConsoleHighlighter": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jakub Onderka",
+ "email": "acci@acci.cz",
+ "homepage": "http://www.acci.cz/"
+ }
+ ],
+ "time": "2015-04-20 18:58:01"
+ },
+ {
+ "name": "jakub-onderka/php-parallel-lint",
+ "version": "v0.9.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/JakubOnderka/PHP-Parallel-Lint.git",
+ "reference": "2ead2e4043ab125bee9554f356e0a86742c2d4fa"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/JakubOnderka/PHP-Parallel-Lint/zipball/2ead2e4043ab125bee9554f356e0a86742c2d4fa",
+ "reference": "2ead2e4043ab125bee9554f356e0a86742c2d4fa",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "jakub-onderka/php-console-highlighter": "~0.3",
+ "nette/tester": "~1.3"
+ },
+ "suggest": {
+ "jakub-onderka/php-console-highlighter": "Highlight syntax in code snippet"
+ },
+ "bin": [
+ "parallel-lint"
+ ],
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "./"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-2-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Jakub Onderka",
+ "email": "jakub.onderka@gmail.com"
+ }
+ ],
+ "description": "This tool check syntax of PHP files about 20x faster than serial check.",
+ "homepage": "https://github.com/JakubOnderka/PHP-Parallel-Lint",
+ "time": "2015-12-15 10:42:16"
+ }
],
+ "aliases": [],
"minimum-stability": "stable",
- "stability-flags": [
-
- ],
+ "stability-flags": [],
+ "prefer-stable": false,
+ "prefer-lowest": false,
"platform": {
"php": ">=5.3.0"
},
- "platform-dev": [
-
- ]
+ "platform-dev": []
}
diff --git a/UserFunctions/gitinfo.json b/UserFunctions/gitinfo.json
new file mode 100644
index 00000000..bcc294f0
--- /dev/null
+++ b/UserFunctions/gitinfo.json
@@ -0,0 +1 @@
+{"headSHA1": "5eda8c931cf73aed496288f22a3d85192913676e\n", "head": "5eda8c931cf73aed496288f22a3d85192913676e\n", "remoteURL": "https://gerrit.wikimedia.org/r/mediawiki/extensions/UserFunctions", "branch": "5eda8c931cf73aed496288f22a3d85192913676e\n", "headCommitDate": "1501059580"} \ No newline at end of file
diff --git a/UserFunctions/i18n/en.json b/UserFunctions/i18n/en.json
index 443148cc..9183c8ca 100644
--- a/UserFunctions/i18n/en.json
+++ b/UserFunctions/i18n/en.json
@@ -1,6 +1,6 @@
{
- "@metadata": {
- "authors": []
- },
- "userfunctions-desc": "Enhance parser with user functions"
+ "@metadata": {
+ "authors": []
+ },
+ "userfunctions-desc": "Enhance parser with user functions"
}
diff --git a/UserFunctions/i18n/lij.json b/UserFunctions/i18n/lij.json
new file mode 100644
index 00000000..87d7543b
--- /dev/null
+++ b/UserFunctions/i18n/lij.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "Giromin Cangiaxo"
+ ]
+ },
+ "userfunctions-desc": "Amegiôa o parser con de fonçioin pe l'utente"
+}
diff --git a/UserFunctions/i18n/nb.json b/UserFunctions/i18n/nb.json
new file mode 100644
index 00000000..4ceea9ff
--- /dev/null
+++ b/UserFunctions/i18n/nb.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "Jon Harald Søby"
+ ]
+ },
+ "userfunctions-desc": "Utvid parseren med brukerfunksjoner"
+}
diff --git a/UserFunctions/i18n/oc.json b/UserFunctions/i18n/oc.json
new file mode 100644
index 00000000..4811974b
--- /dev/null
+++ b/UserFunctions/i18n/oc.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "Cedric31"
+ ]
+ },
+ "userfunctions-desc": "Melhora l'analizador amb de foncions d'utilizaire"
+}
diff --git a/UserFunctions/i18n/pt.json b/UserFunctions/i18n/pt.json
new file mode 100644
index 00000000..28e31fae
--- /dev/null
+++ b/UserFunctions/i18n/pt.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "Hamilton Abreu"
+ ]
+ },
+ "userfunctions-desc": "Melhora o analisador sintático com funções sobre utilizadores"
+}
diff --git a/UserFunctions/i18n/qqq.json b/UserFunctions/i18n/qqq.json
index 5f1ede19..a0431981 100644
--- a/UserFunctions/i18n/qqq.json
+++ b/UserFunctions/i18n/qqq.json
@@ -2,8 +2,9 @@
"@metadata": {
"authors": [
"Kghbln",
- "Shirayuki"
+ "Shirayuki",
+ "Umherirrender"
]
},
- "userfunctions-desc": "{{desc|name=User Functions|url=http://www.mediawiki.org/wiki/Extension:UserFunctions}}"
+ "userfunctions-desc": "{{desc|name=User Functions|url=https://www.mediawiki.org/wiki/Extension:UserFunctions}}"
}
diff --git a/UserFunctions/i18n/sr-ec.json b/UserFunctions/i18n/sr-ec.json
new file mode 100644
index 00000000..f96de5b9
--- /dev/null
+++ b/UserFunctions/i18n/sr-ec.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "Rancher"
+ ]
+ },
+ "userfunctions-desc": "Додаје корисничке функције у рашчлањивач."
+}
diff --git a/UserFunctions/package.json b/UserFunctions/package.json
new file mode 100644
index 00000000..bcf5b133
--- /dev/null
+++ b/UserFunctions/package.json
@@ -0,0 +1,11 @@
+{
+ "private": true,
+ "scripts": {
+ "test": "grunt test"
+ },
+ "devDependencies": {
+ "grunt": "1.0.1",
+ "grunt-banana-checker": "0.5.0",
+ "grunt-jsonlint": "1.1.0"
+ }
+}
diff --git a/UserFunctions/vendor/autoload.php b/UserFunctions/vendor/autoload.php
index 2a9427ad..6c1252d5 100644
--- a/UserFunctions/vendor/autoload.php
+++ b/UserFunctions/vendor/autoload.php
@@ -4,4 +4,4 @@
require_once __DIR__ . '/composer' . '/autoload_real.php';
-return ComposerAutoloaderInit14d909788b604bc541b4ab3d9e6cda9a::getLoader();
+return ComposerAutoloaderInit76f42e5ed2459038f40f17d7eef8723b::getLoader();
diff --git a/UserFunctions/vendor/composer/ClassLoader.php b/UserFunctions/vendor/composer/ClassLoader.php
index f438e319..ff6ecfb8 100644
--- a/UserFunctions/vendor/composer/ClassLoader.php
+++ b/UserFunctions/vendor/composer/ClassLoader.php
@@ -13,9 +13,7 @@
namespace Composer\Autoload;
/**
- * ClassLoader implements a PSR-0 class loader
- *
- * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
+ * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
*
* $loader = new \Composer\Autoload\ClassLoader();
*
@@ -39,6 +37,8 @@ namespace Composer\Autoload;
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
+ * @see http://www.php-fig.org/psr/psr-0/
+ * @see http://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
@@ -54,9 +54,15 @@ class ClassLoader
private $useIncludePath = false;
private $classMap = array();
+ private $classMapAuthoritative = false;
+
public function getPrefixes()
{
- return call_user_func_array('array_merge', $this->prefixesPsr0);
+ if (!empty($this->prefixesPsr0)) {
+ return call_user_func_array('array_merge', $this->prefixesPsr0);
+ }
+
+ return array();
}
public function getPrefixesPsr4()
@@ -141,8 +147,10 @@ class ClassLoader
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
- * @param array|string $paths The PSR-0 base directories
+ * @param array|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
+ *
+ * @throws \InvalidArgumentException
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
@@ -202,10 +210,13 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
- * @param string $prefix The prefix/namespace, with trailing '\\'
- * @param array|string $paths The PSR-4 base directories
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param array|string $paths The PSR-4 base directories
+ *
+ * @throws \InvalidArgumentException
*/
- public function setPsr4($prefix, $paths) {
+ public function setPsr4($prefix, $paths)
+ {
if (!$prefix) {
$this->fallbackDirsPsr4 = (array) $paths;
} else {
@@ -240,6 +251,27 @@ class ClassLoader
}
/**
+ * Turns off searching the prefix and fallback directories for classes
+ * that have not been registered with the class map.
+ *
+ * @param bool $classMapAuthoritative
+ */
+ public function setClassMapAuthoritative($classMapAuthoritative)
+ {
+ $this->classMapAuthoritative = $classMapAuthoritative;
+ }
+
+ /**
+ * Should class lookup fail if not found in the current class map?
+ *
+ * @return bool
+ */
+ public function isClassMapAuthoritative()
+ {
+ return $this->classMapAuthoritative;
+ }
+
+ /**
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
@@ -266,7 +298,7 @@ class ClassLoader
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
- include $file;
+ includeFile($file);
return true;
}
@@ -290,9 +322,29 @@ class ClassLoader
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
}
+ if ($this->classMapAuthoritative) {
+ return false;
+ }
+
+ $file = $this->findFileWithExtension($class, '.php');
+
+ // Search for Hack files if we are running on HHVM
+ if ($file === null && defined('HHVM_VERSION')) {
+ $file = $this->findFileWithExtension($class, '.hh');
+ }
+ if ($file === null) {
+ // Remember that this class does not exist.
+ return $this->classMap[$class] = false;
+ }
+
+ return $file;
+ }
+
+ private function findFileWithExtension($class, $ext)
+ {
// PSR-4 lookup
- $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . '.php';
+ $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
@@ -321,7 +373,7 @@ class ClassLoader
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
} else {
// PEAR-like class name
- $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . '.php';
+ $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
}
if (isset($this->prefixesPsr0[$first])) {
@@ -347,8 +399,15 @@ class ClassLoader
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
return $file;
}
-
- // Remember that this class does not exist.
- return $this->classMap[$class] = false;
}
}
+
+/**
+ * Scope isolated include.
+ *
+ * Prevents access to $this/self from included files.
+ */
+function includeFile($file)
+{
+ include $file;
+}
diff --git a/UserFunctions/vendor/composer/autoload_files.php b/UserFunctions/vendor/composer/autoload_files.php
index 1871fcb9..f2e06bbe 100644
--- a/UserFunctions/vendor/composer/autoload_files.php
+++ b/UserFunctions/vendor/composer/autoload_files.php
@@ -6,5 +6,5 @@ $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
- $baseDir . '/UserFunctions.php',
+ '7bb4d66942ef8c1728c8f742a0d5639d' => $baseDir . '/UserFunctions.php',
);
diff --git a/UserFunctions/vendor/composer/autoload_namespaces.php b/UserFunctions/vendor/composer/autoload_namespaces.php
index 38f805f9..b7fc0125 100644
--- a/UserFunctions/vendor/composer/autoload_namespaces.php
+++ b/UserFunctions/vendor/composer/autoload_namespaces.php
@@ -6,5 +6,4 @@ $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
- 'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src'),
);
diff --git a/UserFunctions/vendor/composer/autoload_psr4.php b/UserFunctions/vendor/composer/autoload_psr4.php
index b265c64a..12ea9ccc 100644
--- a/UserFunctions/vendor/composer/autoload_psr4.php
+++ b/UserFunctions/vendor/composer/autoload_psr4.php
@@ -6,4 +6,5 @@ $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
+ 'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src/Composer/Installers'),
);
diff --git a/UserFunctions/vendor/composer/autoload_real.php b/UserFunctions/vendor/composer/autoload_real.php
index 2b358617..c80676dd 100644
--- a/UserFunctions/vendor/composer/autoload_real.php
+++ b/UserFunctions/vendor/composer/autoload_real.php
@@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
-class ComposerAutoloaderInit14d909788b604bc541b4ab3d9e6cda9a
+class ComposerAutoloaderInit76f42e5ed2459038f40f17d7eef8723b
{
private static $loader;
@@ -19,35 +19,52 @@ class ComposerAutoloaderInit14d909788b604bc541b4ab3d9e6cda9a
return self::$loader;
}
- spl_autoload_register(array('ComposerAutoloaderInit14d909788b604bc541b4ab3d9e6cda9a', 'loadClassLoader'), true, true);
+ spl_autoload_register(array('ComposerAutoloaderInit76f42e5ed2459038f40f17d7eef8723b', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
- spl_autoload_unregister(array('ComposerAutoloaderInit14d909788b604bc541b4ab3d9e6cda9a', 'loadClassLoader'));
+ spl_autoload_unregister(array('ComposerAutoloaderInit76f42e5ed2459038f40f17d7eef8723b', 'loadClassLoader'));
- $vendorDir = dirname(__DIR__);
- $baseDir = dirname($vendorDir);
+ $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
+ if ($useStaticLoader) {
+ require_once __DIR__ . '/autoload_static.php';
- $map = require __DIR__ . '/autoload_namespaces.php';
- foreach ($map as $namespace => $path) {
- $loader->set($namespace, $path);
- }
+ call_user_func(\Composer\Autoload\ComposerStaticInit76f42e5ed2459038f40f17d7eef8723b::getInitializer($loader));
+ } else {
+ $map = require __DIR__ . '/autoload_namespaces.php';
+ foreach ($map as $namespace => $path) {
+ $loader->set($namespace, $path);
+ }
- $map = require __DIR__ . '/autoload_psr4.php';
- foreach ($map as $namespace => $path) {
- $loader->setPsr4($namespace, $path);
- }
+ $map = require __DIR__ . '/autoload_psr4.php';
+ foreach ($map as $namespace => $path) {
+ $loader->setPsr4($namespace, $path);
+ }
- $classMap = require __DIR__ . '/autoload_classmap.php';
- if ($classMap) {
- $loader->addClassMap($classMap);
+ $classMap = require __DIR__ . '/autoload_classmap.php';
+ if ($classMap) {
+ $loader->addClassMap($classMap);
+ }
}
$loader->register(true);
- $includeFiles = require __DIR__ . '/autoload_files.php';
- foreach ($includeFiles as $file) {
- require $file;
+ if ($useStaticLoader) {
+ $includeFiles = Composer\Autoload\ComposerStaticInit76f42e5ed2459038f40f17d7eef8723b::$files;
+ } else {
+ $includeFiles = require __DIR__ . '/autoload_files.php';
+ }
+ foreach ($includeFiles as $fileIdentifier => $file) {
+ composerRequire76f42e5ed2459038f40f17d7eef8723b($fileIdentifier, $file);
}
return $loader;
}
}
+
+function composerRequire76f42e5ed2459038f40f17d7eef8723b($fileIdentifier, $file)
+{
+ if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
+ require $file;
+
+ $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
+ }
+}
diff --git a/UserFunctions/vendor/composer/installed.json b/UserFunctions/vendor/composer/installed.json
index 77b7e97f..62fde783 100644
--- a/UserFunctions/vendor/composer/installed.json
+++ b/UserFunctions/vendor/composer/installed.json
@@ -1,19 +1,22 @@
[
{
"name": "composer/installers",
- "version": "v1.0.19",
- "version_normalized": "1.0.19.0",
+ "version": "v1.4.0",
+ "version_normalized": "1.4.0.0",
"source": {
"type": "git",
"url": "https://github.com/composer/installers.git",
- "reference": "89d77bfbee79e16653f7162c86e602cc188471db"
+ "reference": "9ce17fb70e9a38dd8acff0636a29f5cf4d575c1b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/installers/zipball/89d77bfbee79e16653f7162c86e602cc188471db",
- "reference": "89d77bfbee79e16653f7162c86e602cc188471db",
+ "url": "https://api.github.com/repos/composer/installers/zipball/9ce17fb70e9a38dd8acff0636a29f5cf4d575c1b",
+ "reference": "9ce17fb70e9a38dd8acff0636a29f5cf4d575c1b",
"shasum": ""
},
+ "require": {
+ "composer-plugin-api": "^1.0"
+ },
"replace": {
"roundcube/plugin-installer": "*",
"shama/baton": "*"
@@ -22,18 +25,18 @@
"composer/composer": "1.0.*@dev",
"phpunit/phpunit": "4.1.*"
},
- "time": "2014-11-29 01:29:17",
- "type": "composer-installer",
+ "time": "2017-08-09 07:53:48",
+ "type": "composer-plugin",
"extra": {
- "class": "Composer\\Installers\\Installer",
+ "class": "Composer\\Installers\\Plugin",
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"installation-source": "dist",
"autoload": {
- "psr-0": {
- "Composer\\Installers\\": "src/"
+ "psr-4": {
+ "Composer\\Installers\\": "src/Composer/Installers"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -48,48 +51,69 @@
}
],
"description": "A multi-framework Composer library installer",
- "homepage": "http://composer.github.com/installers/",
+ "homepage": "https://composer.github.io/installers/",
"keywords": [
"Craft",
"Dolibarr",
+ "Eliasis",
"Hurad",
+ "ImageCMS",
+ "Kanboard",
+ "Lan Management System",
"MODX Evo",
+ "Mautic",
+ "Maya",
"OXID",
+ "Plentymarkets",
+ "Porto",
+ "RadPHP",
+ "SMF",
"Thelia",
"WolfCMS",
"agl",
+ "aimeos",
"annotatecms",
+ "attogram",
"bitrix",
"cakephp",
"chef",
+ "cockpit",
"codeigniter",
"concrete5",
"croogo",
"dokuwiki",
"drupal",
+ "eZ Platform",
"elgg",
+ "expressionengine",
"fuelphp",
"grav",
"installer",
+ "itop",
"joomla",
"kohana",
"laravel",
+ "lavalite",
"lithium",
"magento",
"mako",
"mediawiki",
"modulework",
"moodle",
+ "osclass",
"phpbb",
"piwik",
"ppi",
"puppet",
+ "reindex",
"roundcube",
"shopware",
"silverstripe",
+ "sydes",
"symfony",
"typo3",
"wordpress",
+ "yawik",
"zend",
"zikula"
]
diff --git a/UserFunctions/vendor/composer/installers/.travis.yml b/UserFunctions/vendor/composer/installers/.travis.yml
index 81ca8e10..931191dd 100644
--- a/UserFunctions/vendor/composer/installers/.travis.yml
+++ b/UserFunctions/vendor/composer/installers/.travis.yml
@@ -1,14 +1,32 @@
language: php
+sudo: false
+
+dist: trusty
+
+git:
+ depth: 5
+
php:
- - 5.3
- 5.4
- 5.5
- 5.6
+ - 7.0
+ - 7.1
- hhvm
+ - nightly
+
+matrix:
+ include:
+ - dist: precise
+ php: 5.3
+ fast_finish: true
+ allow_failures:
+ - php: nightly
before_script:
- - curl -s http://getcomposer.org/installer | php -- --quiet
- - php composer.phar install --dev
+ - composer self-update
+ - composer install
-script: phpunit
+script:
+ - composer test
diff --git a/UserFunctions/vendor/composer/installers/README.md b/UserFunctions/vendor/composer/installers/README.md
index cd77d160..b77dbe38 100644
--- a/UserFunctions/vendor/composer/installers/README.md
+++ b/UserFunctions/vendor/composer/installers/README.md
@@ -6,11 +6,11 @@ This is for PHP package authors to require in their `composer.json`. It will
install their package to the correct location based on the specified package
type.
-The goal of `installers` is to be a simple package type to install path map.
+The goal of Installers is to be a simple package type to install path map.
Users can also customize the install path per package and package authors can
modify the package name upon installing.
-`installers` isn't intended on replacing all custom installers. If your
+Installers isn't intended on replacing all custom installers. If your
package requires special installation handling then by all means, create a
custom installer to handle it.
@@ -25,7 +25,7 @@ is not needed to install packages with these frameworks:
* Yii
* Yii2
-**Current Supported Package Types**:
+## Current Supported Package Types
> Stable types are marked as **bold**, this means that installation paths
> for those type will not be changed. Any adjustment for those types would
@@ -33,54 +33,85 @@ is not needed to install packages with these frameworks:
| Framework | Types
| --------- | -----
-| Asgard | `asgard-module`<br>`asgard-theme`
+| Aimeos | `aimeos-extension`
+| Asgard | `asgard-module`<br>`asgard-theme`
+| Attogram | `attogram-module`
| AGL | `agl-module`
+| Bonefish | `bonefish-package`
| AnnotateCms | `annotatecms-module`<br>`annotatecms-component`<br>`annotatecms-service`
-| Bitrix | `bitrix-module`<br>`bitrix-component`<br>`bitrix-theme`
+| Bitrix | `bitrix-module` (deprecated) <br>`bitrix-component` (deprecated) <br>`bitrix-theme` (deprecated) <br><br> `bitrix-d7-module` <br> `bitrix-d7-component` <br> `bitrix-d7-template`
| CakePHP 2+ | **`cakephp-plugin`**
-| Chef | `chef-recipe`<br>`chef-role`
+| Chef | `chef-cookbook`<br>`chef-role`
+| CCFramework | `ccframework-ship`<br>`ccframework-theme`
+| Cockpit | `cockpit-module`
| CodeIgniter | `codeigniter-library`<br>`codeigniter-third-party`<br>`codeigniter-module`
-| concrete5 | `concrete5-block`<br>`concrete5-package`<br>`concrete5-theme`<br>`concrete5-update`
+| concrete5 | `concrete5-core`<br>`concrete5-package`<br>`concrete5-theme`<br>`concrete5-block`<br>`concrete5-update`
| Craft | `craft-plugin`
| Croogo | `croogo-plugin`<br>`croogo-theme`
+| Decibel | `decibel-app`
| DokuWiki | `dokuwiki-plugin`<br>`dokuwiki-template`
| Dolibarr | `dolibarr-module`
-| Drupal | <b>`drupal-module`<br>`drupal-theme`</b><br>`drupal-library`<br>`drupal-profile`<br>`drupal-drush`
+| Drupal | <b>`drupal-core`<br>`drupal-module`<br>`drupal-theme`</b><br>`drupal-library`<br>`drupal-profile`<br>`drupal-drush`
| Elgg | `elgg-plugin`
+| Eliasis | `eliasis-module`
+| ExpressionEngine 3 | `ee3-addon`<br>`ee3-theme`
+| eZ Platform | `ezplatform-assets`<br>`ezplatform-meta-assets`
| FuelPHP v1.x | `fuel-module`<br>`fuel-package`<br/>`fuel-theme`
| FuelPHP v2.x | `fuelphp-component`
| Grav | `grav-plugin`<br>`grav-theme`
| Hurad | `hurad-plugin`<br>`hurad-theme`
+| ImageCMS | `imagecms-template`<br>`imagecms-module`<br>`imagecms-library`
+| iTop | `itop-extension`
| Joomla | `joomla-component`<br>`joomla-module`<br>`joomla-template`<br>`joomla-plugin`<br>`joomla-library`
-| Kirby | **`kirby-plugin`**
+| Kanboard | `kanboard-plugin`
+| Kirby | **`kirby-plugin`**<br>`kirby-field`<br>`kirby-tag`
+| KodiCMS | `kodicms-plugin`<br>`kodicms-media`
| Kohana | **`kohana-module`**
+| Lan Management System | `lms-plugin`<br>`lms-template`<br>`lms-document-template`<br>`lms-userpanel-module`
| Laravel | `laravel-library`
+| Lavalite | `lavalite-theme`<br>`lavalite-package`
| Lithium | **`lithium-library`<br>`lithium-source`**
| Magento | `magento-library`<br>`magento-skin`<br>`magento-theme`
| Mako | `mako-package`
+| Mautic | `mautic-plugin`<br>`mautic-theme`
+| Maya | `maya-module`
| MODX Evo | `modxevo-snippet`<br>`modxevo-plugin`<br>`modxevo-module`<br>`modxevo-template`<br>`modxevo-lib`
| MediaWiki | `mediawiki-extension`
| October | **`october-module`<br>`october-plugin`<br>`october-theme`**
+| OntoWiki | `ontowiki-extension`<br>`ontowiki-theme`<br>`ontowiki-translation`
| OXID | `oxid-module`<br>`oxid-theme`<br>`oxid-out`
+| Osclass | `osclass-plugin`<br>`osclass-theme`<br>`osclass-language`
| MODULEWork | `modulework-module`
| Moodle | `moodle-*` (Please [check source](https://raw.githubusercontent.com/composer/installers/master/src/Composer/Installers/MoodleInstaller.php) for all supported types)
| Piwik | `piwik-plugin`
| phpBB | `phpbb-extension`<br>`phpbb-style`<br>`phpbb-language`
| Pimcore | `pimcore-plugin`
+| Plentymarkets | `plentymarkets-plugin`
| PPI | **`ppi-module`**
| Puppet | `puppet-module`
+| Porto | `porto-container`
+| RadPHP | `radphp-bundle`
| REDAXO | `redaxo-addon`
+| ReIndex | **`reindex-plugin`** <br> **`reindex-theme`**
| Roundcube | `roundcube-plugin`
-| shopware | `shopware-backend-plugin`<br/>`shopware-core-plugin`<br/>`shopware-frontend-plugin`<br/>`shopware-theme`
+| shopware | `shopware-backend-plugin`<br/>`shopware-core-plugin`<br/>`shopware-frontend-plugin`<br/>`shopware-theme`<br/>`shopware-plugin`<br/>`shopware-frontend-theme`
| SilverStripe | `silverstripe-module`<br>`silverstripe-theme`
+| SMF | `smf-module`<br>`smf-theme`
+| SyDES | `sydes-module`<br>`sydes-theme`
| symfony1 | **`symfony1-plugin`**
| Tusk | `tusk-task`<br>`tusk-command`<br>`tusk-asset`
| TYPO3 Flow | `typo3-flow-package`<br>`typo3-flow-framework`<br>`typo3-flow-plugin`<br>`typo3-flow-site`<br>`typo3-flow-boilerplate`<br>`typo3-flow-build`
-| TYPO3 CMS | `typo3-cms-extension`
+| TYPO3 CMS | `typo3-cms-extension` (Deprecated in this package, use the [TYPO3 CMS Installers](https://packagist.org/packages/typo3/cms-composer-installers) instead)
+| UserFrosting | `userfrosting-sprinkle`
+| Vanilla | `vanilla-plugin`<br>`vanilla-theme`
+| Vgmcp | `vgmcp-bundle`<br>`vgmcp-theme`
| Wolf CMS | `wolfcms-plugin`
| WordPress | <b>`wordpress-plugin`<br>`wordpress-theme`</b><br>`wordpress-muplugin`
+| YAWIK | `yawik-module`
| Zend | `zend-library`<br>`zend-extra`<br>`zend-module`
| Zikula | `zikula-module`<br>`zikula-theme`
+| Prestashop | `prestashop-module`<br>`prestashop-theme`
+| Phifty | `phifty-bundle`<br>`phifty-framework`<br>`phifty-library`
## Example `composer.json` File
@@ -131,7 +162,20 @@ A package type can have a custom installation path with a `type:` prefix.
}
```
-This would use your custom path for each of the listed packages. The available
+You can also have the same vendor packages with a custom installation path by
+using the `vendor:` prefix.
+
+``` json
+{
+ "extra": {
+ "installer-paths": {
+ "your/custom/path/{$name}/": ["vendor:my_organization"]
+ }
+ }
+}
+```
+
+These would use your custom path for each of the listed packages. The available
variables to use in your paths are: `{$name}`, `{$vendor}`, `{$type}`.
## Custom Install Names
@@ -159,29 +203,16 @@ will allow this:
Please note the name entered into `installer-name` will be the final and will
not be inflected.
-## Contribute!
-
-* [Fork and clone](https://help.github.com/articles/fork-a-repo).
-* Run the command `php composer.phar install --dev` to install the dev
- dependencies. See [Composer](https://github.com/composer/composer#installation--usage).
-* Use the command `phpunit` to run the tests. See [PHPUnit](http://phpunit.de).
-* Create a branch, commit, push and send us a
- [pull request](https://help.github.com/articles/using-pull-requests).
+## Should we allow dynamic package types or paths? No.
-To ensure a consistent code base, you should make sure the code follows the
-[Coding Standards](http://symfony.com/doc/2.0/contributing/code/standards.html)
-which we borrowed from Symfony.
-
-If you would like to help, please take a look at the list of
-[issues](https://github.com/composer/installers/issues).
-
-### Should we allow dynamic package types or paths? No.
What are they? The ability for a package author to determine where a package
will be installed either through setting the path directly in their
`composer.json` or through a dynamic package type: `"type":
"framework-install-here"`.
It has been proposed many times. Even implemented once early on and then
-removed. `installers` won't do this because it would allow a single package
+removed. Installers won't do this because it would allow a single package
author to wipe out entire folders without the user's consent. That user would
then come here to yell at us.
+
+Anyone still wanting this capability should consider requiring https://github.com/oomphinc/composer-installers-extender.
diff --git a/UserFunctions/vendor/composer/installers/composer.json b/UserFunctions/vendor/composer/installers/composer.json
index 15fee6ed..0a7477d1 100644
--- a/UserFunctions/vendor/composer/installers/composer.json
+++ b/UserFunctions/vendor/composer/installers/composer.json
@@ -1,15 +1,18 @@
{
"name": "composer/installers",
- "type": "composer-installer",
+ "type": "composer-plugin",
"license": "MIT",
"description": "A multi-framework Composer library installer",
"keywords": [
"installer",
+ "Aimeos",
"AGL",
"AnnotateCms",
+ "Attogram",
"Bitrix",
"CakePHP",
"Chef",
+ "Cockpit",
"CodeIgniter",
"concrete5",
"Craft",
@@ -18,36 +21,54 @@
"Dolibarr",
"Drupal",
"Elgg",
+ "Eliasis",
+ "ExpressionEngine",
+ "eZ Platform",
"FuelPHP",
"Grav",
"Hurad",
+ "ImageCMS",
+ "iTop",
"Joomla",
+ "Kanboard",
"Kohana",
+ "Lan Management System",
"Laravel",
+ "Lavalite",
"Lithium",
"Magento",
"Mako",
+ "Mautic",
+ "Maya",
"MODX Evo",
"MediaWiki",
"OXID",
+ "osclass",
"MODULEWork",
"Moodle",
"Piwik",
"phpBB",
+ "Plentymarkets",
"PPI",
"Puppet",
+ "Porto",
+ "RadPHP",
+ "ReIndex",
"Roundcube",
"shopware",
"SilverStripe",
+ "SMF",
+ "SyDES",
"symfony",
"Thelia",
"TYPO3",
"WolfCMS",
"WordPress",
+ "YAWIK",
"Zend",
"Zikula"
],
- "homepage": "http://composer.github.com/installers/",
+ "homepage": "https://composer.github.io/installers/",
"authors": [
{
"name": "Kyle Robinson Young",
@@ -56,10 +77,10 @@
}
],
"autoload": {
- "psr-0": { "Composer\\Installers\\": "src/" }
+ "psr-4": { "Composer\\Installers\\": "src/Composer/Installers" }
},
"extra": {
- "class": "Composer\\Installers\\Installer",
+ "class": "Composer\\Installers\\Plugin",
"branch-alias": {
"dev-master": "1.0-dev"
}
@@ -68,8 +89,14 @@
"shama/baton": "*",
"roundcube/plugin-installer": "*"
},
+ "require": {
+ "composer-plugin-api": "^1.0"
+ },
"require-dev": {
"composer/composer": "1.0.*@dev",
"phpunit/phpunit": "4.1.*"
+ },
+ "scripts": {
+ "test": "phpunit"
}
}
diff --git a/UserFunctions/vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php b/UserFunctions/vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php
index 995ee2b4..22dad1b9 100644
--- a/UserFunctions/vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php
+++ b/UserFunctions/vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php
@@ -31,14 +31,18 @@ class AsgardInstaller extends BaseInstaller
protected function inflectPluginVars($vars)
{
- $vars['name'] = ucfirst(preg_replace('/-module/', '', $vars['name']));
+ $vars['name'] = preg_replace('/-module$/', '', $vars['name']);
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
protected function inflectThemeVars($vars)
{
- $vars['name'] = ucfirst(preg_replace('/-theme$/', '', $vars['name']));
+ $vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
diff --git a/UserFunctions/vendor/composer/installers/src/Composer/Installers/BaseInstaller.php b/UserFunctions/vendor/composer/installers/src/Composer/Installers/BaseInstaller.php
index cc27d3e2..7082bf2c 100644
--- a/UserFunctions/vendor/composer/installers/src/Composer/Installers/BaseInstaller.php
+++ b/UserFunctions/vendor/composer/installers/src/Composer/Installers/BaseInstaller.php
@@ -1,6 +1,7 @@
<?php
namespace Composer\Installers;
+use Composer\IO\IOInterface;
use Composer\Composer;
use Composer\Package\PackageInterface;
@@ -9,17 +10,20 @@ abstract class BaseInstaller
protected $locations = array();
protected $composer;
protected $package;
+ protected $io;
/**
* Initializes base installer.
*
* @param PackageInterface $package
* @param Composer $composer
+ * @param IOInterface $io
*/
- public function __construct(PackageInterface $package = null, Composer $composer = null)
+ public function __construct(PackageInterface $package = null, Composer $composer = null, IOInterface $io = null)
{
$this->composer = $composer;
$this->package = $package;
+ $this->io = $io;
}
/**
@@ -51,7 +55,7 @@ abstract class BaseInstaller
if ($this->composer->getPackage()) {
$extra = $this->composer->getPackage()->getExtra();
if (!empty($extra['installer-paths'])) {
- $customPath = $this->mapCustomInstallPaths($extra['installer-paths'], $prettyName, $type);
+ $customPath = $this->mapCustomInstallPaths($extra['installer-paths'], $prettyName, $type, $vendor);
if ($customPath !== false) {
return $this->templatePath($customPath, $availableVars);
}
@@ -116,12 +120,13 @@ abstract class BaseInstaller
* @param array $paths
* @param string $name
* @param string $type
+ * @param string $vendor = NULL
* @return string
*/
- protected function mapCustomInstallPaths(array $paths, $name, $type)
+ protected function mapCustomInstallPaths(array $paths, $name, $type, $vendor = NULL)
{
foreach ($paths as $path => $names) {
- if (in_array($name, $names) || in_array('type:' . $type, $names)) {
+ if (in_array($name, $names) || in_array('type:' . $type, $names) || in_array('vendor:' . $vendor, $names)) {
return $path;
}
}
diff --git a/UserFunctions/vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php b/UserFunctions/vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php
index 48a8367a..e80cd1e1 100644
--- a/UserFunctions/vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php
+++ b/UserFunctions/vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php
@@ -1,11 +1,126 @@
<?php
+
namespace Composer\Installers;
+use Composer\Util\Filesystem;
+
+/**
+ * Installer for Bitrix Framework. Supported types of extensions:
+ * - `bitrix-d7-module` — copy the module to directory `bitrix/modules/<vendor>.<name>`.
+ * - `bitrix-d7-component` — copy the component to directory `bitrix/components/<vendor>/<name>`.
+ * - `bitrix-d7-template` — copy the template to directory `bitrix/templates/<vendor>_<name>`.
+ *
+ * You can set custom path to directory with Bitrix kernel in `composer.json`:
+ *
+ * ```json
+ * {
+ * "extra": {
+ * "bitrix-dir": "s1/bitrix"
+ * }
+ * }
+ * ```
+ *
+ * @author Nik Samokhvalov <nik@samokhvalov.info>
+ * @author Denis Kulichkin <onexhovia@gmail.com>
+ */
class BitrixInstaller extends BaseInstaller
{
protected $locations = array(
- 'module' => 'local/modules/{$name}/',
- 'component' => 'local/components/{$name}/',
- 'theme' => 'local/templates/{$name}/'
+ 'module' => '{$bitrix_dir}/modules/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
+ 'component' => '{$bitrix_dir}/components/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
+ 'theme' => '{$bitrix_dir}/templates/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
+ 'd7-module' => '{$bitrix_dir}/modules/{$vendor}.{$name}/',
+ 'd7-component' => '{$bitrix_dir}/components/{$vendor}/{$name}/',
+ 'd7-template' => '{$bitrix_dir}/templates/{$vendor}_{$name}/',
);
+
+ /**
+ * @var array Storage for informations about duplicates at all the time of installation packages.
+ */
+ private static $checkedDuplicates = array();
+
+ /**
+ * {@inheritdoc}
+ */
+ public function inflectPackageVars($vars)
+ {
+ if ($this->composer->getPackage()) {
+ $extra = $this->composer->getPackage()->getExtra();
+
+ if (isset($extra['bitrix-dir'])) {
+ $vars['bitrix_dir'] = $extra['bitrix-dir'];
+ }
+ }
+
+ if (!isset($vars['bitrix_dir'])) {
+ $vars['bitrix_dir'] = 'bitrix';
+ }
+
+ return parent::inflectPackageVars($vars);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function templatePath($path, array $vars = array())
+ {
+ $templatePath = parent::templatePath($path, $vars);
+ $this->checkDuplicates($templatePath, $vars);
+
+ return $templatePath;
+ }
+
+ /**
+ * Duplicates search packages.
+ *
+ * @param string $path
+ * @param array $vars
+ */
+ protected function checkDuplicates($path, array $vars = array())
+ {
+ $packageType = substr($vars['type'], strlen('bitrix') + 1);
+ $localDir = explode('/', $vars['bitrix_dir']);
+ array_pop($localDir);
+ $localDir[] = 'local';
+ $localDir = implode('/', $localDir);
+
+ $oldPath = str_replace(
+ array('{$bitrix_dir}', '{$name}'),
+ array($localDir, $vars['name']),
+ $this->locations[$packageType]
+ );
+
+ if (in_array($oldPath, static::$checkedDuplicates)) {
+ return;
+ }
+
+ if ($oldPath !== $path && file_exists($oldPath) && $this->io && $this->io->isInteractive()) {
+
+ $this->io->writeError(' <error>Duplication of packages:</error>');
+ $this->io->writeError(' <info>Package ' . $oldPath . ' will be called instead package ' . $path . '</info>');
+
+ while (true) {
+ switch ($this->io->ask(' <info>Delete ' . $oldPath . ' [y,n,?]?</info> ', '?')) {
+ case 'y':
+ $fs = new Filesystem();
+ $fs->removeDirectory($oldPath);
+ break 2;
+
+ case 'n':
+ break 2;
+
+ case '?':
+ default:
+ $this->io->writeError(array(
+ ' y - delete package ' . $oldPath . ' and to continue with the installation',
+ ' n - don\'t delete and to continue with the installation',
+ ));
+ $this->io->writeError(' ? - print help');
+ break;
+ }
+ }
+ }
+
+ static::$checkedDuplicates[] = $oldPath;
+ }
}
diff --git a/UserFunctions/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php b/UserFunctions/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php
index df91a12d..96e987a2 100644
--- a/UserFunctions/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php
+++ b/UserFunctions/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php
@@ -3,8 +3,6 @@ namespace Composer\Installers;
use Composer\DependencyResolver\Pool;
use Composer\Package\PackageInterface;
-use Composer\Package\LinkConstraint\MultiConstraint;
-use Composer\Package\LinkConstraint\VersionConstraint;
class CakePHPInstaller extends BaseInstaller
{
@@ -17,6 +15,10 @@ class CakePHPInstaller extends BaseInstaller
*/
public function inflectPackageVars($vars)
{
+ if ($this->matchesCakeVersion('>=', '3.0.0')) {
+ return $vars;
+ }
+
$nameParts = explode('/', $vars['name']);
foreach ($nameParts as &$value) {
$value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
@@ -34,28 +36,12 @@ class CakePHPInstaller extends BaseInstaller
public function getLocations()
{
if ($this->matchesCakeVersion('>=', '3.0.0')) {
- $this->locations['plugin'] = 'plugins/{$name}/';
+ $this->locations['plugin'] = $this->composer->getConfig()->get('vendor-dir') . '/{$vendor}/{$name}/';
}
return $this->locations;
}
/**
- * Add installer-name for CakePHP >= 3.0.0
- *
- * @param PackageInterface $package
- * @param string $frameworkType
- * @return string
- */
- public function getInstallPath(PackageInterface $package, $frameworkType = '')
- {
- $extra = $package->getExtra();
- if (empty($extra['installer-name']) && $this->matchesCakeVersion('>=', '3.0.0')) {
- $this->setInstallerName($package);
- }
- return parent::getInstallPath($package, $frameworkType);
- }
-
- /**
* Check if CakePHP version matches against a version
*
* @param string $matcher
@@ -64,82 +50,34 @@ class CakePHPInstaller extends BaseInstaller
*/
protected function matchesCakeVersion($matcher, $version)
{
+ if (class_exists('Composer\Semver\Constraint\MultiConstraint')) {
+ $multiClass = 'Composer\Semver\Constraint\MultiConstraint';
+ $constraintClass = 'Composer\Semver\Constraint\Constraint';
+ } else {
+ $multiClass = 'Composer\Package\LinkConstraint\MultiConstraint';
+ $constraintClass = 'Composer\Package\LinkConstraint\VersionConstraint';
+ }
+
$repositoryManager = $this->composer->getRepositoryManager();
if ($repositoryManager) {
$repos = $repositoryManager->getLocalRepository();
if (!$repos) {
return false;
}
- $cake3 = new MultiConstraint(array(
- new VersionConstraint($matcher, $version),
- new VersionConstraint('!=', '9999999-dev'),
+ $cake3 = new $multiClass(array(
+ new $constraintClass($matcher, $version),
+ new $constraintClass('!=', '9999999-dev'),
));
$pool = new Pool('dev');
$pool->addRepository($repos);
$packages = $pool->whatProvides('cakephp/cakephp');
foreach ($packages as $package) {
- $installed = new VersionConstraint('=', $package->getVersion());
+ $installed = new $constraintClass('=', $package->getVersion());
if ($cake3->matches($installed)) {
return true;
- break;
}
}
}
return false;
}
-
- /**
- * Set installer-name based on namespace for the source path checking in
- * following order:
- *
- * - With only one autoload path the namespace for that path will be used.
- * - With multiple paths if path 'src' exists it's namespace will be used.
- * - With two autoload paths provided, the namespace of path other than
- * 'tests' will be used.
- *
- * No installer-name is set if PSR-4 autoload block is not found or if none
- * of the above conditions are met.
- *
- * @param PackageInterface $package
- */
- protected function setInstallerName(PackageInterface $package)
- {
- $primaryNS = null;
- $autoLoad = $package->getAutoload();
- foreach ($autoLoad as $type => $typeConfig) {
- if ($type !== 'psr-4') {
- continue;
- }
- $count = count($typeConfig);
-
- if ($count === 1) {
- $primaryNS = key($typeConfig);
- break;
- }
-
- $matches = preg_grep('#^(\./)?src/?$#', $typeConfig);
- if ($matches) {
- $primaryNS = key($matches);
- break;
- }
-
- if ($count === 2) {
- reset($typeConfig);
- if (preg_match('#^(\./)?tests/?$#', current($typeConfig))) {
- next($typeConfig);
- }
- $primaryNS = key($typeConfig);
- break;
- }
-
- break;
- }
-
- if ($primaryNS) {
- $package->setExtra(array(
- 'installer-name' => trim(str_replace('\\', '/', $primaryNS), '/')
- ));
- }
- }
-
}
diff --git a/UserFunctions/vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php b/UserFunctions/vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php
index 4d398a44..5c01bafd 100644
--- a/UserFunctions/vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php
+++ b/UserFunctions/vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php
@@ -4,9 +4,10 @@ namespace Composer\Installers;
class Concrete5Installer extends BaseInstaller
{
protected $locations = array(
- 'block' => 'blocks/{$name}/',
+ 'core' => 'concrete/',
+ 'block' => 'application/blocks/{$name}/',
'package' => 'packages/{$name}/',
- 'theme' => 'themes/{$name}/',
+ 'theme' => 'application/themes/{$name}/',
'update' => 'updates/{$name}/',
);
}
diff --git a/UserFunctions/vendor/composer/installers/src/Composer/Installers/CraftInstaller.php b/UserFunctions/vendor/composer/installers/src/Composer/Installers/CraftInstaller.php
index dc3be8d1..d37a77ae 100644
--- a/UserFunctions/vendor/composer/installers/src/Composer/Installers/CraftInstaller.php
+++ b/UserFunctions/vendor/composer/installers/src/Composer/Installers/CraftInstaller.php
@@ -1,9 +1,35 @@
<?php
namespace Composer\Installers;
+/**
+ * Installer for Craft Plugins
+ */
class CraftInstaller extends BaseInstaller
{
+ const NAME_PREFIX = 'craft';
+ const NAME_SUFFIX = 'plugin';
+
protected $locations = array(
'plugin' => 'craft/plugins/{$name}/',
);
+
+ /**
+ * Strip `craft-` prefix and/or `-plugin` suffix from package names
+ *
+ * @param array $vars
+ *
+ * @return array
+ */
+ final public function inflectPackageVars($vars)
+ {
+ return $this->inflectPluginVars($vars);
+ }
+
+ private function inflectPluginVars($vars)
+ {
+ $vars['name'] = preg_replace('/-' . self::NAME_SUFFIX . '$/i', '', $vars['name']);
+ $vars['name'] = preg_replace('/^' . self::NAME_PREFIX . '-/i', '', $vars['name']);
+
+ return $vars;
+ }
}
diff --git a/UserFunctions/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php b/UserFunctions/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php
index 522606a6..a41ee2e1 100644
--- a/UserFunctions/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php
+++ b/UserFunctions/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php
@@ -4,10 +4,13 @@ namespace Composer\Installers;
class DrupalInstaller extends BaseInstaller
{
protected $locations = array(
+ 'core' => 'core/',
'module' => 'modules/{$name}/',
'theme' => 'themes/{$name}/',
- 'library' => 'libraries/{$name}/',
+ 'library' => 'libraries/{$name}/',
'profile' => 'profiles/{$name}/',
'drush' => 'drush/{$name}/',
+ 'custom-theme' => 'themes/custom/{$name}/',
+ 'custom-module' => 'modules/custom/{$name}',
);
}
diff --git a/UserFunctions/vendor/composer/installers/src/Composer/Installers/Installer.php b/UserFunctions/vendor/composer/installers/src/Composer/Installers/Installer.php
index 084ff628..8356b8c9 100644
--- a/UserFunctions/vendor/composer/installers/src/Composer/Installers/Installer.php
+++ b/UserFunctions/vendor/composer/installers/src/Composer/Installers/Installer.php
@@ -1,6 +1,7 @@
<?php
namespace Composer\Installers;
+use Composer\IO\IOInterface;
use Composer\Installer\LibraryInstaller;
use Composer\Package\PackageInterface;
use Composer\Repository\InstalledRepositoryInterface;
@@ -13,57 +14,88 @@ class Installer extends LibraryInstaller
* @var array
*/
private $supportedTypes = array(
+ 'aimeos' => 'AimeosInstaller',
'asgard' => 'AsgardInstaller',
+ 'attogram' => 'AttogramInstaller',
'agl' => 'AglInstaller',
'annotatecms' => 'AnnotateCmsInstaller',
'bitrix' => 'BitrixInstaller',
+ 'bonefish' => 'BonefishInstaller',
'cakephp' => 'CakePHPInstaller',
'chef' => 'ChefInstaller',
+ 'ccframework' => 'ClanCatsFrameworkInstaller',
+ 'cockpit' => 'CockpitInstaller',
'codeigniter' => 'CodeIgniterInstaller',
'concrete5' => 'Concrete5Installer',
'craft' => 'CraftInstaller',
'croogo' => 'CroogoInstaller',
'dokuwiki' => 'DokuWikiInstaller',
'dolibarr' => 'DolibarrInstaller',
+ 'decibel' => 'DecibelInstaller',
'drupal' => 'DrupalInstaller',
'elgg' => 'ElggInstaller',
+ 'eliasis' => 'EliasisInstaller',
+ 'ee3' => 'ExpressionEngineInstaller',
+ 'ee2' => 'ExpressionEngineInstaller',
+ 'ezplatform' => 'EzPlatformInstaller',
'fuel' => 'FuelInstaller',
'fuelphp' => 'FuelphpInstaller',
'grav' => 'GravInstaller',
'hurad' => 'HuradInstaller',
+ 'imagecms' => 'ImageCMSInstaller',
+ 'itop' => 'ItopInstaller',
'joomla' => 'JoomlaInstaller',
+ 'kanboard' => 'KanboardInstaller',
'kirby' => 'KirbyInstaller',
+ 'kodicms' => 'KodiCMSInstaller',
'kohana' => 'KohanaInstaller',
+ 'lms' => 'LanManagementSystemInstaller',
'laravel' => 'LaravelInstaller',
+ 'lavalite' => 'LavaLiteInstaller',
'lithium' => 'LithiumInstaller',
'magento' => 'MagentoInstaller',
'mako' => 'MakoInstaller',
+ 'maya' => 'MayaInstaller',
+ 'mautic' => 'MauticInstaller',
'mediawiki' => 'MediaWikiInstaller',
- 'microweber' => 'MicroweberInstaller',
+ 'microweber' => 'MicroweberInstaller',
'modulework' => 'MODULEWorkInstaller',
'modxevo' => 'MODXEvoInstaller',
'moodle' => 'MoodleInstaller',
'october' => 'OctoberInstaller',
+ 'ontowiki' => 'OntoWikiInstaller',
'oxid' => 'OxidInstaller',
+ 'osclass' => 'OsclassInstaller',
'phpbb' => 'PhpBBInstaller',
'pimcore' => 'PimcoreInstaller',
'piwik' => 'PiwikInstaller',
+ 'plentymarkets'=> 'PlentymarketsInstaller',
'ppi' => 'PPIInstaller',
'puppet' => 'PuppetInstaller',
+ 'radphp' => 'RadPHPInstaller',
+ 'phifty' => 'PhiftyInstaller',
+ 'porto' => 'PortoInstaller',
'redaxo' => 'RedaxoInstaller',
+ 'reindex' => 'ReIndexInstaller',
'roundcube' => 'RoundcubeInstaller',
'shopware' => 'ShopwareInstaller',
'silverstripe' => 'SilverStripeInstaller',
+ 'smf' => 'SMFInstaller',
+ 'sydes' => 'SyDESInstaller',
'symfony1' => 'Symfony1Installer',
'thelia' => 'TheliaInstaller',
'tusk' => 'TuskInstaller',
'typo3-cms' => 'TYPO3CmsInstaller',
'typo3-flow' => 'TYPO3FlowInstaller',
+ 'userfrosting' => 'UserFrostingInstaller',
+ 'vanilla' => 'VanillaInstaller',
'whmcs' => 'WHMCSInstaller',
'wolfcms' => 'WolfCMSInstaller',
'wordpress' => 'WordPressInstaller',
+ 'yawik' => 'YawikInstaller',
'zend' => 'ZendInstaller',
'zikula' => 'ZikulaInstaller',
+ 'prestashop' => 'PrestashopInstaller'
);
/**
@@ -81,7 +113,7 @@ class Installer extends LibraryInstaller
}
$class = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
- $installer = new $class($package, $this->composer);
+ $installer = new $class($package, $this->composer, $this->getIO());
return $installer->getInstallPath($package, $frameworkType);
}
@@ -149,11 +181,21 @@ class Installer extends LibraryInstaller
if (!empty($this->supportedTypes[$frameworkType])) {
$frameworkClass = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
/** @var BaseInstaller $framework */
- $framework = new $frameworkClass(null, $this->composer);
+ $framework = new $frameworkClass(null, $this->composer, $this->getIO());
$locations = array_keys($framework->getLocations());
$pattern = $locations ? '(' . implode('|', $locations) . ')' : false;
}
return $pattern ? : '(\w+)';
}
+
+ /**
+ * Get I/O object
+ *
+ * @return IOInterface
+ */
+ private function getIO()
+ {
+ return $this->io;
+ }
}
diff --git a/UserFunctions/vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php b/UserFunctions/vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php
index ae7ba8a4..36b2f84a 100644
--- a/UserFunctions/vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php
+++ b/UserFunctions/vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php
@@ -5,5 +5,7 @@ class KirbyInstaller extends BaseInstaller
{
protected $locations = array(
'plugin' => 'site/plugins/{$name}/',
+ 'field' => 'site/fields/{$name}/',
+ 'tag' => 'site/tags/{$name}/'
);
}
diff --git a/UserFunctions/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php b/UserFunctions/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php
index 04be73c2..a89c82f7 100644
--- a/UserFunctions/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php
+++ b/UserFunctions/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php
@@ -6,6 +6,7 @@ class MoodleInstaller extends BaseInstaller
protected $locations = array(
'mod' => 'mod/{$name}/',
'admin_report' => 'admin/report/{$name}/',
+ 'atto' => 'lib/editor/atto/plugins/{$name}/',
'tool' => 'admin/tool/{$name}/',
'assignment' => 'mod/assignment/type/{$name}/',
'assignsubmission' => 'mod/assign/submission/{$name}/',
@@ -13,6 +14,9 @@ class MoodleInstaller extends BaseInstaller
'auth' => 'auth/{$name}/',
'availability' => 'availability/condition/{$name}/',
'block' => 'blocks/{$name}/',
+ 'booktool' => 'mod/book/tool/{$name}/',
+ 'cachestore' => 'cache/stores/{$name}/',
+ 'cachelock' => 'cache/locks/{$name}/',
'calendartype' => 'calendar/type/{$name}/',
'format' => 'course/format/{$name}/',
'coursereport' => 'course/report/{$name}/',
@@ -26,7 +30,11 @@ class MoodleInstaller extends BaseInstaller
'gradereport' => 'grade/report/{$name}/',
'gradingform' => 'grade/grading/form/{$name}/',
'local' => 'local/{$name}/',
+ 'logstore' => 'admin/tool/log/store/{$name}/',
+ 'ltisource' => 'mod/lti/source/{$name}/',
+ 'ltiservice' => 'mod/lti/service/{$name}/',
'message' => 'message/output/{$name}/',
+ 'mnetservice' => 'mnet/service/{$name}/',
'plagiarism' => 'plagiarism/{$name}/',
'portfolio' => 'portfolio/{$name}/',
'qbehaviour' => 'question/behaviour/{$name}/',
@@ -37,7 +45,9 @@ class MoodleInstaller extends BaseInstaller
'report' => 'report/{$name}/',
'repository' => 'repository/{$name}/',
'scormreport' => 'mod/scorm/report/{$name}/',
+ 'search' => 'search/engine/{$name}/',
'theme' => 'theme/{$name}/',
+ 'tinymce' => 'lib/editor/tinymce/plugins/{$name}/',
'profilefield' => 'user/profile/field/{$name}/',
'webservice' => 'webservice/{$name}/',
'workshopallocation' => 'mod/workshop/allocation/{$name}/',
diff --git a/UserFunctions/vendor/composer/installers/src/Composer/Installers/OxidInstaller.php b/UserFunctions/vendor/composer/installers/src/Composer/Installers/OxidInstaller.php
index 22fb56aa..49940ff6 100644
--- a/UserFunctions/vendor/composer/installers/src/Composer/Installers/OxidInstaller.php
+++ b/UserFunctions/vendor/composer/installers/src/Composer/Installers/OxidInstaller.php
@@ -1,11 +1,59 @@
<?php
namespace Composer\Installers;
+use Composer\Package\PackageInterface;
+
class OxidInstaller extends BaseInstaller
{
+ const VENDOR_PATTERN = '/^modules\/(?P<vendor>.+)\/.+/';
+
protected $locations = array(
'module' => 'modules/{$name}/',
'theme' => 'application/views/{$name}/',
'out' => 'out/{$name}/',
);
+
+ /**
+ * getInstallPath
+ *
+ * @param PackageInterface $package
+ * @param string $frameworkType
+ * @return void
+ */
+ public function getInstallPath(PackageInterface $package, $frameworkType = '')
+ {
+ $installPath = parent::getInstallPath($package, $frameworkType);
+ $type = $this->package->getType();
+ if ($type === 'oxid-module') {
+ $this->prepareVendorDirectory($installPath);
+ }
+ return $installPath;
+ }
+
+ /**
+ * prepareVendorDirectory
+ *
+ * Makes sure there is a vendormetadata.php file inside
+ * the vendor folder if there is a vendor folder.
+ *
+ * @param string $installPath
+ * @return void
+ */
+ protected function prepareVendorDirectory($installPath)
+ {
+ $matches = '';
+ $hasVendorDirectory = preg_match(self::VENDOR_PATTERN, $installPath, $matches);
+ if (!$hasVendorDirectory) {
+ return;
+ }
+
+ $vendorDirectory = $matches['vendor'];
+ $vendorPath = getcwd() . '/modules/' . $vendorDirectory;
+ if (!file_exists($vendorPath)) {
+ mkdir($vendorPath, 0755, true);
+ }
+
+ $vendorMetaDataPath = $vendorPath . '/vendormetadata.php';
+ touch($vendorMetaDataPath);
+ }
}
diff --git a/UserFunctions/vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php b/UserFunctions/vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php
index 673f1fc1..d0193cba 100644
--- a/UserFunctions/vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php
+++ b/UserFunctions/vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php
@@ -11,7 +11,9 @@ class ShopwareInstaller extends BaseInstaller
'backend-plugin' => 'engine/Shopware/Plugins/Local/Backend/{$name}/',
'core-plugin' => 'engine/Shopware/Plugins/Local/Core/{$name}/',
'frontend-plugin' => 'engine/Shopware/Plugins/Local/Frontend/{$name}/',
- 'theme' => 'templates/{$name}/'
+ 'theme' => 'templates/{$name}/',
+ 'plugin' => 'custom/plugins/{$name}/',
+ 'frontend-theme' => 'themes/Frontend/{$name}/',
);
/**
diff --git a/UserFunctions/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php b/UserFunctions/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php
index 8220b40d..b1663e84 100644
--- a/UserFunctions/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php
+++ b/UserFunctions/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php
@@ -4,6 +4,8 @@ namespace Composer\Installers;
/**
* Extension installer for TYPO3 CMS
*
+ * @deprecated since 1.0.25, use https://packagist.org/packages/typo3/cms-composer-installers instead
+ *
* @author Sascha Egerer <sascha.egerer@dkd.de>
*/
class TYPO3CmsInstaller extends BaseInstaller
diff --git a/UserFunctions/vendor/composer/installers/tests/Composer/Installers/Test/AsgardInstallerTest.php b/UserFunctions/vendor/composer/installers/tests/Composer/Installers/Test/AsgardInstallerTest.php
index 71480eca..f6e83410 100644
--- a/UserFunctions/vendor/composer/installers/tests/Composer/Installers/Test/AsgardInstallerTest.php
+++ b/UserFunctions/vendor/composer/installers/tests/Composer/Installers/Test/AsgardInstallerTest.php
@@ -8,7 +8,7 @@ use Composer\Composer;
class AsgardInstallerTest extends \PHPUnit_Framework_TestCase
{
/**
- * @var OctoberInstaller
+ * @var AsgardInstaller
*/
private $installer;
@@ -26,14 +26,20 @@ class AsgardInstallerTest extends \PHPUnit_Framework_TestCase
public function testInflectPackageVars($type, $name, $expected)
{
$this->assertEquals(
- $this->installer->inflectPackageVars(array('name' => $name, 'type' => $type)),
- array('name' => $expected, 'type' => $type)
+ array('name' => $expected, 'type' => $type),
+ $this->installer->inflectPackageVars(array('name' => $name, 'type' => $type))
);
}
public function packageNameInflectionProvider()
{
return array(
+ // Should keep module name StudlyCase
+ array(
+ 'asgard-module',
+ 'user-profile',
+ 'UserProfile'
+ ),
array(
'asgard-module',
'asgard-module',
@@ -44,11 +50,17 @@ class AsgardInstallerTest extends \PHPUnit_Framework_TestCase
'blog',
'Blog'
),
+ // tests that exactly one '-module' is cut off
+ array(
+ 'asgard-module',
+ 'some-module-module',
+ 'SomeModule',
+ ),
// tests that exactly one '-theme' is cut off
array(
'asgard-theme',
'some-theme-theme',
- 'Some-theme',
+ 'SomeTheme',
),
// tests that names without '-theme' suffix stay valid
array(
@@ -56,6 +68,12 @@ class AsgardInstallerTest extends \PHPUnit_Framework_TestCase
'someothertheme',
'Someothertheme',
),
+ // Should keep theme name StudlyCase
+ array(
+ 'asgard-theme',
+ 'adminlte-advanced',
+ 'AdminlteAdvanced'
+ ),
);
}
}
diff --git a/UserFunctions/vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php b/UserFunctions/vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php
index 3b15ea47..523e8476 100644
--- a/UserFunctions/vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php
+++ b/UserFunctions/vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php
@@ -9,6 +9,7 @@ use Composer\Package\RootPackage;
use Composer\Package\Link;
use Composer\Package\Version\VersionParser;
use Composer\Composer;
+use Composer\Config;
class CakePHPInstallerTest extends TestCase
{
@@ -25,6 +26,7 @@ class CakePHPInstallerTest extends TestCase
$this->package = new Package('CamelCased', '1.0', '1.0');
$this->io = $this->getMock('Composer\IO\PackageInterface');
$this->composer = new Composer();
+ $this->composer->setConfig(new Config(false));
}
/**
@@ -61,7 +63,7 @@ class CakePHPInstallerTest extends TestCase
*/
public function testGetLocations() {
$package = new RootPackage('CamelCased', '1.0', '1.0');
- $composer = new Composer();
+ $composer = $this->composer;
$rm = new RepositoryManager(
$this->getMock('Composer\IO\IOInterface'),
$this->getMock('Composer\Config')
@@ -94,61 +96,11 @@ class CakePHPInstallerTest extends TestCase
// cakephp >= 3.0
$this->setCakephpVersion($rm, '3.0.*-dev');
$result = $installer->getLocations();
- $this->assertContains('plugins/', $result['plugin']);
+ $this->assertContains('vendor/{$vendor}/{$name}/', $result['plugin']);
$this->setCakephpVersion($rm, '~8.8');
$result = $installer->getLocations();
- $this->assertContains('plugins/', $result['plugin']);
- }
-
- /**
- * Test if installer-name was set
- *
- */
- public function testGetInstallPath() {
- $autoload = array(
- 'psr-4' => array(
- 'FOC\\Authenticate' => ''
- )
- );
- $this->package->setAutoload($autoload);
- $this->package->setType('cakephp-plugin');
- $rm = new RepositoryManager(
- $this->getMock('Composer\IO\IOInterface'),
- $this->getMock('Composer\Config')
- );
- $this->composer->setRepositoryManager($rm);
- $installer = new CakePHPInstaller($this->package, $this->composer);
-
- $this->setCakephpVersion($rm, '3.0.0');
- $installer->getInstallPath($this->package, 'cakephp');
- $extra = $this->package->getExtra();
- $this->assertEquals('FOC/Authenticate', $extra['installer-name']);
-
- $autoload = array(
- 'psr-4' => array(
- 'FOC\Acl\Test' => './tests',
- 'FOC\Acl' => ''
- )
- );
- $this->package->setAutoload($autoload);
- $this->package->setExtra(array());
- $installer->getInstallPath($this->package, 'cakephp');
- $extra = $this->package->getExtra();
- $this->assertEquals('FOC/Acl', $extra['installer-name']);
-
- $autoload = array(
- 'psr-4' => array(
- 'Foo\Bar' => 'foo',
- 'Acme\Plugin\Test' => 'tests',
- 'Acme\Plugin' => './src'
- )
- );
- $this->package->setAutoload($autoload);
- $this->package->setExtra(array());
- $installer->getInstallPath($this->package, 'cakephp');
- $extra = $this->package->getExtra();
- $this->assertEquals('Acme/Plugin', $extra['installer-name']);
+ $this->assertContains('vendor/{$vendor}/{$name}/', $result['plugin']);
}
protected function setCakephpVersion($rm, $version) {
diff --git a/UserFunctions/vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php b/UserFunctions/vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php
index 1a28a634..cec3e455 100644
--- a/UserFunctions/vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php
+++ b/UserFunctions/vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php
@@ -85,18 +85,22 @@ class InstallerTest extends TestCase
{
return array(
array('agl-module', true),
+ array('aimeos-extension', true),
array('annotatecms-module', true),
array('annotatecms-component', true),
array('annotatecms-service', true),
+ array('attogram-module', true),
array('bitrix-module', true),
array('bitrix-component', true),
array('bitrix-theme', true),
+ array('bonefish-package', true),
array('cakephp', false),
array('cakephp-', false),
array('cakephp-app', false),
array('cakephp-plugin', true),
array('chef-cookbook', true),
array('chef-role', true),
+ array('cockpit-module', true),
array('codeigniter-app', false),
array('codeigniter-library', true),
array('codeigniter-third-party', true),
@@ -104,25 +108,45 @@ class InstallerTest extends TestCase
array('concrete5-block', true),
array('concrete5-package', true),
array('concrete5-theme', true),
+ array('concrete5-core', true),
array('concrete5-update', true),
array('craft-plugin', true),
array('croogo-plugin', true),
array('croogo-theme', true),
+ array('decibel-app', true),
array('dokuwiki-plugin', true),
array('dokuwiki-template', true),
array('drupal-module', true),
array('dolibarr-module', true),
+ array('ee3-theme', true),
+ array('ee3-addon', true),
+ array('ee2-theme', true),
+ array('ee2-addon', true),
array('elgg-plugin', true),
+ array('eliasis-module', true),
+ array('ezplatform-assets', true),
+ array('ezplatform-meta-assets', true),
array('fuel-module', true),
array('fuel-package', true),
array('fuel-theme', true),
array('fuelphp-component', true),
array('hurad-plugin', true),
array('hurad-theme', true),
+ array('imagecms-template', true),
+ array('imagecms-module', true),
+ array('imagecms-library', true),
+ array('itop-extension', true),
array('joomla-library', true),
+ array('kanboard-plugin', true),
array('kirby-plugin', true),
array('kohana-module', true),
+ array('lms-plugin', true),
+ array('lms-template', true),
+ array('lms-document-template', true),
+ array('lms-userpanel-module', true),
array('laravel-library', true),
+ array('lavalite-theme', true),
+ array('lavalite-package', true),
array('lithium-library', true),
array('magento-library', true),
array('mako-package', true),
@@ -141,17 +165,30 @@ class InstallerTest extends TestCase
array('piwik-plugin', true),
array('phpbb-extension', true),
array('pimcore-plugin', true),
+ array('plentymarkets-plugin', true),
array('ppi-module', true),
+ array('prestashop-module', true),
+ array('prestashop-theme', true),
array('puppet-module', true),
+ array('porto-container', true),
+ array('radphp-bundle', true),
array('redaxo-addon', true),
array('redaxo-bestyle-plugin', true),
+ array('reindex-theme', true),
+ array('reindex-plugin', true),
array('roundcube-plugin', true),
array('shopware-backend-plugin', true),
array('shopware-core-plugin', true),
array('shopware-frontend-plugin', true),
array('shopware-theme', true),
+ array('shopware-plugin', true),
+ array('shopware-frontend-theme', true),
array('silverstripe-module', true),
array('silverstripe-theme', true),
+ array('smf-module', true),
+ array('smf-theme', true),
+ array('sydes-module', true),
+ array('sydes-theme', true),
array('symfony1-plugin', true),
array('thelia-module', true),
array('thelia-frontoffice-template', true),
@@ -161,13 +198,25 @@ class InstallerTest extends TestCase
array('tusk-asset', true),
array('typo3-flow-plugin', true),
array('typo3-cms-extension', true),
+ array('userfrosting-sprinkle', true),
+ array('vanilla-plugin', true),
+ array('vanilla-theme', true),
array('whmcs-gateway', true),
array('wolfcms-plugin', true),
array('wordpress-plugin', true),
array('wordpress-core', false),
+ array('yawik-module', true),
array('zend-library', true),
array('zikula-module', true),
array('zikula-theme', true),
+ array('kodicms-plugin', true),
+ array('kodicms-media', true),
+ array('phifty-bundle', true),
+ array('phifty-library', true),
+ array('phifty-framework', true),
+ array('osclass-plugin', true),
+ array('osclass-theme', true),
+ array('osclass-language', true),
);
}
@@ -193,24 +242,33 @@ class InstallerTest extends TestCase
{
return array(
array('agl-module', 'More/MyTestPackage/', 'agl/my_test-package'),
+ array('aimeos-extension', 'ext/ai-test/', 'author/ai-test'),
array('annotatecms-module', 'addons/modules/my_module/', 'vysinsky/my_module'),
array('annotatecms-component', 'addons/components/my_component/', 'vysinsky/my_component'),
array('annotatecms-service', 'addons/services/my_service/', 'vysinsky/my_service'),
- array('bitrix-module', 'local/modules/my_module/', 'author/my_module'),
- array('bitrix-component', 'local/components/my_component/', 'author/my_component'),
- array('bitrix-theme', 'local/templates/my_theme/', 'author/my_theme'),
+ array('attogram-module', 'modules/my_module/', 'author/my_module'),
+ array('bitrix-module', 'bitrix/modules/my_module/', 'author/my_module'),
+ array('bitrix-component', 'bitrix/components/my_component/', 'author/my_component'),
+ array('bitrix-theme', 'bitrix/templates/my_theme/', 'author/my_theme'),
+ array('bitrix-d7-module', 'bitrix/modules/author.my_module/', 'author/my_module'),
+ array('bitrix-d7-component', 'bitrix/components/author/my_component/', 'author/my_component'),
+ array('bitrix-d7-template', 'bitrix/templates/author_my_template/', 'author/my_template'),
+ array('bonefish-package', 'Packages/bonefish/package/', 'bonefish/package'),
array('cakephp-plugin', 'Plugin/Ftp/', 'shama/ftp'),
array('chef-cookbook', 'Chef/mre/my_cookbook/', 'mre/my_cookbook'),
array('chef-role', 'Chef/roles/my_role/', 'mre/my_role'),
+ array('cockpit-module', 'cockpit/modules/addons/My_module/', 'piotr-cz/cockpit-my_module'),
array('codeigniter-library', 'application/libraries/my_package/', 'shama/my_package'),
array('codeigniter-module', 'application/modules/my_package/', 'shama/my_package'),
- array('concrete5-block', 'blocks/concrete5_block/', 'remo/concrete5_block'),
+ array('concrete5-block', 'application/blocks/concrete5_block/', 'remo/concrete5_block'),
array('concrete5-package', 'packages/concrete5_package/', 'remo/concrete5_package'),
- array('concrete5-theme', 'themes/concrete5_theme/', 'remo/concrete5_theme'),
+ array('concrete5-theme', 'application/themes/concrete5_theme/', 'remo/concrete5_theme'),
+ array('concrete5-core', 'concrete/', 'concrete5/core'),
array('concrete5-update', 'updates/concrete5/', 'concrete5/concrete5'),
array('craft-plugin', 'craft/plugins/my_plugin/', 'mdcpepper/my_plugin'),
array('croogo-plugin', 'Plugin/Sitemaps/', 'fahad19/sitemaps'),
array('croogo-theme', 'View/Themed/Readable/', 'rchavik/readable'),
+ array('decibel-app', 'app/someapp/', 'author/someapp'),
array('dokuwiki-plugin', 'lib/plugins/someplugin/', 'author/someplugin'),
array('dokuwiki-template', 'lib/tpl/sometemplate/', 'author/sometemplate'),
array('dolibarr-module', 'htdocs/custom/my_module/', 'shama/my_module'),
@@ -219,16 +277,38 @@ class InstallerTest extends TestCase
array('drupal-profile', 'profiles/my_module/', 'shama/my_module'),
array('drupal-drush', 'drush/my_module/', 'shama/my_module'),
array('elgg-plugin', 'mod/sample_plugin/', 'test/sample_plugin'),
+ array('eliasis-module', 'modules/my_module/', 'shama/my_module'),
+ array('ee3-addon', 'system/user/addons/ee_theme/', 'author/ee_theme'),
+ array('ee3-theme', 'themes/user/ee_package/', 'author/ee_package'),
+ array('ee2-addon', 'system/expressionengine/third_party/ee_theme/', 'author/ee_theme'),
+ array('ee2-theme', 'themes/third_party/ee_package/', 'author/ee_package'),
+ array('ezplatform-assets', 'web/assets/ezplatform/ezplatform_comp/', 'author/ezplatform_comp'),
+ array('ezplatform-meta-assets', 'web/assets/ezplatform/', 'author/ezplatform_comp'),
array('fuel-module', 'fuel/app/modules/module/', 'fuel/module'),
array('fuel-package', 'fuel/packages/orm/', 'fuel/orm'),
array('fuel-theme', 'fuel/app/themes/theme/', 'fuel/theme'),
array('fuelphp-component', 'components/demo/', 'fuelphp/demo'),
array('hurad-plugin', 'plugins/Akismet/', 'atkrad/akismet'),
array('hurad-theme', 'plugins/Hurad2013/', 'atkrad/Hurad2013'),
+ array('imagecms-template', 'templates/my_template/', 'shama/my_template'),
+ array('imagecms-module', 'application/modules/my_module/', 'shama/my_module'),
+ array('imagecms-library', 'application/libraries/my_library/', 'shama/my_library'),
+ array('itop-extension', 'extensions/my_extension/', 'shama/my_extension'),
array('joomla-plugin', 'plugins/my_plugin/', 'shama/my_plugin'),
+ array('kanboard-plugin', 'plugins/my_plugin/', 'shama/my_plugin'),
array('kirby-plugin', 'site/plugins/my_plugin/', 'shama/my_plugin'),
array('kohana-module', 'modules/my_package/', 'shama/my_package'),
+ array('lms-plugin', 'plugins/MyPackage/', 'shama/MyPackage'),
+ array('lms-plugin', 'plugins/MyPackage/', 'shama/my_package'),
+ array('lms-template', 'templates/MyPackage/', 'shama/MyPackage'),
+ array('lms-template', 'templates/MyPackage/', 'shama/my_package'),
+ array('lms-document-template', 'documents/templates/MyPackage/', 'shama/MyPackage'),
+ array('lms-document-template', 'documents/templates/MyPackage/', 'shama/my_package'),
+ array('lms-userpanel-module', 'userpanel/modules/MyPackage/', 'shama/MyPackage'),
+ array('lms-userpanel-module', 'userpanel/modules/MyPackage/', 'shama/my_package'),
array('laravel-library', 'libraries/my_package/', 'shama/my_package'),
+ array('lavalite-theme', 'public/themes/my_theme/', 'shama/my_theme'),
+ array('lavalite-package', 'packages/my_group/my_package/', 'my_group/my_package'),
array('lithium-library', 'libraries/li3_test/', 'user/li3_test'),
array('magento-library', 'lib/foo/', 'test/foo'),
array('modxevo-snippet', 'assets/snippets/my_snippet/', 'shama/my_snippet'),
@@ -250,26 +330,37 @@ class InstallerTest extends TestCase
array('october-plugin', 'plugins/shama/my_plugin/', 'shama/my_plugin'),
array('october-theme', 'themes/my_theme/', 'shama/my_theme'),
array('piwik-plugin', 'plugins/VisitSummary/', 'shama/visit-summary'),
+ array('prestashop-module', 'modules/a-module/', 'vendor/a-module'),
+ array('prestashop-theme', 'themes/a-theme/', 'vendor/a-theme'),
array('phpbb-extension', 'ext/test/foo/', 'test/foo'),
array('phpbb-style', 'styles/foo/', 'test/foo'),
array('phpbb-language', 'language/foo/', 'test/foo'),
array('pimcore-plugin', 'plugins/MyPlugin/', 'ubikz/my_plugin'),
+ array('plentymarkets-plugin', 'HelloWorld/', 'plugin-hello-world'),
array('ppi-module', 'modules/foo/', 'test/foo'),
array('puppet-module', 'modules/puppet-name/', 'puppet/puppet-name'),
+ array('porto-container', 'app/Containers/container-name/', 'test/container-name'),
+ array('radphp-bundle', 'src/Migration/', 'atkrad/migration'),
array('redaxo-addon', 'redaxo/include/addons/my_plugin/', 'shama/my_plugin'),
array('redaxo-bestyle-plugin', 'redaxo/include/addons/be_style/plugins/my_plugin/', 'shama/my_plugin'),
+ array('reindex-theme', 'themes/my_module/', 'author/my_module'),
+ array('reindex-plugin', 'plugins/my_module/', 'author/my_module'),
array('roundcube-plugin', 'plugins/base/', 'test/base'),
array('roundcube-plugin', 'plugins/replace_dash/', 'test/replace-dash'),
array('shopware-backend-plugin', 'engine/Shopware/Plugins/Local/Backend/ShamaMyBackendPlugin/', 'shama/my-backend-plugin'),
array('shopware-core-plugin', 'engine/Shopware/Plugins/Local/Core/ShamaMyCorePlugin/', 'shama/my-core-plugin'),
array('shopware-frontend-plugin', 'engine/Shopware/Plugins/Local/Frontend/ShamaMyFrontendPlugin/', 'shama/my-frontend-plugin'),
array('shopware-theme', 'templates/my_theme/', 'shama/my-theme'),
+ array('shopware-frontend-theme', 'themes/Frontend/ShamaMyFrontendTheme/', 'shama/my-frontend-theme'),
+ array('shopware-plugin', 'custom/plugins/ShamaMyPlugin/', 'shama/my-plugin'),
array('silverstripe-module', 'my_module/', 'shama/my_module'),
array('silverstripe-module', 'sapphire/', 'silverstripe/framework', '2.4.0'),
array('silverstripe-module', 'framework/', 'silverstripe/framework', '3.0.0'),
array('silverstripe-module', 'framework/', 'silverstripe/framework', '3.0.0-rc1'),
array('silverstripe-module', 'framework/', 'silverstripe/framework', 'my/branch'),
array('silverstripe-theme', 'themes/my_theme/', 'shama/my_theme'),
+ array('smf-module', 'Sources/my_module/', 'shama/my_module'),
+ array('smf-theme', 'Themes/my_theme/', 'shama/my_theme'),
array('symfony1-plugin', 'plugins/sfShamaPlugin/', 'shama/sfShamaPlugin'),
array('symfony1-plugin', 'plugins/sfShamaPlugin/', 'shama/sf-shama-plugin'),
array('thelia-module', 'local/modules/my_module/', 'shama/my_module'),
@@ -280,6 +371,9 @@ class InstallerTest extends TestCase
array('typo3-flow-package', 'Packages/Application/my_package/', 'shama/my_package'),
array('typo3-flow-build', 'Build/my_package/', 'shama/my_package'),
array('typo3-cms-extension', 'typo3conf/ext/my_extension/', 'shama/my_extension'),
+ array('userfrosting-sprinkle', 'app/sprinkles/my_sprinkle/', 'shama/my_sprinkle'),
+ array('vanilla-plugin', 'plugins/my_plugin/', 'shama/my_plugin'),
+ array('vanilla-theme', 'themes/my_theme/', 'shama/my_theme'),
array('whmcs-gateway', 'modules/gateways/gateway_name/', 'vendor/gateway_name'),
array('wolfcms-plugin', 'wolf/plugins/my_plugin/', 'shama/my_plugin'),
array('wordpress-plugin', 'wp-content/plugins/my_plugin/', 'shama/my_plugin'),
@@ -287,6 +381,15 @@ class InstallerTest extends TestCase
array('zend-extra', 'extras/library/zend_test/', 'shama/zend_test'),
array('zikula-module', 'modules/my-test_module/', 'my/test_module'),
array('zikula-theme', 'themes/my-test_theme/', 'my/test_theme'),
+ array('kodicms-media', 'cms/media/vendor/my_media/', 'shama/my_media'),
+ array('kodicms-plugin', 'cms/plugins/my_plugin/', 'shama/my_plugin'),
+ array('phifty-bundle', 'bundles/core/', 'shama/core'),
+ array('phifty-library', 'libraries/my-lib/', 'shama/my-lib'),
+ array('phifty-framework', 'frameworks/my-framework/', 'shama/my-framework'),
+ array('yawik-module', 'module/MyModule/', 'shama/my_module'),
+ array('osclass-plugin', 'oc-content/plugins/sample_plugin/', 'test/sample_plugin'),
+ array('osclass-theme', 'oc-content/themes/sample_theme/', 'test/sample_theme'),
+ array('osclass-language', 'oc-content/languages/sample_lang/', 'test/sample_lang'),
);
}
@@ -365,6 +468,27 @@ class InstallerTest extends TestCase
}
/**
+ * testVendorPath
+ */
+ public function testVendorPath()
+ {
+ $installer = new Installer($this->io, $this->composer);
+ $package = new Package('penyaskito/my_module', '1.0.0', '1.0.0');
+ $package->setType('drupal-module');
+ $consumerPackage = new RootPackage('drupal/drupal', '1.0.0', '1.0.0');
+ $this->composer->setPackage($consumerPackage);
+ $consumerPackage->setExtra(array(
+ 'installer-paths' => array(
+ 'modules/custom/{$name}/' => array(
+ 'vendor:penyaskito'
+ ),
+ ),
+ ));
+ $result = $installer->getInstallPath($package);
+ $this->assertEquals('modules/custom/my_module/', $result);
+ }
+
+ /**
* testNoVendorName
*/
public function testNoVendorName()
diff --git a/UserFunctions/version b/UserFunctions/version
index 297b7e75..37355fd3 100644
--- a/UserFunctions/version
+++ b/UserFunctions/version
@@ -1,4 +1,4 @@
-UserFunctions: REL1_24
-2014-12-01T23:26:37
+UserFunctions: REL1_30
+2017-09-21T22:23:58
-93ab885
+5eda8c9