Classic Editor Addon - Version 3.0.0

Version Description

  • January 24, 2022
  • replaced dependency library with simple dependency check/notice, due to many issues with 2.6.4 security update
Download this release

Release Info

Developer senlin
Plugin Icon wp plugin Classic Editor Addon
Version 3.0.0
Comparing to
See all releases

Code changes from version 2.6.4 to 3.0.0

Files changed (145) hide show
  1. classic-editor-addon.php +20 -9
  2. readme.txt +7 -2
  3. vendor/afragen/wp-dependency-installer/LICENSE +0 -21
  4. vendor/afragen/wp-dependency-installer/README.md +0 -73
  5. vendor/afragen/wp-dependency-installer/composer.json +0 -40
  6. vendor/afragen/wp-dependency-installer/composer.lock +0 -63
  7. vendor/afragen/wp-dependency-installer/wp-dependency-installer-skin.php +0 -59
  8. vendor/afragen/wp-dependency-installer/wp-dependency-installer.php +0 -902
  9. vendor/afragen/wp-dismiss-notice/LICENSE +0 -21
  10. vendor/afragen/wp-dismiss-notice/README.md +0 -20
  11. vendor/afragen/wp-dismiss-notice/composer.json +0 -28
  12. vendor/afragen/wp-dismiss-notice/js/dismiss-notice.js +0 -40
  13. vendor/afragen/wp-dismiss-notice/wp-dismiss-notice.php +0 -142
  14. vendor/autoload.php +0 -7
  15. vendor/composer/ClassLoader.php +0 -572
  16. vendor/composer/InstalledVersions.php +0 -350
  17. vendor/composer/LICENSE +0 -21
  18. vendor/composer/autoload_classmap.php +0 -13
  19. vendor/composer/autoload_namespaces.php +0 -9
  20. vendor/composer/autoload_psr4.php +0 -9
  21. vendor/composer/autoload_real.php +0 -57
  22. vendor/composer/autoload_static.php +0 -23
  23. vendor/composer/installed.json +0 -114
  24. vendor/composer/installed.php +0 -41
  25. vendor/composer/installers/.editorconfig +0 -10
  26. vendor/composer/installers/.gitignore +0 -3
  27. vendor/composer/installers/.travis.yml +0 -33
  28. vendor/composer/installers/CHANGELOG.md +0 -86
  29. vendor/composer/installers/CONTRIBUTING.md +0 -24
  30. vendor/composer/installers/LICENSE +0 -19
  31. vendor/composer/installers/README.md +0 -221
  32. vendor/composer/installers/_config.yml +0 -1
  33. vendor/composer/installers/composer.json +0 -105
  34. vendor/composer/installers/phpunit.xml.dist +0 -25
  35. vendor/composer/installers/src/Composer/Installers/AglInstaller.php +0 -21
  36. vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php +0 -9
  37. vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php +0 -11
  38. vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php +0 -49
  39. vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php +0 -9
  40. vendor/composer/installers/src/Composer/Installers/BaseInstaller.php +0 -136
  41. vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php +0 -126
  42. vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php +0 -9
  43. vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php +0 -82
  44. vendor/composer/installers/src/Composer/Installers/ChefInstaller.php +0 -11
  45. vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php +0 -10
  46. vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php +0 -34
  47. vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php +0 -11
  48. vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php +0 -13
  49. vendor/composer/installers/src/Composer/Installers/CraftInstaller.php +0 -35
  50. vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php +0 -21
  51. vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php +0 -10
  52. vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php +0 -50
  53. vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php +0 -16
  54. vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php +0 -16
  55. vendor/composer/installers/src/Composer/Installers/ElggInstaller.php +0 -9
  56. vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php +0 -12
  57. vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php +0 -29
  58. vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php +0 -10
  59. vendor/composer/installers/src/Composer/Installers/FuelInstaller.php +0 -11
  60. vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php +0 -9
  61. vendor/composer/installers/src/Composer/Installers/GravInstaller.php +0 -30
  62. vendor/composer/installers/src/Composer/Installers/HuradInstaller.php +0 -25
  63. vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php +0 -11
  64. vendor/composer/installers/src/Composer/Installers/Installer.php +0 -200
  65. vendor/composer/installers/src/Composer/Installers/ItopInstaller.php +0 -9
  66. vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php +0 -15
  67. vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php +0 -18
  68. vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php +0 -11
  69. vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php +0 -10
  70. vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php +0 -9
  71. vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php +0 -27
  72. vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php +0 -9
  73. vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php +0 -10
  74. vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php +0 -10
  75. vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php +0 -9
  76. vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php +0 -16
  77. vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php +0 -11
  78. vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php +0 -37
  79. vendor/composer/installers/src/Composer/Installers/MakoInstaller.php +0 -9
  80. vendor/composer/installers/src/Composer/Installers/MauticInstaller.php +0 -25
  81. vendor/composer/installers/src/Composer/Installers/MayaInstaller.php +0 -33
  82. vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php +0 -50
  83. vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php +0 -111
  84. vendor/composer/installers/src/Composer/Installers/ModxInstaller.php +0 -12
  85. vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php +0 -57
  86. vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php +0 -46
  87. vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php +0 -24
  88. vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php +0 -14
  89. vendor/composer/installers/src/Composer/Installers/OxidInstaller.php +0 -59
  90. vendor/composer/installers/src/Composer/Installers/PPIInstaller.php +0 -9
  91. vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php +0 -11
  92. vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php +0 -11
  93. vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php +0 -21
  94. vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php +0 -32
  95. vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php +0 -29
  96. vendor/composer/installers/src/Composer/Installers/Plugin.php +0 -17
  97. vendor/composer/installers/src/Composer/Installers/PortoInstaller.php +0 -9
  98. vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php +0 -10
  99. vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php +0 -11
  100. vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php +0 -63
  101. vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php +0 -24
  102. vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php +0 -10
  103. vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php +0 -10
  104. vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php +0 -22
  105. vendor/composer/installers/src/Composer/Installers/SMFInstaller.php +0 -10
  106. vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php +0 -60
  107. vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php +0 -35
  108. vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php +0 -25
  109. vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php +0 -49
  110. vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php +0 -26
  111. vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php +0 -16
  112. vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php +0 -38
  113. vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php +0 -12
  114. vendor/composer/installers/src/Composer/Installers/TuskInstaller.php +0 -14
  115. vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php +0 -9
  116. vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php +0 -10
  117. vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php +0 -49
  118. vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php +0 -10
  119. vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php +0 -9
  120. vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php +0 -12
  121. vendor/composer/installers/src/Composer/Installers/YawikInstaller.php +0 -32
  122. vendor/composer/installers/src/Composer/Installers/ZendInstaller.php +0 -11
  123. vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php +0 -10
  124. vendor/composer/installers/src/bootstrap.php +0 -13
  125. vendor/composer/installers/tests/Composer/Installers/Test/AsgardInstallerTest.php +0 -80
  126. vendor/composer/installers/tests/Composer/Installers/Test/BitrixInstallerTest.php +0 -75
  127. vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php +0 -114
  128. vendor/composer/installers/tests/Composer/Installers/Test/CraftInstallerTest.php +0 -83
  129. vendor/composer/installers/tests/Composer/Installers/Test/DokuWikiInstallerTest.php +0 -90
  130. vendor/composer/installers/tests/Composer/Installers/Test/GravInstallerTest.php +0 -63
  131. vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php +0 -552
  132. vendor/composer/installers/tests/Composer/Installers/Test/MayaInstallerTest.php +0 -62
  133. vendor/composer/installers/tests/Composer/Installers/Test/MediaWikiInstallerTest.php +0 -67
  134. vendor/composer/installers/tests/Composer/Installers/Test/OctoberInstallerTest.php +0 -67
  135. vendor/composer/installers/tests/Composer/Installers/Test/OntoWikiInstallerTest.php +0 -84
  136. vendor/composer/installers/tests/Composer/Installers/Test/PimcoreInstallerTest.php +0 -44
  137. vendor/composer/installers/tests/Composer/Installers/Test/PiwikInstallerTest.php +0 -63
  138. vendor/composer/installers/tests/Composer/Installers/Test/SiteDirectInstallerTest.php +0 -120
  139. vendor/composer/installers/tests/Composer/Installers/Test/SyDESInstallerTest.php +0 -82
  140. vendor/composer/installers/tests/Composer/Installers/Test/TestCase.php +0 -65
  141. vendor/composer/installers/tests/Composer/Installers/Test/VgmcpInstallerTest.php +0 -80
  142. vendor/composer/installers/tests/Composer/Installers/Test/YawikInstallerTest.php +0 -64
  143. vendor/composer/installers/tests/bootstrap.php +0 -4
  144. vendor/composer/platform_check.php +0 -26
  145. wp-dependencies.json +0 -10
classic-editor-addon.php CHANGED
@@ -4,10 +4,10 @@
4
  * Description: This free "Classic Editor Addon" plugin makes sure that the new block editor cannot be accidentally activated and blocks the calls to additional styles from the <code>&lt;head&gt;</code> (frontend). See README for details.
5
 
6
  * Author: <a href="https://so-wp.com">Pieter Bos</a>, <a href="https://gschoppe.com">Greg Schoppe</a>
7
- * Version: 2.6.4
8
 
9
  * Requires at least: 4.9
10
- * Tested up to: 5.9.0
11
 
12
  * License: GPL-3.0+
13
  * License URI: http://www.gnu.org/licenses/gpl-3.0.txt
@@ -25,9 +25,24 @@
25
  // don't load the plugin file directly
26
  if ( ! defined( 'ABSPATH' ) ) exit;
27
 
28
- // Load WP_Dependency_Installer
29
- include_once( __DIR__ . '/vendor/autoload.php' );
30
- WP_Dependency_Installer::instance()->run( __DIR__ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
 
32
  add_action( 'plugins_loaded', 'classic_editor_addon_post_init', 20, 0 );
33
 
@@ -57,10 +72,6 @@ function classic_editor_addon_remove_block_styles() {
57
  if ( class_exists( 'woocommerce' ) ) {
58
  wp_dequeue_style( 'wc-block-style' );
59
  wp_deregister_style( 'wc-block-style' );
60
- // @2.6.2 remove WooCommerce block scripts
61
- // rollback as issues are reported (https://wordpress.org/support/topic/version-2-6-2-breaks-woocommerce-checkout/)
62
- //wp_dequeue_script( 'jquery-blockui' );
63
- //wp_deregister_script( 'jquery-blockui' );
64
  }
65
 
66
  }
4
  * Description: This free "Classic Editor Addon" plugin makes sure that the new block editor cannot be accidentally activated and blocks the calls to additional styles from the <code>&lt;head&gt;</code> (frontend). See README for details.
5
 
6
  * Author: <a href="https://so-wp.com">Pieter Bos</a>, <a href="https://gschoppe.com">Greg Schoppe</a>
7
+ * Version: 3.0.0
8
 
9
  * Requires at least: 4.9
10
+ * Tested up to: 5.9
11
 
12
  * License: GPL-3.0+
13
  * License URI: http://www.gnu.org/licenses/gpl-3.0.txt
25
  // don't load the plugin file directly
26
  if ( ! defined( 'ABSPATH' ) ) exit;
27
 
28
+ // replaced wp dependency installer with simple dependency check/notice
29
+ add_action( 'admin_init', 'cea_depends_on_ce' );
30
+ function cea_depends_on_ce() {
31
+ if ( is_admin() && current_user_can( 'activate_plugins' ) && !is_plugin_active( 'classic-editor/classic-editor.php' ) ) {
32
+ add_action( 'admin_notices', 'cea_plugin_notice' );
33
+
34
+ deactivate_plugins( plugin_basename( __FILE__ ) );
35
+
36
+ if ( isset( $_GET['activate'] ) ) {
37
+ unset( $_GET['activate'] );
38
+ }
39
+ }
40
+ }
41
+
42
+ function cea_plugin_notice() {
43
+
44
+ printf( '<div class="error"><p>' . esc_html( __( 'Classic Editor Addon plugin requires the <a href="%s">Classic Editor plugin</a> to be installed and active.', 'classic-editor-addon' ) ) . '</p></div>', admin_url( 'plugin-install.php?s=classic%20editor&tab=search&type=term', 'https' ) );
45
+ }
46
 
47
  add_action( 'plugins_loaded', 'classic_editor_addon_post_init', 20, 0 );
48
 
72
  if ( class_exists( 'woocommerce' ) ) {
73
  wp_dequeue_style( 'wc-block-style' );
74
  wp_deregister_style( 'wc-block-style' );
 
 
 
 
75
  }
76
 
77
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: gutenberg, block editor, classic editor, addon, wordpress 5.0, woocommerce
4
  Requires at least: 4.9
5
  Requires PHP: 5.6
6
  Tested up to: 5.9
7
- Stable tag: 2.6.4
8
  License: GPL-3.0+
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.txt
10
 
@@ -17,7 +17,7 @@ This free "Classic Editor Addon" plugin makes sure that the new block editor can
17
  The free Classic Editor Addon plugin is targeted at everyone who is not yet ready for the new editing experience that has been introduced in WordPress 5.0. Install it now on sites and the UX remains the same as you are used to!
18
 
19
  <strong>What's New:</strong>
20
- Security update
21
 
22
  Please pay attention that the minimum PHP version to use our plugin is <strong>5.6</strong>.
23
 
@@ -63,6 +63,11 @@ Please open an issue on [Github](https://github.com/senlin/classic-editor-addon/
63
 
64
  == Changelog ==
65
 
 
 
 
 
 
66
  = 2.6.4 =
67
 
68
  * January 24, 2022
4
  Requires at least: 4.9
5
  Requires PHP: 5.6
6
  Tested up to: 5.9
7
+ Stable tag: 3.0.0
8
  License: GPL-3.0+
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.txt
10
 
17
  The free Classic Editor Addon plugin is targeted at everyone who is not yet ready for the new editing experience that has been introduced in WordPress 5.0. Install it now on sites and the UX remains the same as you are used to!
18
 
19
  <strong>What's New:</strong>
20
+ Replaced dependency library with simple dependency check/notice
21
 
22
  Please pay attention that the minimum PHP version to use our plugin is <strong>5.6</strong>.
23
 
63
 
64
  == Changelog ==
65
 
66
+ = 3.0.0 =
67
+
68
+ * January 24, 2022
69
+ * replaced dependency library with simple dependency check/notice, due to many issues with 2.6.4 security update
70
+
71
  = 2.6.4 =
72
 
73
  * January 24, 2022
vendor/afragen/wp-dependency-installer/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2016 Andy Fragen
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/afragen/wp-dependency-installer/README.md DELETED
@@ -1,73 +0,0 @@
1
- # WP Dependency Installer
2
- * Contributors: [Andy Fragen](https://github.com/afragen), [Matt Gibbs](https://github.com/mgibbs189), [Raruto](https://github.com/Raruto), [contributors](https://github.com/afragen/wp-dependency-installer/graphs/contributors)
3
- * Tags: plugin, dependency, install
4
- * Requires at least: 5.1
5
- * Requires PHP: 5.6
6
- * Stable tag: master
7
- * Donate link: <https://thefragens.com/wp-dependency-installer-donate>
8
- * License: MIT
9
-
10
- This is a drop in class for developers to optionally or automatically install plugin dependencies for their own plugins or themes. It can install a plugin from wp.org, GitHub, Bitbucket, GitLab, Gitea, or a direct URL.
11
-
12
- [Comprehensive information regarding WP Dependency Installer is available on the wiki.](https://github.com/afragen/wp-dependency-installer/wiki)
13
-
14
- See also: [example plugin](https://github.com/afragen/wp-dependency-installer-examples).
15
-
16
- ## Description
17
-
18
- You can use **composer** to install this package within your WordPress plugin / theme.
19
-
20
- **Please ensure you are using the latest version of this framework in your `composer.json`**
21
-
22
- 1. Within your plugin or theme root folder, run the following command:
23
-
24
- ```shell
25
- composer require afragen/wp-dependency-installer
26
- ```
27
-
28
- 2. Then create a sample [**`wp-dependencies.json`**](https://github.com/afragen/wp-dependency-installer/wiki/Configuration#json-config-file-format) file
29
-
30
- ```js
31
- [
32
- {
33
- "name": "Git Updater",
34
- "host": "github",
35
- "slug": "git-updater/git-updater.php",
36
- "uri": "afragen/git-updater",
37
- "branch": "develop",
38
- "required": true,
39
- "token": null
40
- },
41
- {
42
- "name": "Query Monitor",
43
- "host": "wordpress",
44
- "slug": "query-monitor/query-monitor.php",
45
- "uri": "https://wordpress.org/plugins/query-monitor/",
46
- "optional": true
47
- },
48
- {
49
- "name": "Local Development",
50
- "host": "WordPress",
51
- "slug": "local-development/local-development.php",
52
- "uri": "https://wordpress.org/plugins/local-development/",
53
- "required": true
54
- }
55
- ]
56
- ```
57
-
58
- You will then need to update `wp-dependencies.json` to suit your requirements.
59
-
60
- 3. Finally add the following lines to your plugin or theme's `functions.php` file:
61
-
62
- ```php
63
- require_once __DIR__ . '/vendor/autoload.php';
64
- WP_Dependency_Installer::instance( __DIR__ )->run();
65
- ```
66
-
67
- 4. (optional) Take a look at some of built in [Hooks](https://github.com/afragen/wp-dependency-installer/wiki/Actions-and-Hooks) and [Functions](https://github.com/afragen/wp-dependency-installer/wiki/Helper-Functions) to further customize your plugin look and behaviour:
68
-
69
- That's it, happy blogging!
70
-
71
- ## Development
72
-
73
- PRs are welcome against the `develop` branch.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/afragen/wp-dependency-installer/composer.json DELETED
@@ -1,40 +0,0 @@
1
- {
2
- "name": "afragen/wp-dependency-installer",
3
- "description": "Library that helps WordPress plugin dependency management.",
4
- "version": "4.3.1",
5
- "type": "library",
6
- "license": "MIT",
7
- "authors": [
8
- {
9
- "name": "Andy Fragen",
10
- "email": "andy@thefragens.com",
11
- "homepage": "https://thefragens.com",
12
- "role": "Developer"
13
- },
14
- {
15
- "name": "Matt Gibbs",
16
- "homepage": "https://facetwp.com",
17
- "role": "Developer"
18
- },
19
- {
20
- "name": "Raruto",
21
- "homepage": "https://raruto.github.io",
22
- "role": "Developer"
23
- }
24
- ],
25
- "prefer-stable": true,
26
- "require": {
27
- "php": ">=5.6",
28
- "afragen/wp-dismiss-notice": "*"
29
- },
30
- "support": {
31
- "issues": "https://github.com/afragen/wp-dependency-installer/issues",
32
- "source": "https://github.com/afragen/wp-dependency-installer"
33
- },
34
- "autoload": {
35
- "classmap": [
36
- "wp-dependency-installer.php",
37
- "wp-dependency-installer-skin.php"
38
- ]
39
- }
40
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/afragen/wp-dependency-installer/composer.lock DELETED
@@ -1,63 +0,0 @@
1
- {
2
- "_readme": [
3
- "This file locks the dependencies of your project to a known state",
4
- "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
- "This file is @generated automatically"
6
- ],
7
- "content-hash": "522013fc51ab7aee32000de625cce168",
8
- "packages": [
9
- {
10
- "name": "afragen/wp-dismiss-notice",
11
- "version": "0.2.3",
12
- "source": {
13
- "type": "git",
14
- "url": "https://github.com/afragen/wp-dismiss-notice.git",
15
- "reference": "21949732f1ea21d81500bdda8f882ac7eb0f98af"
16
- },
17
- "dist": {
18
- "type": "zip",
19
- "url": "https://api.github.com/repos/afragen/wp-dismiss-notice/zipball/21949732f1ea21d81500bdda8f882ac7eb0f98af",
20
- "reference": "21949732f1ea21d81500bdda8f882ac7eb0f98af",
21
- "shasum": ""
22
- },
23
- "require": {
24
- "php": ">=5.6"
25
- },
26
- "type": "library",
27
- "autoload": {
28
- "classmap": [
29
- "wp-dismiss-notice.php"
30
- ]
31
- },
32
- "notification-url": "https://packagist.org/downloads/",
33
- "license": [
34
- "MIT"
35
- ],
36
- "authors": [
37
- {
38
- "name": "Andy Fragen",
39
- "email": "andy@thefragens.com",
40
- "homepage": "https://thefragens.com",
41
- "role": "Developer"
42
- }
43
- ],
44
- "description": "Library for time dismissible WordPress admin notices.",
45
- "support": {
46
- "issues": "https://github.com/afragen/wp-dismiss-notice/issues",
47
- "source": "https://github.com/afragen/wp-dismiss-notice"
48
- },
49
- "time": "2021-12-19T21:53:57+00:00"
50
- }
51
- ],
52
- "packages-dev": [],
53
- "aliases": [],
54
- "minimum-stability": "stable",
55
- "stability-flags": [],
56
- "prefer-stable": true,
57
- "prefer-lowest": false,
58
- "platform": {
59
- "php": ">=5.6"
60
- },
61
- "platform-dev": [],
62
- "plugin-api-version": "2.2.0"
63
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/afragen/wp-dependency-installer/wp-dependency-installer-skin.php DELETED
@@ -1,59 +0,0 @@
1
- <?php
2
- /**
3
- * Upgrader API: WP_Dependency_Installer_Skin class
4
- *
5
- * @package WordPress
6
- * @subpackage Upgrader
7
- */
8
-
9
- /**
10
- * Plugin Dependency Installer Skin for WordPress Plugin Installer.
11
- *
12
- * @since 2.8.0
13
- * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php.
14
- *
15
- * @see WP_Upgrader_Skin
16
- */
17
- require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
18
-
19
- /**
20
- * Class WP_Plugin_Dependency_Installer_Skin
21
- */
22
- class WP_Dependency_Installer_Skin extends Plugin_Installer_Skin {
23
- /**
24
- * Header
25
- *
26
- * @return void
27
- */
28
- public function header() {
29
- }
30
-
31
- /**
32
- * Footer
33
- *
34
- * @return void
35
- */
36
- public function footer() {
37
- }
38
-
39
- /**
40
- * Error
41
- *
42
- * @param array $errors Array of errors.
43
- *
44
- * @return void
45
- */
46
- public function error( $errors ) {
47
- }
48
-
49
- /**
50
- * Feedback
51
- *
52
- * @param string $string Feedback string.
53
- * @param array ...$args Array of args.
54
- *
55
- * @return void
56
- */
57
- public function feedback( $string, ...$args ) {
58
- }
59
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/afragen/wp-dependency-installer/wp-dependency-installer.php DELETED
@@ -1,902 +0,0 @@
1
- <?php
2
- /**
3
- * WP Dependency Installer
4
- *
5
- * A lightweight class to add to WordPress plugins or themes to automatically install
6
- * required plugin dependencies. Uses a JSON config file to declare plugin dependencies.
7
- * It can install a plugin from w.org, GitHub, Bitbucket, GitLab, Gitea or direct URL.
8
- *
9
- * @package WP_Dependency_Installer
10
- * @author Andy Fragen, Matt Gibbs, Raruto
11
- * @license MIT
12
- * @link https://github.com/afragen/wp-dependency-installer
13
- */
14
-
15
- /**
16
- * Exit if called directly.
17
- */
18
- if ( ! defined( 'WPINC' ) ) {
19
- die;
20
- }
21
-
22
- if ( ! class_exists( 'WP_Dependency_Installer' ) ) {
23
- /**
24
- * Class WP_Dependency_Installer
25
- */
26
- class WP_Dependency_Installer {
27
- /**
28
- * Holds the JSON file contents.
29
- *
30
- * @var array $config
31
- */
32
- private $config;
33
-
34
- /**
35
- * Holds the current dependency's slug.
36
- *
37
- * @var string $current_slug
38
- */
39
- private $current_slug;
40
-
41
- /**
42
- * Holds the calling plugin/theme file path.
43
- *
44
- * @var string $source
45
- */
46
- private static $caller;
47
-
48
- /**
49
- * Holds the calling plugin/theme slug.
50
- *
51
- * @var string $source
52
- */
53
- private static $source;
54
-
55
- /**
56
- * Holds names of installed dependencies for admin notices.
57
- *
58
- * @var array $notices
59
- */
60
- private $notices;
61
-
62
- /**
63
- * Factory.
64
- *
65
- * @param string $caller File path to calling plugin/theme.
66
- */
67
- public static function instance( $caller = false ) {
68
- static $instance = null;
69
- if ( null === $instance ) {
70
- $instance = new self();
71
- }
72
- self::$caller = $caller;
73
- self::$source = ! $caller ? false : basename( $caller );
74
-
75
- return $instance;
76
- }
77
-
78
- /**
79
- * Private constructor.
80
- */
81
- private function __construct() {
82
- $this->config = [];
83
- $this->notices = [];
84
- }
85
-
86
- /**
87
- * Load hooks.
88
- *
89
- * @return void
90
- */
91
- public function load_hooks() {
92
- add_action( 'admin_init', [ $this, 'admin_init' ] );
93
- add_action( 'admin_footer', [ $this, 'admin_footer' ] );
94
- add_action( 'admin_notices', [ $this, 'admin_notices' ] );
95
- add_action( 'network_admin_notices', [ $this, 'admin_notices' ] );
96
- add_action( 'wp_ajax_dependency_installer', [ $this, 'ajax_router' ] );
97
- add_filter( 'http_request_args', [ $this, 'add_basic_auth_headers' ], 15, 2 );
98
-
99
- add_filter(
100
- 'wp_dependency_notices',
101
- function( $notices, $slug ) {
102
- foreach ( array_keys( $notices ) as $key ) {
103
- if ( ! is_wp_error( $notices[ $key ] ) && $notices[ $key ]['slug'] === $slug ) {
104
- $notices[ $key ]['nonce'] = $this->config[ $slug ]['nonce'];
105
- }
106
- }
107
-
108
- return $notices;
109
- },
110
- 10,
111
- 2
112
- );
113
-
114
- new \WP_Dismiss_Notice();
115
- }
116
-
117
- /**
118
- * Let's get going.
119
- * First load data from wp-dependencies.json if present.
120
- * Then load hooks needed to run.
121
- *
122
- * @param string $caller Path to plugin or theme calling the framework.
123
- *
124
- * @return self
125
- */
126
- public function run( $caller = false ) {
127
- $caller = ! $caller ? self::$caller : $caller;
128
- $config = $this->json_file_decode( $caller . '/wp-dependencies.json' );
129
- if ( ! empty( $config ) ) {
130
- $this->register( $config, $caller );
131
- }
132
- if ( ! empty( $this->config ) ) {
133
- $this->load_hooks();
134
- }
135
-
136
- return $this;
137
- }
138
-
139
- /**
140
- * Decode JSON config data from a file.
141
- *
142
- * @param string $json_path File path to JSON config file.
143
- *
144
- * @return bool|array $config
145
- */
146
- public function json_file_decode( $json_path ) {
147
- $config = [];
148
- if ( file_exists( $json_path ) ) {
149
- $config = file_get_contents( $json_path );
150
- $config = json_decode( $config, true );
151
- }
152
-
153
- return $config;
154
- }
155
-
156
- /**
157
- * Register dependencies (supports multiple instances).
158
- *
159
- * @param array $config JSON config as array.
160
- * @param string $caller Path to plugin or theme calling the framework.
161
- *
162
- * @return self
163
- */
164
- public function register( $config, $caller = false ) {
165
- $source = ! self::$source ? basename( $caller ) : self::$source;
166
- foreach ( $config as $dependency ) {
167
- // Save a reference of current dependent plugin.
168
- $dependency['source'] = $source;
169
- $dependency['sources'][] = $source;
170
- $slug = $dependency['slug'];
171
-
172
- if ( ! function_exists( 'wp_create_nonce' ) ) {
173
- require_once ABSPATH . WPINC . '/pluggable.php';
174
- }
175
- $dependency['nonce'] = \wp_create_nonce( 'wp-dependency-installer_' . $slug );
176
-
177
- // Keep a reference of all dependent plugins.
178
- if ( isset( $this->config[ $slug ] ) ) {
179
- $dependency['sources'] = array_merge( $this->config[ $slug ]['sources'], $dependency['sources'] );
180
- }
181
- // Update config.
182
- if ( ! isset( $this->config[ $slug ] ) || $this->is_required( $dependency ) ) {
183
- $this->config[ $slug ] = $dependency;
184
- }
185
- }
186
-
187
- return $this;
188
- }
189
-
190
- /**
191
- * Process the registered dependencies.
192
- */
193
- private function apply_config() {
194
- foreach ( $this->config as $dependency ) {
195
- $download_link = null;
196
- $base = null;
197
- $uri = $dependency['uri'];
198
- $slug = $dependency['slug'];
199
- $uri_args = parse_url( $uri ); // phpcs:ignore WordPress.WP.AlternativeFunctions.parse_url_parse_url
200
- $port = isset( $uri_args['port'] ) ? $uri_args['port'] : null;
201
- $api = isset( $uri_args['host'] ) ? $uri_args['host'] : null;
202
- $api = ! $port ? $api : "{$api}:{$port}";
203
- $scheme = isset( $uri_args['scheme'] ) ? $uri_args['scheme'] : null;
204
- $scheme = null !== $scheme ? $scheme . '://' : 'https://';
205
- $path = isset( $uri_args['path'] ) ? $uri_args['path'] : null;
206
- $owner_repo = str_replace( '.git', '', trim( $path, '/' ) );
207
-
208
- switch ( $dependency['host'] ) {
209
- case 'github':
210
- $base = null === $api || 'github.com' === $api ? 'api.github.com' : $api;
211
- $download_link = "{$scheme}{$base}/repos/{$owner_repo}/zipball/{$dependency['branch']}";
212
- break;
213
- case 'bitbucket':
214
- $base = null === $api || 'bitbucket.org' === $api ? 'bitbucket.org' : $api;
215
- $download_link = "{$scheme}{$base}/{$owner_repo}/get/{$dependency['branch']}.zip";
216
- break;
217
- case 'gitlab':
218
- $base = null === $api || 'gitlab.com' === $api ? 'gitlab.com' : $api;
219
- $project_id = rawurlencode( $owner_repo );
220
- $download_link = "{$scheme}{$base}/api/v4/projects/{$project_id}/repository/archive.zip";
221
- $download_link = add_query_arg( 'sha', $dependency['branch'], $download_link );
222
- break;
223
- case 'gitea':
224
- $download_link = "{$scheme}{$api}/api/v1/repos/{$owner_repo}/archive/{$dependency['branch']}.zip";
225
- break;
226
- case 'wordpress': // phpcs:ignore WordPress.WP.CapitalPDangit.Misspelled
227
- $download_link = $this->get_dot_org_latest_download( basename( $owner_repo ) );
228
- break;
229
- case 'direct':
230
- $download_link = filter_var( $uri, FILTER_VALIDATE_URL );
231
- break;
232
- }
233
-
234
- /**
235
- * Allow filtering of download link for dependency configuration.
236
- *
237
- * @since 1.4.11
238
- *
239
- * @param string $download_link Download link.
240
- * @param array $dependency Dependency configuration.
241
- */
242
- $dependency['download_link'] = apply_filters( 'wp_dependency_download_link', $download_link, $dependency );
243
-
244
- /**
245
- * Allow filtering of individual dependency config.
246
- *
247
- * @since 3.0.0
248
- *
249
- * @param array $dependency Dependency configuration.
250
- */
251
- $this->config[ $slug ] = apply_filters( 'wp_dependency_config', $dependency );
252
- }
253
- }
254
-
255
- /**
256
- * Get lastest download link from WordPress API.
257
- *
258
- * @param string $slug Plugin slug.
259
- * @return string $download_link
260
- */
261
- private function get_dot_org_latest_download( $slug ) {
262
- $download_link = get_site_transient( 'wpdi-' . md5( $slug ) );
263
-
264
- if ( ! $download_link ) {
265
- $url = 'https://api.wordpress.org/plugins/info/1.1/';
266
- $url = add_query_arg(
267
- [
268
- 'action' => 'plugin_information',
269
- rawurlencode( 'request[slug]' ) => $slug,
270
- ],
271
- $url
272
- );
273
- $response = wp_remote_get( $url );
274
- $response = json_decode( wp_remote_retrieve_body( $response ) );
275
- $download_link = empty( $response )
276
- ? "https://downloads.wordpress.org/plugin/{$slug}.zip"
277
- : $response->download_link;
278
-
279
- set_site_transient( 'wpdi-' . md5( $slug ), $download_link, DAY_IN_SECONDS );
280
- }
281
-
282
- return $download_link;
283
- }
284
-
285
- /**
286
- * Determine if dependency is active or installed.
287
- */
288
- public function admin_init() {
289
- // Get the gears turning.
290
- $this->apply_config();
291
-
292
- // Generate admin notices.
293
- foreach ( $this->config as $slug => $dependency ) {
294
- $is_required = $this->is_required( $dependency );
295
-
296
- if ( $is_required ) {
297
- $this->modify_plugin_row( $slug );
298
- }
299
-
300
- if ( ! wp_verify_nonce( $dependency['nonce'], 'wp-dependency-installer_' . $slug ) ) {
301
- return false;
302
- }
303
-
304
- // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedIf
305
- if ( $this->is_active( $slug ) ) {
306
- // Do nothing.
307
- } elseif ( $this->is_installed( $slug ) ) {
308
- if ( $is_required ) {
309
- $this->notices[] = $this->activate( $slug );
310
- } else {
311
- $this->notices[] = $this->activate_notice( $slug );
312
- }
313
- } else {
314
- if ( $is_required ) {
315
- $this->notices[] = $this->install( $slug );
316
- } else {
317
- $this->notices[] = $this->install_notice( $slug );
318
- }
319
- }
320
-
321
- /**
322
- * Allow filtering of admin notices.
323
- *
324
- * @since 3.0.0
325
- *
326
- * @param array $notices admin notices.
327
- * @param string $slug plugin slug.
328
- */
329
- $this->notices = apply_filters( 'wp_dependency_notices', $this->notices, $slug );
330
- }
331
- }
332
-
333
- /**
334
- * Register jQuery AJAX.
335
- */
336
- public function admin_footer() {
337
- ?>
338
- <script>
339
- (function ($) {
340
- $(function () {
341
- $(document).on('click', '.wpdi-button', function () {
342
- var $this = $(this);
343
- var $parent = $(this).closest('p');
344
- $parent.html('Running...');
345
- $.post(ajaxurl, {
346
- action: 'dependency_installer',
347
- method: $this.attr('data-action'),
348
- slug : $this.attr('data-slug'),
349
- nonce : $this.attr('data-nonce')
350
- }, function (response) {
351
- $parent.html(response);
352
- });
353
- });
354
- $(document).on('click', '.dependency-installer .notice-dismiss', function () {
355
- var $this = $(this);
356
- $.post(ajaxurl, {
357
- action: 'dependency_installer',
358
- method: 'dismiss',
359
- slug : $this.attr('data-slug')
360
- });
361
- });
362
- });
363
- })(jQuery);
364
- </script>
365
- <?php
366
- }
367
-
368
- /**
369
- * AJAX router.
370
- */
371
- public function ajax_router() {
372
- if ( ! isset( $_POST['nonce'], $_POST['slug'] )
373
- || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce'] ) ), 'wp-dependency-installer_' . sanitize_text_field( wp_unslash( $_POST['slug'] ) ) )
374
- ) {
375
- return;
376
- }
377
- $method = isset( $_POST['method'] ) ? sanitize_text_field( wp_unslash( $_POST['method'] ) ) : '';
378
- $slug = isset( $_POST['slug'] ) ? sanitize_text_field( wp_unslash( $_POST['slug'] ) ) : '';
379
- $whitelist = [ 'install', 'activate', 'dismiss' ];
380
-
381
- if ( in_array( $method, $whitelist, true ) ) {
382
- $response = $this->$method( $slug );
383
- $message = is_wp_error( $response ) ? $response->get_error_message() : $response['message'];
384
- esc_html_e( $message );
385
- }
386
- wp_die();
387
- }
388
-
389
- /**
390
- * Check if a dependency is currently required.
391
- *
392
- * @param string|array $plugin Plugin dependency slug or config.
393
- *
394
- * @return boolean True if required. Default: False
395
- */
396
- public function is_required( &$plugin ) {
397
- if ( empty( $this->config ) ) {
398
- return false;
399
- }
400
- if ( is_string( $plugin ) && isset( $this->config[ $plugin ] ) ) {
401
- $dependency = &$this->config[ $plugin ];
402
- } else {
403
- $dependency = &$plugin;
404
- }
405
- if ( isset( $dependency['required'] ) ) {
406
- return true === $dependency['required'] || 'true' === $dependency['required'];
407
- }
408
- if ( isset( $dependency['optional'] ) ) {
409
- return false === $dependency['optional'] || 'false' === $dependency['optional'];
410
- }
411
-
412
- return false;
413
- }
414
-
415
- /**
416
- * Is dependency installed?
417
- *
418
- * @param string $slug Plugin slug.
419
- *
420
- * @return boolean
421
- */
422
- public function is_installed( $slug ) {
423
- $plugins = get_plugins();
424
-
425
- return isset( $plugins[ $slug ] );
426
- }
427
-
428
- /**
429
- * Is dependency active?
430
- *
431
- * @param string $slug Plugin slug.
432
- *
433
- * @return boolean
434
- */
435
- public function is_active( $slug ) {
436
- return is_plugin_active( $slug );
437
- }
438
-
439
- /**
440
- * Install and activate dependency.
441
- *
442
- * @param string $slug Plugin slug.
443
- *
444
- * @return bool|array false or Message.
445
- */
446
- public function install( $slug ) {
447
- if ( $this->is_installed( $slug ) || ! current_user_can( 'update_plugins' ) ) {
448
- return false;
449
- }
450
-
451
- $this->current_slug = $slug;
452
- add_filter( 'upgrader_source_selection', [ $this, 'upgrader_source_selection' ], 10, 2 );
453
-
454
- $skin = new WP_Dependency_Installer_Skin(
455
- [
456
- 'type' => 'plugin',
457
- 'nonce' => wp_nonce_url( $this->config[ $slug ]['download_link'] ),
458
- ]
459
- );
460
- $upgrader = new Plugin_Upgrader( $skin );
461
- $result = $upgrader->install( $this->config[ $slug ]['download_link'] );
462
-
463
- if ( is_wp_error( $result ) ) {
464
- return [
465
- 'status' => 'error',
466
- 'message' => $result->get_error_message(),
467
- ];
468
- }
469
-
470
- if ( null === $result ) {
471
- return [
472
- 'status' => 'error',
473
- 'message' => esc_html__( 'Plugin download failed' ),
474
- ];
475
- }
476
-
477
- wp_cache_flush();
478
- if ( $this->is_required( $slug ) ) {
479
- $result = $this->activate( $slug );
480
- if ( ! is_wp_error( $result ) ) {
481
- return [
482
- 'status' => 'updated',
483
- 'slug' => $slug,
484
- /* translators: %s: Plugin name */
485
- 'message' => sprintf( esc_html__( '%s has been installed and activated.' ), $this->config[ $slug ]['name'] ),
486
- 'source' => $this->config[ $slug ]['source'],
487
- ];
488
- }
489
- }
490
-
491
- if ( is_wp_error( $result ) || ( true !== $result && 'error' === $result['status'] ) ) {
492
- return $result;
493
- }
494
-
495
- return [
496
- 'status' => 'updated',
497
- /* translators: %s: Plugin name */
498
- 'message' => sprintf( esc_html__( '%s has been installed.' ), $this->config[ $slug ]['name'] ),
499
- 'source' => $this->config[ $slug ]['source'],
500
- ];
501
- }
502
-
503
- /**
504
- * Get install plugin notice.
505
- *
506
- * @param string $slug Plugin slug.
507
- *
508
- * @return array Admin notice.
509
- */
510
- public function install_notice( $slug ) {
511
- $dependency = $this->config[ $slug ];
512
-
513
- return [
514
- 'action' => 'install',
515
- 'slug' => $slug,
516
- /* translators: %s: Plugin name */
517
- 'message' => sprintf( esc_html__( 'The %s plugin is recommended.' ), $dependency['name'] ),
518
- 'source' => $dependency['source'],
519
- ];
520
- }
521
-
522
- /**
523
- * Activate dependency.
524
- *
525
- * @param string $slug Plugin slug.
526
- *
527
- * @return array Message.
528
- */
529
- public function activate( $slug ) {
530
- if ( ! current_user_can( 'activate_plugins' ) ) {
531
- return new WP_Error( 'wpdi_activate_plugins', __( 'Current user cannot activate plugins.' ), $this->config[ $slug ]['name'] );
532
- }
533
-
534
- // network activate only if on network admin pages.
535
- $result = is_network_admin() ? activate_plugin( $slug, null, true ) : activate_plugin( $slug );
536
-
537
- if ( is_wp_error( $result ) ) {
538
- return [
539
- 'status' => 'error',
540
- 'message' => $result->get_error_message(),
541
- ];
542
- }
543
-
544
- return [
545
- 'status' => 'updated',
546
- /* translators: %s: Plugin name */
547
- 'message' => sprintf( esc_html__( '%s has been activated.' ), $this->config[ $slug ]['name'] ),
548
- 'source' => $this->config[ $slug ]['source'],
549
- ];
550
- }
551
-
552
- /**
553
- * Get activate plugin notice.
554
- *
555
- * @param string $slug Plugin slug.
556
- *
557
- * @return array Admin notice.
558
- */
559
- public function activate_notice( $slug ) {
560
- $dependency = $this->config[ $slug ];
561
-
562
- return [
563
- 'action' => 'activate',
564
- 'slug' => $slug,
565
- /* translators: %s: Plugin name */
566
- 'message' => sprintf( esc_html__( 'Please activate the %s plugin.' ), $dependency['name'] ),
567
- 'source' => $dependency['source'],
568
- ];
569
- }
570
-
571
- /**
572
- * Dismiss admin notice for a week.
573
- *
574
- * @return array Empty Message.
575
- */
576
- public function dismiss() {
577
- return [
578
- 'status' => 'updated',
579
- 'message' => '',
580
- ];
581
- }
582
-
583
- /**
584
- * Correctly rename dependency for activation.
585
- *
586
- * @param string $source Path fo $source.
587
- * @param string $remote_source Path of $remote_source.
588
- *
589
- * @return string $new_source
590
- */
591
- public function upgrader_source_selection( $source, $remote_source ) {
592
- $new_source = trailingslashit( $remote_source ) . dirname( $this->current_slug );
593
- $this->move( $source, $new_source );
594
-
595
- return trailingslashit( $new_source );
596
- }
597
-
598
- /**
599
- * Rename or recursive file copy and delete.
600
- *
601
- * This is more versatile than `$wp_filesystem->move()`.
602
- * It moves/renames directories as well as files.
603
- * Fix for https://github.com/afragen/github-updater/issues/826,
604
- * strange failure of `rename()`.
605
- *
606
- * @param string $source File path of source.
607
- * @param string $destination File path of destination.
608
- *
609
- * @return bool|void
610
- */
611
- private function move( $source, $destination ) {
612
- if ( $this->filesystem_move( $source, $destination ) ) {
613
- return true;
614
- }
615
- if ( is_dir( $destination ) && rename( $source, $destination ) ) {
616
- return true;
617
- }
618
- // phpcs:ignore WordPress.CodeAnalysis.AssignmentInCondition.Found, Squiz.PHP.DisallowMultipleAssignments.FoundInControlStructure
619
- if ( $dir = opendir( $source ) ) {
620
- if ( ! file_exists( $destination ) ) {
621
- mkdir( $destination );
622
- }
623
- $source = untrailingslashit( $source );
624
- // phpcs:ignore WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition
625
- while ( false !== ( $file = readdir( $dir ) ) ) {
626
- if ( ( '.' !== $file ) && ( '..' !== $file ) && "{$source}/{$file}" !== $destination ) {
627
- if ( is_dir( "{$source}/{$file}" ) ) {
628
- $this->move( "{$source}/{$file}", "{$destination}/{$file}" );
629
- } else {
630
- copy( "{$source}/{$file}", "{$destination}/{$file}" );
631
- unlink( "{$source}/{$file}" );
632
- }
633
- }
634
- }
635
- $iterator = new \FilesystemIterator( $source );
636
- if ( ! $iterator->valid() ) { // True if directory is empty.
637
- rmdir( $source );
638
- }
639
- closedir( $dir );
640
-
641
- return true;
642
- }
643
-
644
- return false;
645
- }
646
-
647
- /**
648
- * Non-direct filesystem move.
649
- *
650
- * @uses $wp_filesystem->move() when FS_METHOD is not 'direct'
651
- *
652
- * @param string $source File path of source.
653
- * @param string $destination File path of destination.
654
- *
655
- * @return bool|void True on success, false on failure.
656
- */
657
- public function filesystem_move( $source, $destination ) {
658
- global $wp_filesystem;
659
- if ( 'direct' !== $wp_filesystem->method ) {
660
- return $wp_filesystem->move( $source, $destination );
661
- }
662
-
663
- return false;
664
- }
665
-
666
- /**
667
- * Display admin notices / action links.
668
- *
669
- * @return bool/string false or Admin notice.
670
- */
671
- public function admin_notices() {
672
- if ( ! current_user_can( 'update_plugins' ) ) {
673
- return false;
674
- }
675
- foreach ( $this->notices as $notice ) {
676
- $status = isset( $notice['status'] ) ? $notice['status'] : 'updated';
677
- $source = isset( $notice['source'] ) ? $notice['source'] : __( 'Dependency' );
678
- $class = esc_attr( $status ) . ' notice is-dismissible dependency-installer';
679
- $label = esc_html( $this->get_dismiss_label( $source ) );
680
- $message = '';
681
- $action = '';
682
- $dismissible = '';
683
-
684
- if ( isset( $notice['message'] ) ) {
685
- $message = esc_html( $notice['message'] );
686
- }
687
-
688
- if ( isset( $notice['action'] ) ) {
689
- $action = sprintf(
690
- ' <a href="javascript:;" class="wpdi-button" data-action="%1$s" data-slug="%2$s" data-nonce="%3$s">%4$s Now &raquo;</a> ',
691
- esc_attr( $notice['action'] ),
692
- esc_attr( $notice['slug'] ),
693
- esc_attr( $notice['nonce'] ),
694
- esc_html( ucfirst( $notice['action'] ) )
695
- );
696
- }
697
- if ( isset( $notice['slug'] ) ) {
698
- /**
699
- * Filters the dismissal timeout.
700
- *
701
- * @since 1.4.1
702
- *
703
- * @param string|int '7' Default dismissal in days.
704
- * @param string $notice['source'] Plugin slug of calling plugin.
705
- * @return string|int Dismissal timeout in days.
706
- */
707
- $timeout = apply_filters( 'wp_dependency_timeout', '7', $source );
708
- $dependency = dirname( $notice['slug'] );
709
- $dismissible = empty( $timeout ) ? '' : sprintf( 'dependency-installer-%1$s-%2$s', esc_attr( $dependency ), esc_attr( $timeout ) );
710
- }
711
- if ( \WP_Dismiss_Notice::is_admin_notice_active( $dismissible ) ) {
712
- printf(
713
- '<div class="%1$s" data-dismissible="%2$s"><p><strong>[%3$s]</strong> %4$s%5$s</p></div>',
714
- esc_attr( $class ),
715
- esc_attr( $dismissible ),
716
- esc_html( $label ),
717
- esc_html( $message ),
718
- // $action is escaped above.
719
- // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
720
- $action
721
- );
722
- }
723
- }
724
- }
725
-
726
- /**
727
- * Make modifications to plugin row.
728
- *
729
- * @param string $plugin_file Plugin file.
730
- */
731
- private function modify_plugin_row( $plugin_file ) {
732
- add_filter( 'network_admin_plugin_action_links_' . $plugin_file, [ $this, 'unset_action_links' ], 10, 2 );
733
- add_filter( 'plugin_action_links_' . $plugin_file, [ $this, 'unset_action_links' ], 10, 2 );
734
- add_action( 'after_plugin_row_' . $plugin_file, [ $this, 'modify_plugin_row_elements' ] );
735
- }
736
-
737
- /**
738
- * Unset plugin action links so required plugins can't be removed or deactivated.
739
- *
740
- * @param array $actions Action links.
741
- * @param string $plugin_file Plugin file.
742
- *
743
- * @return mixed
744
- */
745
- public function unset_action_links( $actions, $plugin_file ) {
746
- /**
747
- * Allow to remove required plugin action links.
748
- *
749
- * @since 3.0.0
750
- *
751
- * @param bool $unset remove default action links.
752
- */
753
- if ( apply_filters( 'wp_dependency_unset_action_links', true ) ) {
754
- if ( isset( $actions['delete'] ) ) {
755
- unset( $actions['delete'] );
756
- }
757
-
758
- if ( isset( $actions['deactivate'] ) ) {
759
- unset( $actions['deactivate'] );
760
- }
761
- }
762
-
763
- /**
764
- * Allow to display of requied plugin label.
765
- *
766
- * @since 3.0.0
767
- *
768
- * @param bool $display show required plugin label.
769
- */
770
- if ( apply_filters( 'wp_dependency_required_label', true ) ) {
771
- /* translators: %s: opening and closing span tags */
772
- $actions = array_merge( [ 'required-plugin' => sprintf( esc_html__( '%1$sRequired Plugin%2$s' ), '<span class="network_active" style="font-variant-caps: small-caps;">', '</span>' ) ], $actions );
773
- }
774
-
775
- return $actions;
776
- }
777
-
778
- /**
779
- * Modify the plugin row elements.
780
- *
781
- * @param string $plugin_file Plugin file.
782
- *
783
- * @return void
784
- */
785
- public function modify_plugin_row_elements( $plugin_file ) {
786
- print '<script>';
787
- /**
788
- * Allow to display additional row meta info of required plugin.
789
- *
790
- * @since 3.0.0
791
- *
792
- * @param bool $display show plugin row meta.
793
- */
794
- if ( apply_filters( 'wp_dependency_required_row_meta', true ) ) {
795
- print 'jQuery("tr[data-plugin=\'' . esc_attr( $plugin_file ) . '\'] .plugin-version-author-uri").append("<br><br><strong>' . esc_html__( 'Required by:' ) . '</strong> ' . esc_html( $this->get_dependency_sources( $plugin_file ) ) . '");';
796
- }
797
- print 'jQuery(".inactive[data-plugin=\'' . esc_attr( $plugin_file ) . '\']").attr("class", "active");';
798
- print 'jQuery(".active[data-plugin=\'' . esc_attr( $plugin_file ) . '\'] .check-column input").remove();';
799
- print '</script>';
800
- }
801
-
802
- /**
803
- * Get formatted string of dependent plugins.
804
- *
805
- * @param string $plugin_file Plugin file.
806
- *
807
- * @return string $dependents
808
- */
809
- private function get_dependency_sources( $plugin_file ) {
810
- // Remove empty values from $sources.
811
- $sources = array_filter( $this->config[ $plugin_file ]['sources'] );
812
- $sources = array_map( [ $this, 'get_dismiss_label' ], $sources );
813
- $sources = implode( ', ', $sources );
814
-
815
- return $sources;
816
- }
817
-
818
- /**
819
- * Get formatted source string for text usage.
820
- *
821
- * @param string $source plugin source.
822
- *
823
- * @return string friendly plugin name.
824
- */
825
- private function get_dismiss_label( $source ) {
826
- $label = str_replace( '-', ' ', $source );
827
- $label = ucwords( $label );
828
- $label = str_ireplace( 'wp ', 'WP ', $label );
829
-
830
- /**
831
- * Filters the dismissal notice label
832
- *
833
- * @since 3.0.0
834
- *
835
- * @param string $label Default dismissal notice string.
836
- * @param string $source Plugin slug of calling plugin.
837
- * @return string Dismissal notice string.
838
- */
839
- return apply_filters( 'wp_dependency_dismiss_label', $label, $source );
840
- }
841
-
842
- /**
843
- * Get the configuration.
844
- *
845
- * @since 1.4.11
846
- *
847
- * @param string $slug Plugin slug.
848
- * @param string $key Dependency key.
849
- *
850
- * @return mixed|array The configuration.
851
- */
852
- public function get_config( $slug = '', $key = '' ) {
853
- if ( empty( $slug ) && empty( $key ) ) {
854
- return $this->config;
855
- } elseif ( empty( $key ) ) {
856
- return isset( $this->config[ $slug ] ) ? $this->config[ $slug ] : null;
857
- } else {
858
- return isset( $this->config[ $slug ][ $key ] ) ? $this->config[ $slug ][ $key ] : null;
859
- }
860
- }
861
-
862
- /**
863
- * Add Basic Auth headers for authentication.
864
- *
865
- * @param array $args HTTP header args.
866
- * @param string $url URL.
867
- *
868
- * @return array $args
869
- */
870
- public function add_basic_auth_headers( $args, $url ) {
871
- if ( null === $this->current_slug ) {
872
- return $args;
873
- }
874
- $package = $this->config[ $this->current_slug ];
875
- $host = $package['host'];
876
- $token = empty( $package['token'] ) ? false : $package['token'];
877
-
878
- if ( $token && $url === $package['download_link'] ) {
879
- if ( 'bitbucket' === $host ) {
880
- // Bitbucket token must be in the form of 'username:password'.
881
- // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
882
- $args['headers']['Authorization'] = 'Basic ' . base64_encode( $token );
883
- }
884
- if ( 'github' === $host || 'gitea' === $host ) {
885
- $args['headers']['Authorization'] = 'token ' . $token;
886
- }
887
- if ( 'gitlab' === $host ) {
888
- $args['headers']['Authorization'] = 'Bearer ' . $token;
889
- }
890
- }
891
-
892
- // dot org should not have auth header.
893
- // phpcs:ignore WordPress.WP.CapitalPDangit.Misspelled
894
- if ( 'wordpress' === $host ) {
895
- unset( $args['headers']['Authorization'] );
896
- }
897
- remove_filter( 'http_request_args', [ $this, 'add_basic_auth_headers' ] );
898
-
899
- return $args;
900
- }
901
- }
902
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/afragen/wp-dismiss-notice/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2021 Andy Fragen
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/afragen/wp-dismiss-notice/README.md DELETED
@@ -1,20 +0,0 @@
1
- # WP Dismiss Notice
2
-
3
- Add time dismissible admin notices to WordPress.
4
- Fork of https://github.com/w3guy/persist-admin-notices-dismissal
5
-
6
- ## Instuctions
7
-
8
- Initialize the class.
9
-
10
- `new \WP_Dismiss_Notice();` in your project.
11
-
12
- ### Admin notice format.
13
-
14
- You must add `data-dismissible='<admin notice identifier>-<timeout>'` to the admin notice div class. `<timeout>` values are from one day '1' to 'forever'. Default timeout is 14 days. The `<admin notice identifier>` should be some unique value based upon the admin notice that you wish to dismiss.
15
-
16
- Example using a 14 day dismissible notice.
17
-
18
- ```html
19
- <div class="notice-warning notice is-dismissible" data-dismissible="my_admin_notice_<hash>-14">...</div>
20
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/afragen/wp-dismiss-notice/composer.json DELETED
@@ -1,28 +0,0 @@
1
- {
2
- "name": "afragen/wp-dismiss-notice",
3
- "description": "Library for time dismissible WordPress admin notices.",
4
- "version": "0.2.3",
5
- "type": "library",
6
- "license": "MIT",
7
- "authors": [
8
- {
9
- "name": "Andy Fragen",
10
- "email": "andy@thefragens.com",
11
- "homepage": "https://thefragens.com",
12
- "role": "Developer"
13
- }
14
- ],
15
- "prefer-stable": true,
16
- "require": {
17
- "php": ">=5.6"
18
- },
19
- "support": {
20
- "issues": "https://github.com/afragen/wp-dismiss-notice/issues",
21
- "source": "https://github.com/afragen/wp-dismiss-notice"
22
- },
23
- "autoload": {
24
- "classmap": [
25
- "wp-dismiss-notice.php"
26
- ]
27
- }
28
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/afragen/wp-dismiss-notice/js/dismiss-notice.js DELETED
@@ -1,40 +0,0 @@
1
- /**
2
- * @output wp-admin/js/dismiss-notice.js
3
- *
4
- * @see https://github.com/w3guy/persist-admin-notices-dismissal
5
- */
6
-
7
- (function ($) {
8
- // Shorthand for ready event.
9
- $(
10
- function () {
11
- $('div[data-dismissible] button.notice-dismiss').on('click',
12
- function (event) {
13
- event.preventDefault();
14
- var $this = $(this);
15
-
16
- var attr_value, option_name, dismissible_length, data;
17
-
18
- attr_value = $this.closest('div[data-dismissible]').attr('data-dismissible').split('-');
19
-
20
- // Remove the dismissible length from the attribute value and rejoin the array.
21
- dismissible_length = attr_value.pop();
22
-
23
- option_name = attr_value.join('-');
24
-
25
- data = {
26
- 'action': 'dismiss_admin_notice',
27
- 'option_name': option_name,
28
- 'dismissible_length': dismissible_length,
29
- 'nonce': window.wp_dismiss_notice.nonce
30
- };
31
-
32
- // Run Ajax request.
33
- $.post(window.wp_dismiss_notice.ajaxurl, data);
34
- $this.closest('div[data-dismissible]').hide('slow');
35
- }
36
- );
37
- }
38
- );
39
-
40
- }(jQuery));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/afragen/wp-dismiss-notice/wp-dismiss-notice.php DELETED
@@ -1,142 +0,0 @@
1
- <?php
2
- /**
3
- * WP Dismiss Notice.
4
- *
5
- * @package wp-dismiss-notice
6
- * @see https://github.com/w3guy/persist-admin-notices-dismissal
7
- */
8
-
9
- /**
10
- * Class WP_Dismiss_Notice
11
- */
12
- class WP_Dismiss_Notice {
13
-
14
- /**
15
- * Init hooks.
16
- */
17
- public static function init() {
18
- add_action( 'admin_enqueue_scripts', [ __CLASS__, 'load_script' ] );
19
- add_action( 'wp_ajax_dismiss_admin_notice', [ __CLASS__, 'dismiss_admin_notice' ] );
20
- }
21
-
22
- /**
23
- * Enqueue javascript and variables.
24
- */
25
- public static function load_script() {
26
-
27
- if ( is_customize_preview() ) {
28
- return;
29
- }
30
-
31
- $composer_js_path = '/vendor/afragen/wp-dismiss-notice/js/dismiss-notice.js';
32
- $plugin_js_url = plugins_url( 'js/dismiss-notice.js', __FILE__, 'wp-dismiss-notice' );
33
-
34
- // Test to get correct URL for JS.
35
- $response = wp_remote_head( $plugin_js_url );
36
- $js_url = ( 200 === wp_remote_retrieve_response_code( $response ) ) || is_wp_error( $response )
37
- ? $plugin_js_url
38
- : get_stylesheet_directory_uri() . $composer_js_path;
39
-
40
- wp_enqueue_script(
41
- 'dismissible-notices',
42
- $js_url,
43
- [ 'jquery', 'common' ],
44
- false,
45
- true
46
- );
47
-
48
- wp_localize_script(
49
- 'dismissible-notices',
50
- 'wp_dismiss_notice',
51
- [
52
- 'nonce' => wp_create_nonce( 'wp-dismiss-notice' ),
53
- 'ajaxurl' => admin_url( 'admin-ajax.php' ),
54
- ]
55
- );
56
- }
57
-
58
- /**
59
- * Handles Ajax request to persist notices dismissal.
60
- * Uses check_ajax_referer to verify nonce.
61
- */
62
- public static function dismiss_admin_notice() {
63
- $option_name = isset( $_POST['option_name'] ) ? sanitize_text_field( wp_unslash( $_POST['option_name'] ) ) : false;
64
- $dismissible_length = isset( $_POST['dismissible_length'] ) ? sanitize_text_field( wp_unslash( $_POST['dismissible_length'] ) ) : 14;
65
-
66
- if ( 'forever' !== $dismissible_length ) {
67
- // If $dismissible_length is not an integer default to 14.
68
- $dismissible_length = ( 0 === absint( $dismissible_length ) ) ? 14 : $dismissible_length;
69
- $dismissible_length = strtotime( absint( $dismissible_length ) . ' days' );
70
- }
71
-
72
- check_ajax_referer( 'wp-dismiss-notice', 'nonce' );
73
- self::set_admin_notice_cache( $option_name, $dismissible_length );
74
- wp_die();
75
- }
76
-
77
- /**
78
- * Is admin notice active?
79
- *
80
- * @param string $arg data-dismissible content of notice.
81
- *
82
- * @return bool
83
- */
84
- public static function is_admin_notice_active( $arg ) {
85
- $array = explode( '-', $arg );
86
- array_pop( $array );
87
- $option_name = implode( '-', $array );
88
- $db_record = self::get_admin_notice_cache( $option_name );
89
-
90
- if ( 'forever' === $db_record ) {
91
- return false;
92
- } elseif ( absint( $db_record ) >= time() ) {
93
- return false;
94
- } else {
95
- return true;
96
- }
97
- }
98
-
99
- /**
100
- * Returns admin notice cached timeout.
101
- *
102
- * @access public
103
- *
104
- * @param string|bool $id admin notice name or false.
105
- *
106
- * @return array|bool The timeout. False if expired.
107
- */
108
- public static function get_admin_notice_cache( $id = false ) {
109
- if ( ! $id ) {
110
- return false;
111
- }
112
- $cache_key = 'wpdn-' . md5( $id );
113
- $timeout = get_site_option( $cache_key );
114
- $timeout = 'forever' === $timeout ? time() + 60 : $timeout;
115
-
116
- if ( empty( $timeout ) || time() > $timeout ) {
117
- return false;
118
- }
119
-
120
- return $timeout;
121
- }
122
-
123
- /**
124
- * Sets admin notice timeout in site option.
125
- *
126
- * @access public
127
- *
128
- * @param string $id Data Identifier.
129
- * @param string|bool $timeout Timeout for admin notice.
130
- *
131
- * @return bool
132
- */
133
- public static function set_admin_notice_cache( $id, $timeout ) {
134
- $cache_key = 'wpdn-' . md5( $id );
135
- update_site_option( $cache_key, $timeout );
136
-
137
- return true;
138
- }
139
- }
140
-
141
- // Initialize.
142
- add_action( 'admin_init', [ 'WP_Dismiss_Notice', 'init' ] );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/autoload.php DELETED
@@ -1,7 +0,0 @@
1
- <?php
2
-
3
- // autoload.php @generated by Composer
4
-
5
- require_once __DIR__ . '/composer/autoload_real.php';
6
-
7
- return ComposerAutoloaderInit7bccf5ae526588cfb1b3cd6112f8e2a4::getLoader();
 
 
 
 
 
 
 
vendor/composer/ClassLoader.php DELETED
@@ -1,572 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of Composer.
5
- *
6
- * (c) Nils Adermann <naderman@naderman.de>
7
- * Jordi Boggiano <j.boggiano@seld.be>
8
- *
9
- * For the full copyright and license information, please view the LICENSE
10
- * file that was distributed with this source code.
11
- */
12
-
13
- namespace Composer\Autoload;
14
-
15
- /**
16
- * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
17
- *
18
- * $loader = new \Composer\Autoload\ClassLoader();
19
- *
20
- * // register classes with namespaces
21
- * $loader->add('Symfony\Component', __DIR__.'/component');
22
- * $loader->add('Symfony', __DIR__.'/framework');
23
- *
24
- * // activate the autoloader
25
- * $loader->register();
26
- *
27
- * // to enable searching the include path (eg. for PEAR packages)
28
- * $loader->setUseIncludePath(true);
29
- *
30
- * In this example, if you try to use a class in the Symfony\Component
31
- * namespace or one of its children (Symfony\Component\Console for instance),
32
- * the autoloader will first look for the class under the component/
33
- * directory, and it will then fallback to the framework/ directory if not
34
- * found before giving up.
35
- *
36
- * This class is loosely based on the Symfony UniversalClassLoader.
37
- *
38
- * @author Fabien Potencier <fabien@symfony.com>
39
- * @author Jordi Boggiano <j.boggiano@seld.be>
40
- * @see https://www.php-fig.org/psr/psr-0/
41
- * @see https://www.php-fig.org/psr/psr-4/
42
- */
43
- class ClassLoader
44
- {
45
- /** @var ?string */
46
- private $vendorDir;
47
-
48
- // PSR-4
49
- /**
50
- * @var array[]
51
- * @psalm-var array<string, array<string, int>>
52
- */
53
- private $prefixLengthsPsr4 = array();
54
- /**
55
- * @var array[]
56
- * @psalm-var array<string, array<int, string>>
57
- */
58
- private $prefixDirsPsr4 = array();
59
- /**
60
- * @var array[]
61
- * @psalm-var array<string, string>
62
- */
63
- private $fallbackDirsPsr4 = array();
64
-
65
- // PSR-0
66
- /**
67
- * @var array[]
68
- * @psalm-var array<string, array<string, string[]>>
69
- */
70
- private $prefixesPsr0 = array();
71
- /**
72
- * @var array[]
73
- * @psalm-var array<string, string>
74
- */
75
- private $fallbackDirsPsr0 = array();
76
-
77
- /** @var bool */
78
- private $useIncludePath = false;
79
-
80
- /**
81
- * @var string[]
82
- * @psalm-var array<string, string>
83
- */
84
- private $classMap = array();
85
-
86
- /** @var bool */
87
- private $classMapAuthoritative = false;
88
-
89
- /**
90
- * @var bool[]
91
- * @psalm-var array<string, bool>
92
- */
93
- private $missingClasses = array();
94
-
95
- /** @var ?string */
96
- private $apcuPrefix;
97
-
98
- /**
99
- * @var self[]
100
- */
101
- private static $registeredLoaders = array();
102
-
103
- /**
104
- * @param ?string $vendorDir
105
- */
106
- public function __construct($vendorDir = null)
107
- {
108
- $this->vendorDir = $vendorDir;
109
- }
110
-
111
- /**
112
- * @return string[]
113
- */
114
- public function getPrefixes()
115
- {
116
- if (!empty($this->prefixesPsr0)) {
117
- return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
118
- }
119
-
120
- return array();
121
- }
122
-
123
- /**
124
- * @return array[]
125
- * @psalm-return array<string, array<int, string>>
126
- */
127
- public function getPrefixesPsr4()
128
- {
129
- return $this->prefixDirsPsr4;
130
- }
131
-
132
- /**
133
- * @return array[]
134
- * @psalm-return array<string, string>
135
- */
136
- public function getFallbackDirs()
137
- {
138
- return $this->fallbackDirsPsr0;
139
- }
140
-
141
- /**
142
- * @return array[]
143
- * @psalm-return array<string, string>
144
- */
145
- public function getFallbackDirsPsr4()
146
- {
147
- return $this->fallbackDirsPsr4;
148
- }
149
-
150
- /**
151
- * @return string[] Array of classname => path
152
- * @psalm-return array<string, string>
153
- */
154
- public function getClassMap()
155
- {
156
- return $this->classMap;
157
- }
158
-
159
- /**
160
- * @param string[] $classMap Class to filename map
161
- * @psalm-param array<string, string> $classMap
162
- *
163
- * @return void
164
- */
165
- public function addClassMap(array $classMap)
166
- {
167
- if ($this->classMap) {
168
- $this->classMap = array_merge($this->classMap, $classMap);
169
- } else {
170
- $this->classMap = $classMap;
171
- }
172
- }
173
-
174
- /**
175
- * Registers a set of PSR-0 directories for a given prefix, either
176
- * appending or prepending to the ones previously set for this prefix.
177
- *
178
- * @param string $prefix The prefix
179
- * @param string[]|string $paths The PSR-0 root directories
180
- * @param bool $prepend Whether to prepend the directories
181
- *
182
- * @return void
183
- */
184
- public function add($prefix, $paths, $prepend = false)
185
- {
186
- if (!$prefix) {
187
- if ($prepend) {
188
- $this->fallbackDirsPsr0 = array_merge(
189
- (array) $paths,
190
- $this->fallbackDirsPsr0
191
- );
192
- } else {
193
- $this->fallbackDirsPsr0 = array_merge(
194
- $this->fallbackDirsPsr0,
195
- (array) $paths
196
- );
197
- }
198
-
199
- return;
200
- }
201
-
202
- $first = $prefix[0];
203
- if (!isset($this->prefixesPsr0[$first][$prefix])) {
204
- $this->prefixesPsr0[$first][$prefix] = (array) $paths;
205
-
206
- return;
207
- }
208
- if ($prepend) {
209
- $this->prefixesPsr0[$first][$prefix] = array_merge(
210
- (array) $paths,
211
- $this->prefixesPsr0[$first][$prefix]
212
- );
213
- } else {
214
- $this->prefixesPsr0[$first][$prefix] = array_merge(
215
- $this->prefixesPsr0[$first][$prefix],
216
- (array) $paths
217
- );
218
- }
219
- }
220
-
221
- /**
222
- * Registers a set of PSR-4 directories for a given namespace, either
223
- * appending or prepending to the ones previously set for this namespace.
224
- *
225
- * @param string $prefix The prefix/namespace, with trailing '\\'
226
- * @param string[]|string $paths The PSR-4 base directories
227
- * @param bool $prepend Whether to prepend the directories
228
- *
229
- * @throws \InvalidArgumentException
230
- *
231
- * @return void
232
- */
233
- public function addPsr4($prefix, $paths, $prepend = false)
234
- {
235
- if (!$prefix) {
236
- // Register directories for the root namespace.
237
- if ($prepend) {
238
- $this->fallbackDirsPsr4 = array_merge(
239
- (array) $paths,
240
- $this->fallbackDirsPsr4
241
- );
242
- } else {
243
- $this->fallbackDirsPsr4 = array_merge(
244
- $this->fallbackDirsPsr4,
245
- (array) $paths
246
- );
247
- }
248
- } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
249
- // Register directories for a new namespace.
250
- $length = strlen($prefix);
251
- if ('\\' !== $prefix[$length - 1]) {
252
- throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
253
- }
254
- $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
255
- $this->prefixDirsPsr4[$prefix] = (array) $paths;
256
- } elseif ($prepend) {
257
- // Prepend directories for an already registered namespace.
258
- $this->prefixDirsPsr4[$prefix] = array_merge(
259
- (array) $paths,
260
- $this->prefixDirsPsr4[$prefix]
261
- );
262
- } else {
263
- // Append directories for an already registered namespace.
264
- $this->prefixDirsPsr4[$prefix] = array_merge(
265
- $this->prefixDirsPsr4[$prefix],
266
- (array) $paths
267
- );
268
- }
269
- }
270
-
271
- /**
272
- * Registers a set of PSR-0 directories for a given prefix,
273
- * replacing any others previously set for this prefix.
274
- *
275
- * @param string $prefix The prefix
276
- * @param string[]|string $paths The PSR-0 base directories
277
- *
278
- * @return void
279
- */
280
- public function set($prefix, $paths)
281
- {
282
- if (!$prefix) {
283
- $this->fallbackDirsPsr0 = (array) $paths;
284
- } else {
285
- $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
286
- }
287
- }
288
-
289
- /**
290
- * Registers a set of PSR-4 directories for a given namespace,
291
- * replacing any others previously set for this namespace.
292
- *
293
- * @param string $prefix The prefix/namespace, with trailing '\\'
294
- * @param string[]|string $paths The PSR-4 base directories
295
- *
296
- * @throws \InvalidArgumentException
297
- *
298
- * @return void
299
- */
300
- public function setPsr4($prefix, $paths)
301
- {
302
- if (!$prefix) {
303
- $this->fallbackDirsPsr4 = (array) $paths;
304
- } else {
305
- $length = strlen($prefix);
306
- if ('\\' !== $prefix[$length - 1]) {
307
- throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
308
- }
309
- $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
310
- $this->prefixDirsPsr4[$prefix] = (array) $paths;
311
- }
312
- }
313
-
314
- /**
315
- * Turns on searching the include path for class files.
316
- *
317
- * @param bool $useIncludePath
318
- *
319
- * @return void
320
- */
321
- public function setUseIncludePath($useIncludePath)
322
- {
323
- $this->useIncludePath = $useIncludePath;
324
- }
325
-
326
- /**
327
- * Can be used to check if the autoloader uses the include path to check
328
- * for classes.
329
- *
330
- * @return bool
331
- */
332
- public function getUseIncludePath()
333
- {
334
- return $this->useIncludePath;
335
- }
336
-
337
- /**
338
- * Turns off searching the prefix and fallback directories for classes
339
- * that have not been registered with the class map.
340
- *
341
- * @param bool $classMapAuthoritative
342
- *
343
- * @return void
344
- */
345
- public function setClassMapAuthoritative($classMapAuthoritative)
346
- {
347
- $this->classMapAuthoritative = $classMapAuthoritative;
348
- }
349
-
350
- /**
351
- * Should class lookup fail if not found in the current class map?
352
- *
353
- * @return bool
354
- */
355
- public function isClassMapAuthoritative()
356
- {
357
- return $this->classMapAuthoritative;
358
- }
359
-
360
- /**
361
- * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
362
- *
363
- * @param string|null $apcuPrefix
364
- *
365
- * @return void
366
- */
367
- public function setApcuPrefix($apcuPrefix)
368
- {
369
- $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
370
- }
371
-
372
- /**
373
- * The APCu prefix in use, or null if APCu caching is not enabled.
374
- *
375
- * @return string|null
376
- */
377
- public function getApcuPrefix()
378
- {
379
- return $this->apcuPrefix;
380
- }
381
-
382
- /**
383
- * Registers this instance as an autoloader.
384
- *
385
- * @param bool $prepend Whether to prepend the autoloader or not
386
- *
387
- * @return void
388
- */
389
- public function register($prepend = false)
390
- {
391
- spl_autoload_register(array($this, 'loadClass'), true, $prepend);
392
-
393
- if (null === $this->vendorDir) {
394
- return;
395
- }
396
-
397
- if ($prepend) {
398
- self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
399
- } else {
400
- unset(self::$registeredLoaders[$this->vendorDir]);
401
- self::$registeredLoaders[$this->vendorDir] = $this;
402
- }
403
- }
404
-
405
- /**
406
- * Unregisters this instance as an autoloader.
407
- *
408
- * @return void
409
- */
410
- public function unregister()
411
- {
412
- spl_autoload_unregister(array($this, 'loadClass'));
413
-
414
- if (null !== $this->vendorDir) {
415
- unset(self::$registeredLoaders[$this->vendorDir]);
416
- }
417
- }
418
-
419
- /**
420
- * Loads the given class or interface.
421
- *
422
- * @param string $class The name of the class
423
- * @return true|null True if loaded, null otherwise
424
- */
425
- public function loadClass($class)
426
- {
427
- if ($file = $this->findFile($class)) {
428
- includeFile($file);
429
-
430
- return true;
431
- }
432
-
433
- return null;
434
- }
435
-
436
- /**
437
- * Finds the path to the file where the class is defined.
438
- *
439
- * @param string $class The name of the class
440
- *
441
- * @return string|false The path if found, false otherwise
442
- */
443
- public function findFile($class)
444
- {
445
- // class map lookup
446
- if (isset($this->classMap[$class])) {
447
- return $this->classMap[$class];
448
- }
449
- if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
450
- return false;
451
- }
452
- if (null !== $this->apcuPrefix) {
453
- $file = apcu_fetch($this->apcuPrefix.$class, $hit);
454
- if ($hit) {
455
- return $file;
456
- }
457
- }
458
-
459
- $file = $this->findFileWithExtension($class, '.php');
460
-
461
- // Search for Hack files if we are running on HHVM
462
- if (false === $file && defined('HHVM_VERSION')) {
463
- $file = $this->findFileWithExtension($class, '.hh');
464
- }
465
-
466
- if (null !== $this->apcuPrefix) {
467
- apcu_add($this->apcuPrefix.$class, $file);
468
- }
469
-
470
- if (false === $file) {
471
- // Remember that this class does not exist.
472
- $this->missingClasses[$class] = true;
473
- }
474
-
475
- return $file;
476
- }
477
-
478
- /**
479
- * Returns the currently registered loaders indexed by their corresponding vendor directories.
480
- *
481
- * @return self[]
482
- */
483
- public static function getRegisteredLoaders()
484
- {
485
- return self::$registeredLoaders;
486
- }
487
-
488
- /**
489
- * @param string $class
490
- * @param string $ext
491
- * @return string|false
492
- */
493
- private function findFileWithExtension($class, $ext)
494
- {
495
- // PSR-4 lookup
496
- $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
497
-
498
- $first = $class[0];
499
- if (isset($this->prefixLengthsPsr4[$first])) {
500
- $subPath = $class;
501
- while (false !== $lastPos = strrpos($subPath, '\\')) {
502
- $subPath = substr($subPath, 0, $lastPos);
503
- $search = $subPath . '\\';
504
- if (isset($this->prefixDirsPsr4[$search])) {
505
- $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
506
- foreach ($this->prefixDirsPsr4[$search] as $dir) {
507
- if (file_exists($file = $dir . $pathEnd)) {
508
- return $file;
509
- }
510
- }
511
- }
512
- }
513
- }
514
-
515
- // PSR-4 fallback dirs
516
- foreach ($this->fallbackDirsPsr4 as $dir) {
517
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
518
- return $file;
519
- }
520
- }
521
-
522
- // PSR-0 lookup
523
- if (false !== $pos = strrpos($class, '\\')) {
524
- // namespaced class name
525
- $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
526
- . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
527
- } else {
528
- // PEAR-like class name
529
- $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
530
- }
531
-
532
- if (isset($this->prefixesPsr0[$first])) {
533
- foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
534
- if (0 === strpos($class, $prefix)) {
535
- foreach ($dirs as $dir) {
536
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
537
- return $file;
538
- }
539
- }
540
- }
541
- }
542
- }
543
-
544
- // PSR-0 fallback dirs
545
- foreach ($this->fallbackDirsPsr0 as $dir) {
546
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
547
- return $file;
548
- }
549
- }
550
-
551
- // PSR-0 include paths.
552
- if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
553
- return $file;
554
- }
555
-
556
- return false;
557
- }
558
- }
559
-
560
- /**
561
- * Scope isolated include.
562
- *
563
- * Prevents access to $this/self from included files.
564
- *
565
- * @param string $file
566
- * @return void
567
- * @private
568
- */
569
- function includeFile($file)
570
- {
571
- include $file;
572
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/InstalledVersions.php DELETED
@@ -1,350 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of Composer.
5
- *
6
- * (c) Nils Adermann <naderman@naderman.de>
7
- * Jordi Boggiano <j.boggiano@seld.be>
8
- *
9
- * For the full copyright and license information, please view the LICENSE
10
- * file that was distributed with this source code.
11
- */
12
-
13
- namespace Composer;
14
-
15
- use Composer\Autoload\ClassLoader;
16
- use Composer\Semver\VersionParser;
17
-
18
- /**
19
- * This class is copied in every Composer installed project and available to all
20
- *
21
- * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
22
- *
23
- * To require its presence, you can require `composer-runtime-api ^2.0`
24
- */
25
- class InstalledVersions
26
- {
27
- /**
28
- * @var mixed[]|null
29
- * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
30
- */
31
- private static $installed;
32
-
33
- /**
34
- * @var bool|null
35
- */
36
- private static $canGetVendors;
37
-
38
- /**
39
- * @var array[]
40
- * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
41
- */
42
- private static $installedByVendor = array();
43
-
44
- /**
45
- * Returns a list of all package names which are present, either by being installed, replaced or provided
46
- *
47
- * @return string[]
48
- * @psalm-return list<string>
49
- */
50
- public static function getInstalledPackages()
51
- {
52
- $packages = array();
53
- foreach (self::getInstalled() as $installed) {
54
- $packages[] = array_keys($installed['versions']);
55
- }
56
-
57
- if (1 === \count($packages)) {
58
- return $packages[0];
59
- }
60
-
61
- return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
62
- }
63
-
64
- /**
65
- * Returns a list of all package names with a specific type e.g. 'library'
66
- *
67
- * @param string $type
68
- * @return string[]
69
- * @psalm-return list<string>
70
- */
71
- public static function getInstalledPackagesByType($type)
72
- {
73
- $packagesByType = array();
74
-
75
- foreach (self::getInstalled() as $installed) {
76
- foreach ($installed['versions'] as $name => $package) {
77
- if (isset($package['type']) && $package['type'] === $type) {
78
- $packagesByType[] = $name;
79
- }
80
- }
81
- }
82
-
83
- return $packagesByType;
84
- }
85
-
86
- /**
87
- * Checks whether the given package is installed
88
- *
89
- * This also returns true if the package name is provided or replaced by another package
90
- *
91
- * @param string $packageName
92
- * @param bool $includeDevRequirements
93
- * @return bool
94
- */
95
- public static function isInstalled($packageName, $includeDevRequirements = true)
96
- {
97
- foreach (self::getInstalled() as $installed) {
98
- if (isset($installed['versions'][$packageName])) {
99
- return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
100
- }
101
- }
102
-
103
- return false;
104
- }
105
-
106
- /**
107
- * Checks whether the given package satisfies a version constraint
108
- *
109
- * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
110
- *
111
- * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
112
- *
113
- * @param VersionParser $parser Install composer/semver to have access to this class and functionality
114
- * @param string $packageName
115
- * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
116
- * @return bool
117
- */
118
- public static function satisfies(VersionParser $parser, $packageName, $constraint)
119
- {
120
- $constraint = $parser->parseConstraints($constraint);
121
- $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
122
-
123
- return $provided->matches($constraint);
124
- }
125
-
126
- /**
127
- * Returns a version constraint representing all the range(s) which are installed for a given package
128
- *
129
- * It is easier to use this via isInstalled() with the $constraint argument if you need to check
130
- * whether a given version of a package is installed, and not just whether it exists
131
- *
132
- * @param string $packageName
133
- * @return string Version constraint usable with composer/semver
134
- */
135
- public static function getVersionRanges($packageName)
136
- {
137
- foreach (self::getInstalled() as $installed) {
138
- if (!isset($installed['versions'][$packageName])) {
139
- continue;
140
- }
141
-
142
- $ranges = array();
143
- if (isset($installed['versions'][$packageName]['pretty_version'])) {
144
- $ranges[] = $installed['versions'][$packageName]['pretty_version'];
145
- }
146
- if (array_key_exists('aliases', $installed['versions'][$packageName])) {
147
- $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
148
- }
149
- if (array_key_exists('replaced', $installed['versions'][$packageName])) {
150
- $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
151
- }
152
- if (array_key_exists('provided', $installed['versions'][$packageName])) {
153
- $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
154
- }
155
-
156
- return implode(' || ', $ranges);
157
- }
158
-
159
- throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
160
- }
161
-
162
- /**
163
- * @param string $packageName
164
- * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
165
- */
166
- public static function getVersion($packageName)
167
- {
168
- foreach (self::getInstalled() as $installed) {
169
- if (!isset($installed['versions'][$packageName])) {
170
- continue;
171
- }
172
-
173
- if (!isset($installed['versions'][$packageName]['version'])) {
174
- return null;
175
- }
176
-
177
- return $installed['versions'][$packageName]['version'];
178
- }
179
-
180
- throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
181
- }
182
-
183
- /**
184
- * @param string $packageName
185
- * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
186
- */
187
- public static function getPrettyVersion($packageName)
188
- {
189
- foreach (self::getInstalled() as $installed) {
190
- if (!isset($installed['versions'][$packageName])) {
191
- continue;
192
- }
193
-
194
- if (!isset($installed['versions'][$packageName]['pretty_version'])) {
195
- return null;
196
- }
197
-
198
- return $installed['versions'][$packageName]['pretty_version'];
199
- }
200
-
201
- throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
202
- }
203
-
204
- /**
205
- * @param string $packageName
206
- * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
207
- */
208
- public static function getReference($packageName)
209
- {
210
- foreach (self::getInstalled() as $installed) {
211
- if (!isset($installed['versions'][$packageName])) {
212
- continue;
213
- }
214
-
215
- if (!isset($installed['versions'][$packageName]['reference'])) {
216
- return null;
217
- }
218
-
219
- return $installed['versions'][$packageName]['reference'];
220
- }
221
-
222
- throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
223
- }
224
-
225
- /**
226
- * @param string $packageName
227
- * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
228
- */
229
- public static function getInstallPath($packageName)
230
- {
231
- foreach (self::getInstalled() as $installed) {
232
- if (!isset($installed['versions'][$packageName])) {
233
- continue;
234
- }
235
-
236
- return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
237
- }
238
-
239
- throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
240
- }
241
-
242
- /**
243
- * @return array
244
- * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
245
- */
246
- public static function getRootPackage()
247
- {
248
- $installed = self::getInstalled();
249
-
250
- return $installed[0]['root'];
251
- }
252
-
253
- /**
254
- * Returns the raw installed.php data for custom implementations
255
- *
256
- * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
257
- * @return array[]
258
- * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
259
- */
260
- public static function getRawData()
261
- {
262
- @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
263
-
264
- if (null === self::$installed) {
265
- // only require the installed.php file if this file is loaded from its dumped location,
266
- // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
267
- if (substr(__DIR__, -8, 1) !== 'C') {
268
- self::$installed = include __DIR__ . '/installed.php';
269
- } else {
270
- self::$installed = array();
271
- }
272
- }
273
-
274
- return self::$installed;
275
- }
276
-
277
- /**
278
- * Returns the raw data of all installed.php which are currently loaded for custom implementations
279
- *
280
- * @return array[]
281
- * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
282
- */
283
- public static function getAllRawData()
284
- {
285
- return self::getInstalled();
286
- }
287
-
288
- /**
289
- * Lets you reload the static array from another file
290
- *
291
- * This is only useful for complex integrations in which a project needs to use
292
- * this class but then also needs to execute another project's autoloader in process,
293
- * and wants to ensure both projects have access to their version of installed.php.
294
- *
295
- * A typical case would be PHPUnit, where it would need to make sure it reads all
296
- * the data it needs from this class, then call reload() with
297
- * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
298
- * the project in which it runs can then also use this class safely, without
299
- * interference between PHPUnit's dependencies and the project's dependencies.
300
- *
301
- * @param array[] $data A vendor/composer/installed.php data set
302
- * @return void
303
- *
304
- * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
305
- */
306
- public static function reload($data)
307
- {
308
- self::$installed = $data;
309
- self::$installedByVendor = array();
310
- }
311
-
312
- /**
313
- * @return array[]
314
- * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
315
- */
316
- private static function getInstalled()
317
- {
318
- if (null === self::$canGetVendors) {
319
- self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
320
- }
321
-
322
- $installed = array();
323
-
324
- if (self::$canGetVendors) {
325
- foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
326
- if (isset(self::$installedByVendor[$vendorDir])) {
327
- $installed[] = self::$installedByVendor[$vendorDir];
328
- } elseif (is_file($vendorDir.'/composer/installed.php')) {
329
- $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
330
- if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
331
- self::$installed = $installed[count($installed) - 1];
332
- }
333
- }
334
- }
335
- }
336
-
337
- if (null === self::$installed) {
338
- // only require the installed.php file if this file is loaded from its dumped location,
339
- // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
340
- if (substr(__DIR__, -8, 1) !== 'C') {
341
- self::$installed = require __DIR__ . '/installed.php';
342
- } else {
343
- self::$installed = array();
344
- }
345
- }
346
- $installed[] = self::$installed;
347
-
348
- return $installed;
349
- }
350
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/LICENSE DELETED
@@ -1,21 +0,0 @@
1
-
2
- Copyright (c) Nils Adermann, Jordi Boggiano
3
-
4
- Permission is hereby granted, free of charge, to any person obtaining a copy
5
- of this software and associated documentation files (the "Software"), to deal
6
- in the Software without restriction, including without limitation the rights
7
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- copies of the Software, and to permit persons to whom the Software is furnished
9
- to do so, subject to the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be included in all
12
- copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
- THE SOFTWARE.
21
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/autoload_classmap.php DELETED
@@ -1,13 +0,0 @@
1
- <?php
2
-
3
- // autoload_classmap.php @generated by Composer
4
-
5
- $vendorDir = dirname(dirname(__FILE__));
6
- $baseDir = dirname($vendorDir);
7
-
8
- return array(
9
- 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
10
- 'WP_Dependency_Installer' => $vendorDir . '/afragen/wp-dependency-installer/wp-dependency-installer.php',
11
- 'WP_Dependency_Installer_Skin' => $vendorDir . '/afragen/wp-dependency-installer/wp-dependency-installer-skin.php',
12
- 'WP_Dismiss_Notice' => $vendorDir . '/afragen/wp-dismiss-notice/wp-dismiss-notice.php',
13
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/autoload_namespaces.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
-
3
- // autoload_namespaces.php @generated by Composer
4
-
5
- $vendorDir = dirname(dirname(__FILE__));
6
- $baseDir = dirname($vendorDir);
7
-
8
- return array(
9
- );
 
 
 
 
 
 
 
 
 
vendor/composer/autoload_psr4.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
-
3
- // autoload_psr4.php @generated by Composer
4
-
5
- $vendorDir = dirname(dirname(__FILE__));
6
- $baseDir = dirname($vendorDir);
7
-
8
- return array(
9
- );
 
 
 
 
 
 
 
 
 
vendor/composer/autoload_real.php DELETED
@@ -1,57 +0,0 @@
1
- <?php
2
-
3
- // autoload_real.php @generated by Composer
4
-
5
- class ComposerAutoloaderInit7bccf5ae526588cfb1b3cd6112f8e2a4
6
- {
7
- private static $loader;
8
-
9
- public static function loadClassLoader($class)
10
- {
11
- if ('Composer\Autoload\ClassLoader' === $class) {
12
- require __DIR__ . '/ClassLoader.php';
13
- }
14
- }
15
-
16
- /**
17
- * @return \Composer\Autoload\ClassLoader
18
- */
19
- public static function getLoader()
20
- {
21
- if (null !== self::$loader) {
22
- return self::$loader;
23
- }
24
-
25
- require __DIR__ . '/platform_check.php';
26
-
27
- spl_autoload_register(array('ComposerAutoloaderInit7bccf5ae526588cfb1b3cd6112f8e2a4', 'loadClassLoader'), true, true);
28
- self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
- spl_autoload_unregister(array('ComposerAutoloaderInit7bccf5ae526588cfb1b3cd6112f8e2a4', 'loadClassLoader'));
30
-
31
- $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32
- if ($useStaticLoader) {
33
- require __DIR__ . '/autoload_static.php';
34
-
35
- call_user_func(\Composer\Autoload\ComposerStaticInit7bccf5ae526588cfb1b3cd6112f8e2a4::getInitializer($loader));
36
- } else {
37
- $map = require __DIR__ . '/autoload_namespaces.php';
38
- foreach ($map as $namespace => $path) {
39
- $loader->set($namespace, $path);
40
- }
41
-
42
- $map = require __DIR__ . '/autoload_psr4.php';
43
- foreach ($map as $namespace => $path) {
44
- $loader->setPsr4($namespace, $path);
45
- }
46
-
47
- $classMap = require __DIR__ . '/autoload_classmap.php';
48
- if ($classMap) {
49
- $loader->addClassMap($classMap);
50
- }
51
- }
52
-
53
- $loader->register(true);
54
-
55
- return $loader;
56
- }
57
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/autoload_static.php DELETED
@@ -1,23 +0,0 @@
1
- <?php
2
-
3
- // autoload_static.php @generated by Composer
4
-
5
- namespace Composer\Autoload;
6
-
7
- class ComposerStaticInit7bccf5ae526588cfb1b3cd6112f8e2a4
8
- {
9
- public static $classMap = array (
10
- 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
11
- 'WP_Dependency_Installer' => __DIR__ . '/..' . '/afragen/wp-dependency-installer/wp-dependency-installer.php',
12
- 'WP_Dependency_Installer_Skin' => __DIR__ . '/..' . '/afragen/wp-dependency-installer/wp-dependency-installer-skin.php',
13
- 'WP_Dismiss_Notice' => __DIR__ . '/..' . '/afragen/wp-dismiss-notice/wp-dismiss-notice.php',
14
- );
15
-
16
- public static function getInitializer(ClassLoader $loader)
17
- {
18
- return \Closure::bind(function () use ($loader) {
19
- $loader->classMap = ComposerStaticInit7bccf5ae526588cfb1b3cd6112f8e2a4::$classMap;
20
-
21
- }, null, ClassLoader::class);
22
- }
23
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installed.json DELETED
@@ -1,114 +0,0 @@
1
- {
2
- "packages": [
3
- {
4
- "name": "afragen/wp-dependency-installer",
5
- "version": "4.3.1",
6
- "version_normalized": "4.3.1.0",
7
- "source": {
8
- "type": "git",
9
- "url": "https://github.com/afragen/wp-dependency-installer.git",
10
- "reference": "6572e3b8027dd1f0f5655eeea482ddef22d8ca7c"
11
- },
12
- "dist": {
13
- "type": "zip",
14
- "url": "https://api.github.com/repos/afragen/wp-dependency-installer/zipball/6572e3b8027dd1f0f5655eeea482ddef22d8ca7c",
15
- "reference": "6572e3b8027dd1f0f5655eeea482ddef22d8ca7c",
16
- "shasum": ""
17
- },
18
- "require": {
19
- "afragen/wp-dismiss-notice": "*",
20
- "php": ">=5.6"
21
- },
22
- "time": "2022-01-19T00:48:02+00:00",
23
- "type": "library",
24
- "installation-source": "dist",
25
- "autoload": {
26
- "classmap": [
27
- "wp-dependency-installer.php",
28
- "wp-dependency-installer-skin.php"
29
- ]
30
- },
31
- "notification-url": "https://packagist.org/downloads/",
32
- "license": [
33
- "MIT"
34
- ],
35
- "authors": [
36
- {
37
- "name": "Andy Fragen",
38
- "email": "andy@thefragens.com",
39
- "homepage": "https://thefragens.com",
40
- "role": "Developer"
41
- },
42
- {
43
- "name": "Matt Gibbs",
44
- "homepage": "https://facetwp.com",
45
- "role": "Developer"
46
- },
47
- {
48
- "name": "Raruto",
49
- "homepage": "https://raruto.github.io",
50
- "role": "Developer"
51
- }
52
- ],
53
- "description": "Library that helps WordPress plugin dependency management.",
54
- "support": {
55
- "issues": "https://github.com/afragen/wp-dependency-installer/issues",
56
- "source": "https://github.com/afragen/wp-dependency-installer"
57
- },
58
- "funding": [
59
- {
60
- "url": "https://github.com/afragen",
61
- "type": "github"
62
- }
63
- ],
64
- "install-path": "../afragen/wp-dependency-installer"
65
- },
66
- {
67
- "name": "afragen/wp-dismiss-notice",
68
- "version": "0.2.3",
69
- "version_normalized": "0.2.3.0",
70
- "source": {
71
- "type": "git",
72
- "url": "https://github.com/afragen/wp-dismiss-notice.git",
73
- "reference": "21949732f1ea21d81500bdda8f882ac7eb0f98af"
74
- },
75
- "dist": {
76
- "type": "zip",
77
- "url": "https://api.github.com/repos/afragen/wp-dismiss-notice/zipball/21949732f1ea21d81500bdda8f882ac7eb0f98af",
78
- "reference": "21949732f1ea21d81500bdda8f882ac7eb0f98af",
79
- "shasum": ""
80
- },
81
- "require": {
82
- "php": ">=5.6"
83
- },
84
- "time": "2021-12-19T21:53:57+00:00",
85
- "type": "library",
86
- "installation-source": "dist",
87
- "autoload": {
88
- "classmap": [
89
- "wp-dismiss-notice.php"
90
- ]
91
- },
92
- "notification-url": "https://packagist.org/downloads/",
93
- "license": [
94
- "MIT"
95
- ],
96
- "authors": [
97
- {
98
- "name": "Andy Fragen",
99
- "email": "andy@thefragens.com",
100
- "homepage": "https://thefragens.com",
101
- "role": "Developer"
102
- }
103
- ],
104
- "description": "Library for time dismissible WordPress admin notices.",
105
- "support": {
106
- "issues": "https://github.com/afragen/wp-dismiss-notice/issues",
107
- "source": "https://github.com/afragen/wp-dismiss-notice"
108
- },
109
- "install-path": "../afragen/wp-dismiss-notice"
110
- }
111
- ],
112
- "dev": true,
113
- "dev-package-names": []
114
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installed.php DELETED
@@ -1,41 +0,0 @@
1
- <?php return array(
2
- 'root' => array(
3
- 'pretty_version' => '1.0.0+no-version-set',
4
- 'version' => '1.0.0.0',
5
- 'type' => 'library',
6
- 'install_path' => __DIR__ . '/../../',
7
- 'aliases' => array(),
8
- 'reference' => NULL,
9
- 'name' => '__root__',
10
- 'dev' => true,
11
- ),
12
- 'versions' => array(
13
- '__root__' => array(
14
- 'pretty_version' => '1.0.0+no-version-set',
15
- 'version' => '1.0.0.0',
16
- 'type' => 'library',
17
- 'install_path' => __DIR__ . '/../../',
18
- 'aliases' => array(),
19
- 'reference' => NULL,
20
- 'dev_requirement' => false,
21
- ),
22
- 'afragen/wp-dependency-installer' => array(
23
- 'pretty_version' => '4.3.1',
24
- 'version' => '4.3.1.0',
25
- 'type' => 'library',
26
- 'install_path' => __DIR__ . '/../afragen/wp-dependency-installer',
27
- 'aliases' => array(),
28
- 'reference' => '6572e3b8027dd1f0f5655eeea482ddef22d8ca7c',
29
- 'dev_requirement' => false,
30
- ),
31
- 'afragen/wp-dismiss-notice' => array(
32
- 'pretty_version' => '0.2.3',
33
- 'version' => '0.2.3.0',
34
- 'type' => 'library',
35
- 'install_path' => __DIR__ . '/../afragen/wp-dismiss-notice',
36
- 'aliases' => array(),
37
- 'reference' => '21949732f1ea21d81500bdda8f882ac7eb0f98af',
38
- 'dev_requirement' => false,
39
- ),
40
- ),
41
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/.editorconfig DELETED
@@ -1,10 +0,0 @@
1
- ; top-most EditorConfig file
2
- root = true
3
-
4
- ; Unix-style newlines
5
- [*]
6
- end_of_line = LF
7
-
8
- [*.php]
9
- indent_style = space
10
- indent_size = 4
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/.gitignore DELETED
@@ -1,3 +0,0 @@
1
- vendor/
2
- composer.lock
3
- .idea/
 
 
 
vendor/composer/installers/.travis.yml DELETED
@@ -1,33 +0,0 @@
1
- language: php
2
-
3
- sudo: false
4
-
5
- dist: trusty
6
-
7
- git:
8
- depth: 5
9
-
10
- php:
11
- - 5.4
12
- - 5.5
13
- - 5.6
14
- - 7.0
15
- - 7.1
16
- - 7.2
17
- - hhvm
18
- - nightly
19
-
20
- matrix:
21
- include:
22
- - dist: precise
23
- php: 5.3
24
- fast_finish: true
25
- allow_failures:
26
- - php: nightly
27
-
28
- before_script:
29
- - composer self-update
30
- - composer install
31
-
32
- script:
33
- - composer test
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/CHANGELOG.md DELETED
@@ -1,86 +0,0 @@
1
- # Change Log
2
-
3
- ## [Unreleased]
4
-
5
- ## v1.5.0 - 2017-12-29
6
- ### Added
7
- * Added WordPress dropin support.
8
- * Added new types supported for Eliasis.
9
- * Added support for Phoenix CMS.
10
- * Added MODX installer.
11
- * Added Majima instaler.
12
- * Added SiteDirect installer.
13
- * Added support optional prefix in OctoberCMS installers.
14
- * Added PHP 7.2 support.
15
-
16
- ### Changed
17
- * Changed remove packages, see [#348](https://github.com/composer/installers/pull/348).
18
-
19
- ### Fixed
20
- * Fixed code style, removed unused imports.
21
-
22
- ## v1.4.0 - 2017-08-09
23
- ### Added
24
- * Installer for eZ Platform.
25
- * Installer for UserFrosting.
26
- * Installer for Osclass.
27
- * Installer for Lan Management System.
28
-
29
- ### Changed
30
- * Added vendor name to package path for Lavalite.
31
-
32
- ## v1.3.0 - 2017-04-24
33
- ### Added
34
- * Kanboard plugins installer.
35
- * Porto-SAP installer.
36
- * Add `core` to concrete5 installer.
37
- * Support Moodle "search" plugin type.
38
- * SyDES installer.
39
- * iTop installer.
40
- * Lavalite installer.
41
- * Module type for Eliasis.
42
- * Vgmcp installer.
43
- * OntoWiki installer.
44
- * The requirements for contributing (CONTRIBUTING.md).
45
-
46
- ## v1.2.0 - 2016-08-13
47
- ### Added
48
- * Installer for Attogram.
49
- * Installer for Cockpit.
50
- * Installer for Plentymarkets.
51
- * Installer for ReIndex.
52
- * Installer for Vanilla.
53
- * Installer for YAWIK.
54
- * Added missing environments for new Shopware (5.2) Plugin System.
55
-
56
- ## v1.1.0 - 2016-07-05
57
- ### Added
58
- * Installer for ReIndex.
59
- * Installer for RadPHP.
60
- * Installer for Decibel.
61
- * Installer for Phifty.
62
- * Installer for ExpressionEngine.
63
-
64
- ### Changed
65
- * New paths for new Bitrix CMS. Old paths is deprecated.
66
-
67
- ### Deprecated
68
- * Old paths in Bitrix CMS Installer is deprecated.
69
-
70
- ## v1.0.25 - 2016-04-13
71
- ### Removed
72
- * Revert TYPO3 installer deletion.
73
-
74
- ## v1.0.24 - 2016-04-05
75
- ### Added
76
- * Installer for ImageCMS.
77
- * Installer for Mautic.
78
- * New types in the Kirby installer: `kirby-plugin` and `kirby-field`.
79
- * New types in the Drupal installer: `custom-theme` and `custom-module`.
80
-
81
- ### Changed
82
- * Switch to PSR-4.
83
- * Update Bitrix Installer: configuration for setting custom path to directory with kernel.
84
-
85
- ### Removed
86
- * Remove TYPO3 Extension installers.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/CONTRIBUTING.md DELETED
@@ -1,24 +0,0 @@
1
- # Contributing
2
-
3
- If you would like to help, please take a look at the list of
4
- [issues](https://github.com/composer/installers/issues).
5
-
6
- ## Pull requests
7
-
8
- * [Fork and clone](https://help.github.com/articles/fork-a-repo).
9
- * Run the command `php composer.phar install` to install the dependencies.
10
- This will also install the dev dependencies. See [Composer](https://getcomposer.org/doc/03-cli.md#install).
11
- * Use the command `phpunit` to run the tests. See [PHPUnit](http://phpunit.de).
12
- * Create a branch, commit, push and send us a
13
- [pull request](https://help.github.com/articles/using-pull-requests).
14
-
15
- To ensure a consistent code base, you should make sure the code follows the
16
- coding standards [PSR-1](http://www.php-fig.org/psr/psr-1/) and
17
- [PSR-2](http://www.php-fig.org/psr/psr-2/).
18
-
19
- ### Create a new Installer
20
-
21
- * Create class extends `Composer\Installers\BaseInstaller` with your Installer.
22
- * Create unit tests as a separate class or as part of a `Composer\Installers\Test\InstallerTest`.
23
- * Add information about your Installer in `README.md` in section "Current Supported Package Types".
24
- * Run the tests.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/LICENSE DELETED
@@ -1,19 +0,0 @@
1
- Copyright (c) 2012 Kyle Robinson Young
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to deal
5
- in the Software without restriction, including without limitation the rights
6
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- copies of the Software, and to permit persons to whom the Software is furnished
8
- to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in all
11
- copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- THE SOFTWARE.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/README.md DELETED
@@ -1,221 +0,0 @@
1
- # A Multi-Framework [Composer](http://getcomposer.org) Library Installer
2
-
3
- [![Build Status](http://img.shields.io/travis/composer/installers.svg)](http://travis-ci.org/composer/installers)
4
-
5
- This is for PHP package authors to require in their `composer.json`. It will
6
- install their package to the correct location based on the specified package
7
- type.
8
-
9
- The goal of Installers is to be a simple package type to install path map.
10
- Users can also customize the install path per package and package authors can
11
- modify the package name upon installing.
12
-
13
- Installers isn't intended on replacing all custom installers. If your
14
- package requires special installation handling then by all means, create a
15
- custom installer to handle it.
16
-
17
- **Natively Supported Frameworks**:
18
-
19
- The following frameworks natively work with Composer and will be
20
- installed to the default `vendor` directory. `composer/installers`
21
- is not needed to install packages with these frameworks:
22
-
23
- * Aura
24
- * Symfony2
25
- * Yii
26
- * Yii2
27
-
28
- ## Current Supported Package Types
29
-
30
- > Stable types are marked as **bold**, this means that installation paths
31
- > for those type will not be changed. Any adjustment for those types would
32
- > require creation of brand new type that will cover required changes.
33
-
34
- | Framework | Types
35
- | --------- | -----
36
- | Aimeos | `aimeos-extension`
37
- | Asgard | `asgard-module`<br>`asgard-theme`
38
- | Attogram | `attogram-module`
39
- | AGL | `agl-module`
40
- | Bonefish | `bonefish-package`
41
- | AnnotateCms | `annotatecms-module`<br>`annotatecms-component`<br>`annotatecms-service`
42
- | 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`
43
- | CakePHP 2+ | **`cakephp-plugin`**
44
- | Chef | `chef-cookbook`<br>`chef-role`
45
- | CCFramework | `ccframework-ship`<br>`ccframework-theme`
46
- | Cockpit | `cockpit-module`
47
- | CodeIgniter | `codeigniter-library`<br>`codeigniter-third-party`<br>`codeigniter-module`
48
- | concrete5 | `concrete5-core`<br>`concrete5-package`<br>`concrete5-theme`<br>`concrete5-block`<br>`concrete5-update`
49
- | Craft | `craft-plugin`
50
- | Croogo | `croogo-plugin`<br>`croogo-theme`
51
- | Decibel | `decibel-app`
52
- | DokuWiki | `dokuwiki-plugin`<br>`dokuwiki-template`
53
- | Dolibarr | `dolibarr-module`
54
- | Drupal | <b>`drupal-core`<br>`drupal-module`<br>`drupal-theme`</b><br>`drupal-library`<br>`drupal-profile`<br>`drupal-drush`
55
- | Elgg | `elgg-plugin`
56
- | Eliasis | `eliasis-component`<br>`eliasis-module`<br>`eliasis-plugin`<br>`eliasis-template`
57
- | ExpressionEngine 3 | `ee3-addon`<br>`ee3-theme`
58
- | eZ Platform | `ezplatform-assets`<br>`ezplatform-meta-assets`
59
- | FuelPHP v1.x | `fuel-module`<br>`fuel-package`<br/>`fuel-theme`
60
- | FuelPHP v2.x | `fuelphp-component`
61
- | Grav | `grav-plugin`<br>`grav-theme`
62
- | Hurad | `hurad-plugin`<br>`hurad-theme`
63
- | ImageCMS | `imagecms-template`<br>`imagecms-module`<br>`imagecms-library`
64
- | iTop | `itop-extension`
65
- | Joomla | `joomla-component`<br>`joomla-module`<br>`joomla-template`<br>`joomla-plugin`<br>`joomla-library`
66
- | Kanboard | `kanboard-plugin`
67
- | Kirby | **`kirby-plugin`**<br>`kirby-field`<br>`kirby-tag`
68
- | KodiCMS | `kodicms-plugin`<br>`kodicms-media`
69
- | Kohana | **`kohana-module`**
70
- | Lan Management System | `lms-plugin`<br>`lms-template`<br>`lms-document-template`<br>`lms-userpanel-module`
71
- | Laravel | `laravel-library`
72
- | Lavalite | `lavalite-theme`<br>`lavalite-package`
73
- | Lithium | **`lithium-library`<br>`lithium-source`**
74
- | Magento | `magento-library`<br>`magento-skin`<br>`magento-theme`
75
- | majima | `majima-plugin`
76
- | Mako | `mako-package`
77
- | Mautic | `mautic-plugin`<br>`mautic-theme`
78
- | Maya | `maya-module`
79
- | MODX | `modx-extra`
80
- | MODX Evo | `modxevo-snippet`<br>`modxevo-plugin`<br>`modxevo-module`<br>`modxevo-template`<br>`modxevo-lib`
81
- | MediaWiki | `mediawiki-extension`
82
- | October | **`october-module`<br>`october-plugin`<br>`october-theme`**
83
- | OntoWiki | `ontowiki-extension`<br>`ontowiki-theme`<br>`ontowiki-translation`
84
- | OXID | `oxid-module`<br>`oxid-theme`<br>`oxid-out`
85
- | Osclass | `osclass-plugin`<br>`osclass-theme`<br>`osclass-language`
86
- | MODULEWork | `modulework-module`
87
- | Moodle | `moodle-*` (Please [check source](https://raw.githubusercontent.com/composer/installers/master/src/Composer/Installers/MoodleInstaller.php) for all supported types)
88
- | Piwik | `piwik-plugin`
89
- | phpBB | `phpbb-extension`<br>`phpbb-style`<br>`phpbb-language`
90
- | Pimcore | `pimcore-plugin`
91
- | Plentymarkets | `plentymarkets-plugin`
92
- | PPI | **`ppi-module`**
93
- | Puppet | `puppet-module`
94
- | Porto | `porto-container`
95
- | RadPHP | `radphp-bundle`
96
- | REDAXO | `redaxo-addon`
97
- | ReIndex | **`reindex-plugin`** <br> **`reindex-theme`**
98
- | Roundcube | `roundcube-plugin`
99
- | shopware | `shopware-backend-plugin`<br/>`shopware-core-plugin`<br/>`shopware-frontend-plugin`<br/>`shopware-theme`<br/>`shopware-plugin`<br/>`shopware-frontend-theme`
100
- | SilverStripe | `silverstripe-module`<br>`silverstripe-theme`
101
- | SiteDirect | `sitedirect-module`<br>`sitedirect-plugin`
102
- | SMF | `smf-module`<br>`smf-theme`
103
- | SyDES | `sydes-module`<br>`sydes-theme`
104
- | symfony1 | **`symfony1-plugin`**
105
- | Tusk | `tusk-task`<br>`tusk-command`<br>`tusk-asset`
106
- | 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`
107
- | TYPO3 CMS | `typo3-cms-extension` (Deprecated in this package, use the [TYPO3 CMS Installers](https://packagist.org/packages/typo3/cms-composer-installers) instead)
108
- | UserFrosting | `userfrosting-sprinkle`
109
- | Vanilla | `vanilla-plugin`<br>`vanilla-theme`
110
- | Vgmcp | `vgmcp-bundle`<br>`vgmcp-theme`
111
- | Wolf CMS | `wolfcms-plugin`
112
- | WordPress | <b>`wordpress-plugin`<br>`wordpress-theme`</b><br>`wordpress-muplugin`<br>`wordpress-dropin`
113
- | YAWIK | `yawik-module`
114
- | Zend | `zend-library`<br>`zend-extra`<br>`zend-module`
115
- | Zikula | `zikula-module`<br>`zikula-theme`
116
- | Prestashop | `prestashop-module`<br>`prestashop-theme`
117
- | Phifty | `phifty-bundle`<br>`phifty-framework`<br>`phifty-library`
118
-
119
- ## Example `composer.json` File
120
-
121
- This is an example for a CakePHP plugin. The only important parts to set in your
122
- composer.json file are `"type": "cakephp-plugin"` which describes what your
123
- package is and `"require": { "composer/installers": "~1.0" }` which tells composer
124
- to load the custom installers.
125
-
126
- ```json
127
- {
128
- "name": "you/ftp",
129
- "type": "cakephp-plugin",
130
- "require": {
131
- "composer/installers": "~1.0"
132
- }
133
- }
134
- ```
135
-
136
- This would install your package to the `Plugin/Ftp/` folder of a CakePHP app
137
- when a user runs `php composer.phar install`.
138
-
139
- So submit your packages to [packagist.org](http://packagist.org)!
140
-
141
- ## Custom Install Paths
142
-
143
- If you are consuming a package that uses the `composer/installers` you can
144
- override the install path with the following extra in your `composer.json`:
145
-
146
- ```json
147
- {
148
- "extra": {
149
- "installer-paths": {
150
- "your/custom/path/{$name}/": ["shama/ftp", "vendor/package"]
151
- }
152
- }
153
- }
154
- ```
155
-
156
- A package type can have a custom installation path with a `type:` prefix.
157
-
158
- ``` json
159
- {
160
- "extra": {
161
- "installer-paths": {
162
- "your/custom/path/{$name}/": ["type:wordpress-plugin"]
163
- }
164
- }
165
- }
166
- ```
167
-
168
- You can also have the same vendor packages with a custom installation path by
169
- using the `vendor:` prefix.
170
-
171
- ``` json
172
- {
173
- "extra": {
174
- "installer-paths": {
175
- "your/custom/path/{$name}/": ["vendor:my_organization"]
176
- }
177
- }
178
- }
179
- ```
180
-
181
- These would use your custom path for each of the listed packages. The available
182
- variables to use in your paths are: `{$name}`, `{$vendor}`, `{$type}`.
183
-
184
- ## Custom Install Names
185
-
186
- If you're a package author and need your package to be named differently when
187
- installed consider using the `installer-name` extra.
188
-
189
- For example you have a package named `shama/cakephp-ftp` with the type
190
- `cakephp-plugin`. Installing with `composer/installers` would install to the
191
- path `Plugin/CakephpFtp`. Due to the strict naming conventions, you as a
192
- package author actually need the package to be named and installed to
193
- `Plugin/Ftp`. Using the following config within your **package** `composer.json`
194
- will allow this:
195
-
196
- ```json
197
- {
198
- "name": "shama/cakephp-ftp",
199
- "type": "cakephp-plugin",
200
- "extra": {
201
- "installer-name": "Ftp"
202
- }
203
- }
204
- ```
205
-
206
- Please note the name entered into `installer-name` will be the final and will
207
- not be inflected.
208
-
209
- ## Should we allow dynamic package types or paths? No.
210
-
211
- What are they? The ability for a package author to determine where a package
212
- will be installed either through setting the path directly in their
213
- `composer.json` or through a dynamic package type: `"type":
214
- "framework-install-here"`.
215
-
216
- It has been proposed many times. Even implemented once early on and then
217
- removed. Installers won't do this because it would allow a single package
218
- author to wipe out entire folders without the user's consent. That user would
219
- then come here to yell at us.
220
-
221
- Anyone still wanting this capability should consider requiring https://github.com/oomphinc/composer-installers-extender.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/_config.yml DELETED
@@ -1 +0,0 @@
1
- theme: jekyll-theme-cayman
 
vendor/composer/installers/composer.json DELETED
@@ -1,105 +0,0 @@
1
- {
2
- "name": "composer/installers",
3
- "type": "composer-plugin",
4
- "license": "MIT",
5
- "description": "A multi-framework Composer library installer",
6
- "keywords": [
7
- "installer",
8
- "Aimeos",
9
- "AGL",
10
- "AnnotateCms",
11
- "Attogram",
12
- "Bitrix",
13
- "CakePHP",
14
- "Chef",
15
- "Cockpit",
16
- "CodeIgniter",
17
- "concrete5",
18
- "Craft",
19
- "Croogo",
20
- "DokuWiki",
21
- "Dolibarr",
22
- "Drupal",
23
- "Elgg",
24
- "Eliasis",
25
- "ExpressionEngine",
26
- "eZ Platform",
27
- "FuelPHP",
28
- "Grav",
29
- "Hurad",
30
- "ImageCMS",
31
- "iTop",
32
- "Joomla",
33
- "Kanboard",
34
- "Kohana",
35
- "Lan Management System",
36
- "Laravel",
37
- "Lavalite",
38
- "Lithium",
39
- "Magento",
40
- "majima",
41
- "Mako",
42
- "Mautic",
43
- "Maya",
44
- "MODX",
45
- "MODX Evo",
46
- "MediaWiki",
47
- "OXID",
48
- "osclass",
49
- "MODULEWork",
50
- "Moodle",
51
- "Piwik",
52
- "pxcms",
53
- "phpBB",
54
- "Plentymarkets",
55
- "PPI",
56
- "Puppet",
57
- "Porto",
58
- "RadPHP",
59
- "ReIndex",
60
- "Roundcube",
61
- "shopware",
62
- "SilverStripe",
63
- "SMF",
64
- "SyDES",
65
- "symfony",
66
- "Thelia",
67
- "TYPO3",
68
- "WolfCMS",
69
- "WordPress",
70
- "YAWIK",
71
- "Zend",
72
- "Zikula"
73
- ],
74
- "homepage": "https://composer.github.io/installers/",
75
- "authors": [
76
- {
77
- "name": "Kyle Robinson Young",
78
- "email": "kyle@dontkry.com",
79
- "homepage": "https://github.com/shama"
80
- }
81
- ],
82
- "autoload": {
83
- "psr-4": { "Composer\\Installers\\": "src/Composer/Installers" }
84
- },
85
- "extra": {
86
- "class": "Composer\\Installers\\Plugin",
87
- "branch-alias": {
88
- "dev-master": "1.0-dev"
89
- }
90
- },
91
- "replace": {
92
- "shama/baton": "*",
93
- "roundcube/plugin-installer": "*"
94
- },
95
- "require": {
96
- "composer-plugin-api": "^1.0"
97
- },
98
- "require-dev": {
99
- "composer/composer": "1.0.*@dev",
100
- "phpunit/phpunit": "^4.8.36"
101
- },
102
- "scripts": {
103
- "test": "phpunit"
104
- }
105
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/phpunit.xml.dist DELETED
@@ -1,25 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
-
3
- <phpunit backupGlobals="false"
4
- backupStaticAttributes="false"
5
- colors="true"
6
- convertErrorsToExceptions="true"
7
- convertNoticesToExceptions="true"
8
- convertWarningsToExceptions="true"
9
- processIsolation="false"
10
- stopOnFailure="false"
11
- syntaxCheck="false"
12
- bootstrap="tests/bootstrap.php"
13
- >
14
- <testsuites>
15
- <testsuite name="Installers Test Suite">
16
- <directory>tests/Composer/Installers</directory>
17
- </testsuite>
18
- </testsuites>
19
-
20
- <filter>
21
- <whitelist>
22
- <directory>src/Composer/Installers</directory>
23
- </whitelist>
24
- </filter>
25
- </phpunit>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/AglInstaller.php DELETED
@@ -1,21 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class AglInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'module' => 'More/{$name}/',
8
- );
9
-
10
- /**
11
- * Format package name to CamelCase
12
- */
13
- public function inflectPackageVars($vars)
14
- {
15
- $vars['name'] = preg_replace_callback('/(?:^|_|-)(.?)/', function ($matches) {
16
- return strtoupper($matches[1]);
17
- }, $vars['name']);
18
-
19
- return $vars;
20
- }
21
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class AimeosInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'extension' => 'ext/{$name}/',
8
- );
9
- }
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php DELETED
@@ -1,11 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class AnnotateCmsInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'module' => 'addons/modules/{$name}/',
8
- 'component' => 'addons/components/{$name}/',
9
- 'service' => 'addons/services/{$name}/',
10
- );
11
- }
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php DELETED
@@ -1,49 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class AsgardInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'module' => 'Modules/{$name}/',
8
- 'theme' => 'Themes/{$name}/'
9
- );
10
-
11
- /**
12
- * Format package name.
13
- *
14
- * For package type asgard-module, cut off a trailing '-plugin' if present.
15
- *
16
- * For package type asgard-theme, cut off a trailing '-theme' if present.
17
- *
18
- */
19
- public function inflectPackageVars($vars)
20
- {
21
- if ($vars['type'] === 'asgard-module') {
22
- return $this->inflectPluginVars($vars);
23
- }
24
-
25
- if ($vars['type'] === 'asgard-theme') {
26
- return $this->inflectThemeVars($vars);
27
- }
28
-
29
- return $vars;
30
- }
31
-
32
- protected function inflectPluginVars($vars)
33
- {
34
- $vars['name'] = preg_replace('/-module$/', '', $vars['name']);
35
- $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
36
- $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
37
-
38
- return $vars;
39
- }
40
-
41
- protected function inflectThemeVars($vars)
42
- {
43
- $vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
44
- $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
45
- $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
46
-
47
- return $vars;
48
- }
49
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class AttogramInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'module' => 'modules/{$name}/',
8
- );
9
- }
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/BaseInstaller.php DELETED
@@ -1,136 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- use Composer\IO\IOInterface;
5
- use Composer\Composer;
6
- use Composer\Package\PackageInterface;
7
-
8
- abstract class BaseInstaller
9
- {
10
- protected $locations = array();
11
- protected $composer;
12
- protected $package;
13
- protected $io;
14
-
15
- /**
16
- * Initializes base installer.
17
- *
18
- * @param PackageInterface $package
19
- * @param Composer $composer
20
- * @param IOInterface $io
21
- */
22
- public function __construct(PackageInterface $package = null, Composer $composer = null, IOInterface $io = null)
23
- {
24
- $this->composer = $composer;
25
- $this->package = $package;
26
- $this->io = $io;
27
- }
28
-
29
- /**
30
- * Return the install path based on package type.
31
- *
32
- * @param PackageInterface $package
33
- * @param string $frameworkType
34
- * @return string
35
- */
36
- public function getInstallPath(PackageInterface $package, $frameworkType = '')
37
- {
38
- $type = $this->package->getType();
39
-
40
- $prettyName = $this->package->getPrettyName();
41
- if (strpos($prettyName, '/') !== false) {
42
- list($vendor, $name) = explode('/', $prettyName);
43
- } else {
44
- $vendor = '';
45
- $name = $prettyName;
46
- }
47
-
48
- $availableVars = $this->inflectPackageVars(compact('name', 'vendor', 'type'));
49
-
50
- $extra = $package->getExtra();
51
- if (!empty($extra['installer-name'])) {
52
- $availableVars['name'] = $extra['installer-name'];
53
- }
54
-
55
- if ($this->composer->getPackage()) {
56
- $extra = $this->composer->getPackage()->getExtra();
57
- if (!empty($extra['installer-paths'])) {
58
- $customPath = $this->mapCustomInstallPaths($extra['installer-paths'], $prettyName, $type, $vendor);
59
- if ($customPath !== false) {
60
- return $this->templatePath($customPath, $availableVars);
61
- }
62
- }
63
- }
64
-
65
- $packageType = substr($type, strlen($frameworkType) + 1);
66
- $locations = $this->getLocations();
67
- if (!isset($locations[$packageType])) {
68
- throw new \InvalidArgumentException(sprintf('Package type "%s" is not supported', $type));
69
- }
70
-
71
- return $this->templatePath($locations[$packageType], $availableVars);
72
- }
73
-
74
- /**
75
- * For an installer to override to modify the vars per installer.
76
- *
77
- * @param array $vars
78
- * @return array
79
- */
80
- public function inflectPackageVars($vars)
81
- {
82
- return $vars;
83
- }
84
-
85
- /**
86
- * Gets the installer's locations
87
- *
88
- * @return array
89
- */
90
- public function getLocations()
91
- {
92
- return $this->locations;
93
- }
94
-
95
- /**
96
- * Replace vars in a path
97
- *
98
- * @param string $path
99
- * @param array $vars
100
- * @return string
101
- */
102
- protected function templatePath($path, array $vars = array())
103
- {
104
- if (strpos($path, '{') !== false) {
105
- extract($vars);
106
- preg_match_all('@\{\$([A-Za-z0-9_]*)\}@i', $path, $matches);
107
- if (!empty($matches[1])) {
108
- foreach ($matches[1] as $var) {
109
- $path = str_replace('{$' . $var . '}', $$var, $path);
110
- }
111
- }
112
- }
113
-
114
- return $path;
115
- }
116
-
117
- /**
118
- * Search through a passed paths array for a custom install path.
119
- *
120
- * @param array $paths
121
- * @param string $name
122
- * @param string $type
123
- * @param string $vendor = NULL
124
- * @return string
125
- */
126
- protected function mapCustomInstallPaths(array $paths, $name, $type, $vendor = NULL)
127
- {
128
- foreach ($paths as $path => $names) {
129
- if (in_array($name, $names) || in_array('type:' . $type, $names) || in_array('vendor:' . $vendor, $names)) {
130
- return $path;
131
- }
132
- }
133
-
134
- return false;
135
- }
136
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php DELETED
@@ -1,126 +0,0 @@
1
- <?php
2
-
3
- namespace Composer\Installers;
4
-
5
- use Composer\Util\Filesystem;
6
-
7
- /**
8
- * Installer for Bitrix Framework. Supported types of extensions:
9
- * - `bitrix-d7-module` — copy the module to directory `bitrix/modules/<vendor>.<name>`.
10
- * - `bitrix-d7-component` — copy the component to directory `bitrix/components/<vendor>/<name>`.
11
- * - `bitrix-d7-template` — copy the template to directory `bitrix/templates/<vendor>_<name>`.
12
- *
13
- * You can set custom path to directory with Bitrix kernel in `composer.json`:
14
- *
15
- * ```json
16
- * {
17
- * "extra": {
18
- * "bitrix-dir": "s1/bitrix"
19
- * }
20
- * }
21
- * ```
22
- *
23
- * @author Nik Samokhvalov <nik@samokhvalov.info>
24
- * @author Denis Kulichkin <onexhovia@gmail.com>
25
- */
26
- class BitrixInstaller extends BaseInstaller
27
- {
28
- protected $locations = array(
29
- 'module' => '{$bitrix_dir}/modules/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
30
- 'component' => '{$bitrix_dir}/components/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
31
- 'theme' => '{$bitrix_dir}/templates/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
32
- 'd7-module' => '{$bitrix_dir}/modules/{$vendor}.{$name}/',
33
- 'd7-component' => '{$bitrix_dir}/components/{$vendor}/{$name}/',
34
- 'd7-template' => '{$bitrix_dir}/templates/{$vendor}_{$name}/',
35
- );
36
-
37
- /**
38
- * @var array Storage for informations about duplicates at all the time of installation packages.
39
- */
40
- private static $checkedDuplicates = array();
41
-
42
- /**
43
- * {@inheritdoc}
44
- */
45
- public function inflectPackageVars($vars)
46
- {
47
- if ($this->composer->getPackage()) {
48
- $extra = $this->composer->getPackage()->getExtra();
49
-
50
- if (isset($extra['bitrix-dir'])) {
51
- $vars['bitrix_dir'] = $extra['bitrix-dir'];
52
- }
53
- }
54
-
55
- if (!isset($vars['bitrix_dir'])) {
56
- $vars['bitrix_dir'] = 'bitrix';
57
- }
58
-
59
- return parent::inflectPackageVars($vars);
60
- }
61
-
62
- /**
63
- * {@inheritdoc}
64
- */
65
- protected function templatePath($path, array $vars = array())
66
- {
67
- $templatePath = parent::templatePath($path, $vars);
68
- $this->checkDuplicates($templatePath, $vars);
69
-
70
- return $templatePath;
71
- }
72
-
73
- /**
74
- * Duplicates search packages.
75
- *
76
- * @param string $path
77
- * @param array $vars
78
- */
79
- protected function checkDuplicates($path, array $vars = array())
80
- {
81
- $packageType = substr($vars['type'], strlen('bitrix') + 1);
82
- $localDir = explode('/', $vars['bitrix_dir']);
83
- array_pop($localDir);
84
- $localDir[] = 'local';
85
- $localDir = implode('/', $localDir);
86
-
87
- $oldPath = str_replace(
88
- array('{$bitrix_dir}', '{$name}'),
89
- array($localDir, $vars['name']),
90
- $this->locations[$packageType]
91
- );
92
-
93
- if (in_array($oldPath, static::$checkedDuplicates)) {
94
- return;
95
- }
96
-
97
- if ($oldPath !== $path && file_exists($oldPath) && $this->io && $this->io->isInteractive()) {
98
-
99
- $this->io->writeError(' <error>Duplication of packages:</error>');
100
- $this->io->writeError(' <info>Package ' . $oldPath . ' will be called instead package ' . $path . '</info>');
101
-
102
- while (true) {
103
- switch ($this->io->ask(' <info>Delete ' . $oldPath . ' [y,n,?]?</info> ', '?')) {
104
- case 'y':
105
- $fs = new Filesystem();
106
- $fs->removeDirectory($oldPath);
107
- break 2;
108
-
109
- case 'n':
110
- break 2;
111
-
112
- case '?':
113
- default:
114
- $this->io->writeError(array(
115
- ' y - delete package ' . $oldPath . ' and to continue with the installation',
116
- ' n - don\'t delete and to continue with the installation',
117
- ));
118
- $this->io->writeError(' ? - print help');
119
- break;
120
- }
121
- }
122
- }
123
-
124
- static::$checkedDuplicates[] = $oldPath;
125
- }
126
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class BonefishInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'package' => 'Packages/{$vendor}/{$name}/'
8
- );
9
- }
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php DELETED
@@ -1,82 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- use Composer\DependencyResolver\Pool;
5
-
6
- class CakePHPInstaller extends BaseInstaller
7
- {
8
- protected $locations = array(
9
- 'plugin' => 'Plugin/{$name}/',
10
- );
11
-
12
- /**
13
- * Format package name to CamelCase
14
- */
15
- public function inflectPackageVars($vars)
16
- {
17
- if ($this->matchesCakeVersion('>=', '3.0.0')) {
18
- return $vars;
19
- }
20
-
21
- $nameParts = explode('/', $vars['name']);
22
- foreach ($nameParts as &$value) {
23
- $value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
24
- $value = str_replace(array('-', '_'), ' ', $value);
25
- $value = str_replace(' ', '', ucwords($value));
26
- }
27
- $vars['name'] = implode('/', $nameParts);
28
-
29
- return $vars;
30
- }
31
-
32
- /**
33
- * Change the default plugin location when cakephp >= 3.0
34
- */
35
- public function getLocations()
36
- {
37
- if ($this->matchesCakeVersion('>=', '3.0.0')) {
38
- $this->locations['plugin'] = $this->composer->getConfig()->get('vendor-dir') . '/{$vendor}/{$name}/';
39
- }
40
- return $this->locations;
41
- }
42
-
43
- /**
44
- * Check if CakePHP version matches against a version
45
- *
46
- * @param string $matcher
47
- * @param string $version
48
- * @return bool
49
- */
50
- protected function matchesCakeVersion($matcher, $version)
51
- {
52
- if (class_exists('Composer\Semver\Constraint\MultiConstraint')) {
53
- $multiClass = 'Composer\Semver\Constraint\MultiConstraint';
54
- $constraintClass = 'Composer\Semver\Constraint\Constraint';
55
- } else {
56
- $multiClass = 'Composer\Package\LinkConstraint\MultiConstraint';
57
- $constraintClass = 'Composer\Package\LinkConstraint\VersionConstraint';
58
- }
59
-
60
- $repositoryManager = $this->composer->getRepositoryManager();
61
- if ($repositoryManager) {
62
- $repos = $repositoryManager->getLocalRepository();
63
- if (!$repos) {
64
- return false;
65
- }
66
- $cake3 = new $multiClass(array(
67
- new $constraintClass($matcher, $version),
68
- new $constraintClass('!=', '9999999-dev'),
69
- ));
70
- $pool = new Pool('dev');
71
- $pool->addRepository($repos);
72
- $packages = $pool->whatProvides('cakephp/cakephp');
73
- foreach ($packages as $package) {
74
- $installed = new $constraintClass('=', $package->getVersion());
75
- if ($cake3->matches($installed)) {
76
- return true;
77
- }
78
- }
79
- }
80
- return false;
81
- }
82
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/ChefInstaller.php DELETED
@@ -1,11 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class ChefInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'cookbook' => 'Chef/{$vendor}/{$name}/',
8
- 'role' => 'Chef/roles/{$name}/',
9
- );
10
- }
11
-
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class ClanCatsFrameworkInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'ship' => 'CCF/orbit/{$name}/',
8
- 'theme' => 'CCF/app/themes/{$name}/',
9
- );
10
- }
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php DELETED
@@ -1,34 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class CockpitInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'module' => 'cockpit/modules/addons/{$name}/',
8
- );
9
-
10
- /**
11
- * Format module name.
12
- *
13
- * Strip `module-` prefix from package name.
14
- *
15
- * @param array @vars
16
- *
17
- * @return array
18
- */
19
- public function inflectPackageVars($vars)
20
- {
21
- if ($vars['type'] == 'cockpit-module') {
22
- return $this->inflectModuleVars($vars);
23
- }
24
-
25
- return $vars;
26
- }
27
-
28
- public function inflectModuleVars($vars)
29
- {
30
- $vars['name'] = ucfirst(preg_replace('/cockpit-/i', '', $vars['name']));
31
-
32
- return $vars;
33
- }
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php DELETED
@@ -1,11 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class CodeIgniterInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'library' => 'application/libraries/{$name}/',
8
- 'third-party' => 'application/third_party/{$name}/',
9
- 'module' => 'application/modules/{$name}/',
10
- );
11
- }
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php DELETED
@@ -1,13 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class Concrete5Installer extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'core' => 'concrete/',
8
- 'block' => 'application/blocks/{$name}/',
9
- 'package' => 'packages/{$name}/',
10
- 'theme' => 'application/themes/{$name}/',
11
- 'update' => 'updates/{$name}/',
12
- );
13
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/CraftInstaller.php DELETED
@@ -1,35 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- /**
5
- * Installer for Craft Plugins
6
- */
7
- class CraftInstaller extends BaseInstaller
8
- {
9
- const NAME_PREFIX = 'craft';
10
- const NAME_SUFFIX = 'plugin';
11
-
12
- protected $locations = array(
13
- 'plugin' => 'craft/plugins/{$name}/',
14
- );
15
-
16
- /**
17
- * Strip `craft-` prefix and/or `-plugin` suffix from package names
18
- *
19
- * @param array $vars
20
- *
21
- * @return array
22
- */
23
- final public function inflectPackageVars($vars)
24
- {
25
- return $this->inflectPluginVars($vars);
26
- }
27
-
28
- private function inflectPluginVars($vars)
29
- {
30
- $vars['name'] = preg_replace('/-' . self::NAME_SUFFIX . '$/i', '', $vars['name']);
31
- $vars['name'] = preg_replace('/^' . self::NAME_PREFIX . '-/i', '', $vars['name']);
32
-
33
- return $vars;
34
- }
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php DELETED
@@ -1,21 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class CroogoInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'plugin' => 'Plugin/{$name}/',
8
- 'theme' => 'View/Themed/{$name}/',
9
- );
10
-
11
- /**
12
- * Format package name to CamelCase
13
- */
14
- public function inflectPackageVars($vars)
15
- {
16
- $vars['name'] = strtolower(str_replace(array('-', '_'), ' ', $vars['name']));
17
- $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
18
-
19
- return $vars;
20
- }
21
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class DecibelInstaller extends BaseInstaller
5
- {
6
- /** @var array */
7
- protected $locations = array(
8
- 'app' => 'app/{$name}/',
9
- );
10
- }
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php DELETED
@@ -1,50 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class DokuWikiInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'plugin' => 'lib/plugins/{$name}/',
8
- 'template' => 'lib/tpl/{$name}/',
9
- );
10
-
11
- /**
12
- * Format package name.
13
- *
14
- * For package type dokuwiki-plugin, cut off a trailing '-plugin',
15
- * or leading dokuwiki_ if present.
16
- *
17
- * For package type dokuwiki-template, cut off a trailing '-template' if present.
18
- *
19
- */
20
- public function inflectPackageVars($vars)
21
- {
22
-
23
- if ($vars['type'] === 'dokuwiki-plugin') {
24
- return $this->inflectPluginVars($vars);
25
- }
26
-
27
- if ($vars['type'] === 'dokuwiki-template') {
28
- return $this->inflectTemplateVars($vars);
29
- }
30
-
31
- return $vars;
32
- }
33
-
34
- protected function inflectPluginVars($vars)
35
- {
36
- $vars['name'] = preg_replace('/-plugin$/', '', $vars['name']);
37
- $vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']);
38
-
39
- return $vars;
40
- }
41
-
42
- protected function inflectTemplateVars($vars)
43
- {
44
- $vars['name'] = preg_replace('/-template$/', '', $vars['name']);
45
- $vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']);
46
-
47
- return $vars;
48
- }
49
-
50
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php DELETED
@@ -1,16 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- /**
5
- * Class DolibarrInstaller
6
- *
7
- * @package Composer\Installers
8
- * @author Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
9
- */
10
- class DolibarrInstaller extends BaseInstaller
11
- {
12
- //TODO: Add support for scripts and themes
13
- protected $locations = array(
14
- 'module' => 'htdocs/custom/{$name}/',
15
- );
16
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php DELETED
@@ -1,16 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class DrupalInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'core' => 'core/',
8
- 'module' => 'modules/{$name}/',
9
- 'theme' => 'themes/{$name}/',
10
- 'library' => 'libraries/{$name}/',
11
- 'profile' => 'profiles/{$name}/',
12
- 'drush' => 'drush/{$name}/',
13
- 'custom-theme' => 'themes/custom/{$name}/',
14
- 'custom-module' => 'modules/custom/{$name}',
15
- );
16
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/ElggInstaller.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class ElggInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'plugin' => 'mod/{$name}/',
8
- );
9
- }
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php DELETED
@@ -1,12 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class EliasisInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'component' => 'components/{$name}/',
8
- 'module' => 'modules/{$name}/',
9
- 'plugin' => 'plugins/{$name}/',
10
- 'template' => 'templates/{$name}/',
11
- );
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php DELETED
@@ -1,29 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- use Composer\Package\PackageInterface;
5
-
6
- class ExpressionEngineInstaller extends BaseInstaller
7
- {
8
-
9
- protected $locations = array();
10
-
11
- private $ee2Locations = array(
12
- 'addon' => 'system/expressionengine/third_party/{$name}/',
13
- 'theme' => 'themes/third_party/{$name}/',
14
- );
15
-
16
- private $ee3Locations = array(
17
- 'addon' => 'system/user/addons/{$name}/',
18
- 'theme' => 'themes/user/{$name}/',
19
- );
20
-
21
- public function getInstallPath(PackageInterface $package, $frameworkType = '')
22
- {
23
-
24
- $version = "{$frameworkType}Locations";
25
- $this->locations = $this->$version;
26
-
27
- return parent::getInstallPath($package, $frameworkType);
28
- }
29
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class EzPlatformInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'meta-assets' => 'web/assets/ezplatform/',
8
- 'assets' => 'web/assets/ezplatform/{$name}/',
9
- );
10
- }
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/FuelInstaller.php DELETED
@@ -1,11 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class FuelInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'module' => 'fuel/app/modules/{$name}/',
8
- 'package' => 'fuel/packages/{$name}/',
9
- 'theme' => 'fuel/app/themes/{$name}/',
10
- );
11
- }
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class FuelphpInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'component' => 'components/{$name}/',
8
- );
9
- }
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/GravInstaller.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class GravInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'plugin' => 'user/plugins/{$name}/',
8
- 'theme' => 'user/themes/{$name}/',
9
- );
10
-
11
- /**
12
- * Format package name
13
- *
14
- * @param array $vars
15
- *
16
- * @return array
17
- */
18
- public function inflectPackageVars($vars)
19
- {
20
- $restrictedWords = implode('|', array_keys($this->locations));
21
-
22
- $vars['name'] = strtolower($vars['name']);
23
- $vars['name'] = preg_replace('/^(?:grav-)?(?:(?:'.$restrictedWords.')-)?(.*?)(?:-(?:'.$restrictedWords.'))?$/ui',
24
- '$1',
25
- $vars['name']
26
- );
27
-
28
- return $vars;
29
- }
30
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/HuradInstaller.php DELETED
@@ -1,25 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class HuradInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'plugin' => 'plugins/{$name}/',
8
- 'theme' => 'plugins/{$name}/',
9
- );
10
-
11
- /**
12
- * Format package name to CamelCase
13
- */
14
- public function inflectPackageVars($vars)
15
- {
16
- $nameParts = explode('/', $vars['name']);
17
- foreach ($nameParts as &$value) {
18
- $value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
19
- $value = str_replace(array('-', '_'), ' ', $value);
20
- $value = str_replace(' ', '', ucwords($value));
21
- }
22
- $vars['name'] = implode('/', $nameParts);
23
- return $vars;
24
- }
25
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php DELETED
@@ -1,11 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class ImageCMSInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'template' => 'templates/{$name}/',
8
- 'module' => 'application/modules/{$name}/',
9
- 'library' => 'application/libraries/{$name}/',
10
- );
11
- }
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/Installer.php DELETED
@@ -1,200 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- use Composer\IO\IOInterface;
5
- use Composer\Installer\LibraryInstaller;
6
- use Composer\Package\PackageInterface;
7
- use Composer\Repository\InstalledRepositoryInterface;
8
-
9
- class Installer extends LibraryInstaller
10
- {
11
- /**
12
- * Package types to installer class map
13
- *
14
- * @var array
15
- */
16
- private $supportedTypes = array(
17
- 'aimeos' => 'AimeosInstaller',
18
- 'asgard' => 'AsgardInstaller',
19
- 'attogram' => 'AttogramInstaller',
20
- 'agl' => 'AglInstaller',
21
- 'annotatecms' => 'AnnotateCmsInstaller',
22
- 'bitrix' => 'BitrixInstaller',
23
- 'bonefish' => 'BonefishInstaller',
24
- 'cakephp' => 'CakePHPInstaller',
25
- 'chef' => 'ChefInstaller',
26
- 'ccframework' => 'ClanCatsFrameworkInstaller',
27
- 'cockpit' => 'CockpitInstaller',
28
- 'codeigniter' => 'CodeIgniterInstaller',
29
- 'concrete5' => 'Concrete5Installer',
30
- 'craft' => 'CraftInstaller',
31
- 'croogo' => 'CroogoInstaller',
32
- 'dokuwiki' => 'DokuWikiInstaller',
33
- 'dolibarr' => 'DolibarrInstaller',
34
- 'decibel' => 'DecibelInstaller',
35
- 'drupal' => 'DrupalInstaller',
36
- 'elgg' => 'ElggInstaller',
37
- 'eliasis' => 'EliasisInstaller',
38
- 'ee3' => 'ExpressionEngineInstaller',
39
- 'ee2' => 'ExpressionEngineInstaller',
40
- 'ezplatform' => 'EzPlatformInstaller',
41
- 'fuel' => 'FuelInstaller',
42
- 'fuelphp' => 'FuelphpInstaller',
43
- 'grav' => 'GravInstaller',
44
- 'hurad' => 'HuradInstaller',
45
- 'imagecms' => 'ImageCMSInstaller',
46
- 'itop' => 'ItopInstaller',
47
- 'joomla' => 'JoomlaInstaller',
48
- 'kanboard' => 'KanboardInstaller',
49
- 'kirby' => 'KirbyInstaller',
50
- 'kodicms' => 'KodiCMSInstaller',
51
- 'kohana' => 'KohanaInstaller',
52
- 'lms' => 'LanManagementSystemInstaller',
53
- 'laravel' => 'LaravelInstaller',
54
- 'lavalite' => 'LavaLiteInstaller',
55
- 'lithium' => 'LithiumInstaller',
56
- 'magento' => 'MagentoInstaller',
57
- 'majima' => 'MajimaInstaller',
58
- 'mako' => 'MakoInstaller',
59
- 'maya' => 'MayaInstaller',
60
- 'mautic' => 'MauticInstaller',
61
- 'mediawiki' => 'MediaWikiInstaller',
62
- 'microweber' => 'MicroweberInstaller',
63
- 'modulework' => 'MODULEWorkInstaller',
64
- 'modx' => 'ModxInstaller',
65
- 'modxevo' => 'MODXEvoInstaller',
66
- 'moodle' => 'MoodleInstaller',
67
- 'october' => 'OctoberInstaller',
68
- 'ontowiki' => 'OntoWikiInstaller',
69
- 'oxid' => 'OxidInstaller',
70
- 'osclass' => 'OsclassInstaller',
71
- 'pxcms' => 'PxcmsInstaller',
72
- 'phpbb' => 'PhpBBInstaller',
73
- 'pimcore' => 'PimcoreInstaller',
74
- 'piwik' => 'PiwikInstaller',
75
- 'plentymarkets'=> 'PlentymarketsInstaller',
76
- 'ppi' => 'PPIInstaller',
77
- 'puppet' => 'PuppetInstaller',
78
- 'radphp' => 'RadPHPInstaller',
79
- 'phifty' => 'PhiftyInstaller',
80
- 'porto' => 'PortoInstaller',
81
- 'redaxo' => 'RedaxoInstaller',
82
- 'reindex' => 'ReIndexInstaller',
83
- 'roundcube' => 'RoundcubeInstaller',
84
- 'shopware' => 'ShopwareInstaller',
85
- 'sitedirect' => 'SiteDirectInstaller',
86
- 'silverstripe' => 'SilverStripeInstaller',
87
- 'smf' => 'SMFInstaller',
88
- 'sydes' => 'SyDESInstaller',
89
- 'symfony1' => 'Symfony1Installer',
90
- 'thelia' => 'TheliaInstaller',
91
- 'tusk' => 'TuskInstaller',
92
- 'typo3-cms' => 'TYPO3CmsInstaller',
93
- 'typo3-flow' => 'TYPO3FlowInstaller',
94
- 'userfrosting' => 'UserFrostingInstaller',
95
- 'vanilla' => 'VanillaInstaller',
96
- 'whmcs' => 'WHMCSInstaller',
97
- 'wolfcms' => 'WolfCMSInstaller',
98
- 'wordpress' => 'WordPressInstaller',
99
- 'yawik' => 'YawikInstaller',
100
- 'zend' => 'ZendInstaller',
101
- 'zikula' => 'ZikulaInstaller',
102
- 'prestashop' => 'PrestashopInstaller'
103
- );
104
-
105
- /**
106
- * {@inheritDoc}
107
- */
108
- public function getInstallPath(PackageInterface $package)
109
- {
110
- $type = $package->getType();
111
- $frameworkType = $this->findFrameworkType($type);
112
-
113
- if ($frameworkType === false) {
114
- throw new \InvalidArgumentException(
115
- 'Sorry the package type of this package is not yet supported.'
116
- );
117
- }
118
-
119
- $class = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
120
- $installer = new $class($package, $this->composer, $this->getIO());
121
-
122
- return $installer->getInstallPath($package, $frameworkType);
123
- }
124
-
125
- public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
126
- {
127
- parent::uninstall($repo, $package);
128
- $installPath = $this->getPackageBasePath($package);
129
- $this->io->write(sprintf('Deleting %s - %s', $installPath, !file_exists($installPath) ? '<comment>deleted</comment>' : '<error>not deleted</error>'));
130
- }
131
-
132
- /**
133
- * {@inheritDoc}
134
- */
135
- public function supports($packageType)
136
- {
137
- $frameworkType = $this->findFrameworkType($packageType);
138
-
139
- if ($frameworkType === false) {
140
- return false;
141
- }
142
-
143
- $locationPattern = $this->getLocationPattern($frameworkType);
144
-
145
- return preg_match('#' . $frameworkType . '-' . $locationPattern . '#', $packageType, $matches) === 1;
146
- }
147
-
148
- /**
149
- * Finds a supported framework type if it exists and returns it
150
- *
151
- * @param string $type
152
- * @return string
153
- */
154
- protected function findFrameworkType($type)
155
- {
156
- $frameworkType = false;
157
-
158
- krsort($this->supportedTypes);
159
-
160
- foreach ($this->supportedTypes as $key => $val) {
161
- if ($key === substr($type, 0, strlen($key))) {
162
- $frameworkType = substr($type, 0, strlen($key));
163
- break;
164
- }
165
- }
166
-
167
- return $frameworkType;
168
- }
169
-
170
- /**
171
- * Get the second part of the regular expression to check for support of a
172
- * package type
173
- *
174
- * @param string $frameworkType
175
- * @return string
176
- */
177
- protected function getLocationPattern($frameworkType)
178
- {
179
- $pattern = false;
180
- if (!empty($this->supportedTypes[$frameworkType])) {
181
- $frameworkClass = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
182
- /** @var BaseInstaller $framework */
183
- $framework = new $frameworkClass(null, $this->composer, $this->getIO());
184
- $locations = array_keys($framework->getLocations());
185
- $pattern = $locations ? '(' . implode('|', $locations) . ')' : false;
186
- }
187
-
188
- return $pattern ? : '(\w+)';
189
- }
190
-
191
- /**
192
- * Get I/O object
193
- *
194
- * @return IOInterface
195
- */
196
- private function getIO()
197
- {
198
- return $this->io;
199
- }
200
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/ItopInstaller.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class ItopInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'extension' => 'extensions/{$name}/',
8
- );
9
- }
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php DELETED
@@ -1,15 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class JoomlaInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'component' => 'components/{$name}/',
8
- 'module' => 'modules/{$name}/',
9
- 'template' => 'templates/{$name}/',
10
- 'plugin' => 'plugins/{$name}/',
11
- 'library' => 'libraries/{$name}/',
12
- );
13
-
14
- // TODO: Add inflector for mod_ and com_ names
15
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php DELETED
@@ -1,18 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- /**
5
- *
6
- * Installer for kanboard plugins
7
- *
8
- * kanboard.net
9
- *
10
- * Class KanboardInstaller
11
- * @package Composer\Installers
12
- */
13
- class KanboardInstaller extends BaseInstaller
14
- {
15
- protected $locations = array(
16
- 'plugin' => 'plugins/{$name}/',
17
- );
18
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php DELETED
@@ -1,11 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class KirbyInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'plugin' => 'site/plugins/{$name}/',
8
- 'field' => 'site/fields/{$name}/',
9
- 'tag' => 'site/tags/{$name}/'
10
- );
11
- }
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class KodiCMSInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'plugin' => 'cms/plugins/{$name}/',
8
- 'media' => 'cms/media/vendor/{$name}/'
9
- );
10
- }
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class KohanaInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'module' => 'modules/{$name}/',
8
- );
9
- }
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php DELETED
@@ -1,27 +0,0 @@
1
- <?php
2
-
3
- namespace Composer\Installers;
4
-
5
- class LanManagementSystemInstaller extends BaseInstaller
6
- {
7
-
8
- protected $locations = array(
9
- 'plugin' => 'plugins/{$name}/',
10
- 'template' => 'templates/{$name}/',
11
- 'document-template' => 'documents/templates/{$name}/',
12
- 'userpanel-module' => 'userpanel/modules/{$name}/',
13
- );
14
-
15
- /**
16
- * Format package name to CamelCase
17
- */
18
- public function inflectPackageVars($vars)
19
- {
20
- $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
21
- $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
22
- $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
23
-
24
- return $vars;
25
- }
26
-
27
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class LaravelInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'library' => 'libraries/{$name}/',
8
- );
9
- }
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class LavaLiteInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'package' => 'packages/{$vendor}/{$name}/',
8
- 'theme' => 'public/themes/{$name}/',
9
- );
10
- }
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class LithiumInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'library' => 'libraries/{$name}/',
8
- 'source' => 'libraries/_source/{$name}/',
9
- );
10
- }
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class MODULEWorkInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'module' => 'modules/{$name}/',
8
- );
9
- }
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php DELETED
@@ -1,16 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- /**
5
- * An installer to handle MODX Evolution specifics when installing packages.
6
- */
7
- class MODXEvoInstaller extends BaseInstaller
8
- {
9
- protected $locations = array(
10
- 'snippet' => 'assets/snippets/{$name}/',
11
- 'plugin' => 'assets/plugins/{$name}/',
12
- 'module' => 'assets/modules/{$name}/',
13
- 'template' => 'assets/templates/{$name}/',
14
- 'lib' => 'assets/lib/{$name}/'
15
- );
16
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php DELETED
@@ -1,11 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class MagentoInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'theme' => 'app/design/frontend/{$name}/',
8
- 'skin' => 'skin/frontend/default/{$name}/',
9
- 'library' => 'lib/{$name}/',
10
- );
11
- }
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php DELETED
@@ -1,37 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- /**
5
- * Plugin/theme installer for majima
6
- * @author David Neustadt
7
- */
8
- class MajimaInstaller extends BaseInstaller
9
- {
10
- protected $locations = array(
11
- 'plugin' => 'plugins/{$name}/',
12
- );
13
-
14
- /**
15
- * Transforms the names
16
- * @param array $vars
17
- * @return array
18
- */
19
- public function inflectPackageVars($vars)
20
- {
21
- return $this->correctPluginName($vars);
22
- }
23
-
24
- /**
25
- * Change hyphenated names to camelcase
26
- * @param array $vars
27
- * @return array
28
- */
29
- private function correctPluginName($vars)
30
- {
31
- $camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) {
32
- return strtoupper($matches[0][1]);
33
- }, $vars['name']);
34
- $vars['name'] = ucfirst($camelCasedName);
35
- return $vars;
36
- }
37
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/MakoInstaller.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class MakoInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'package' => 'app/packages/{$name}/',
8
- );
9
- }
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/MauticInstaller.php DELETED
@@ -1,25 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class MauticInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'plugin' => 'plugins/{$name}/',
8
- 'theme' => 'themes/{$name}/',
9
- );
10
-
11
- /**
12
- * Format package name of mautic-plugins to CamelCase
13
- */
14
- public function inflectPackageVars($vars)
15
- {
16
- if ($vars['type'] == 'mautic-plugin') {
17
- $vars['name'] = preg_replace_callback('/(-[a-z])/', function ($matches) {
18
- return strtoupper($matches[0][1]);
19
- }, ucfirst($vars['name']));
20
- }
21
-
22
- return $vars;
23
- }
24
-
25
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/MayaInstaller.php DELETED
@@ -1,33 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class MayaInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'module' => 'modules/{$name}/',
8
- );
9
-
10
- /**
11
- * Format package name.
12
- *
13
- * For package type maya-module, cut off a trailing '-module' if present.
14
- *
15
- */
16
- public function inflectPackageVars($vars)
17
- {
18
- if ($vars['type'] === 'maya-module') {
19
- return $this->inflectModuleVars($vars);
20
- }
21
-
22
- return $vars;
23
- }
24
-
25
- protected function inflectModuleVars($vars)
26
- {
27
- $vars['name'] = preg_replace('/-module$/', '', $vars['name']);
28
- $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
29
- $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
30
-
31
- return $vars;
32
- }
33
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php DELETED
@@ -1,50 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class MediaWikiInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'extension' => 'extensions/{$name}/',
8
- 'skin' => 'skins/{$name}/',
9
- );
10
-
11
- /**
12
- * Format package name.
13
- *
14
- * For package type mediawiki-extension, cut off a trailing '-extension' if present and transform
15
- * to CamelCase keeping existing uppercase chars.
16
- *
17
- * For package type mediawiki-skin, cut off a trailing '-skin' if present.
18
- *
19
- */
20
- public function inflectPackageVars($vars)
21
- {
22
-
23
- if ($vars['type'] === 'mediawiki-extension') {
24
- return $this->inflectExtensionVars($vars);
25
- }
26
-
27
- if ($vars['type'] === 'mediawiki-skin') {
28
- return $this->inflectSkinVars($vars);
29
- }
30
-
31
- return $vars;
32
- }
33
-
34
- protected function inflectExtensionVars($vars)
35
- {
36
- $vars['name'] = preg_replace('/-extension$/', '', $vars['name']);
37
- $vars['name'] = str_replace('-', ' ', $vars['name']);
38
- $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
39
-
40
- return $vars;
41
- }
42
-
43
- protected function inflectSkinVars($vars)
44
- {
45
- $vars['name'] = preg_replace('/-skin$/', '', $vars['name']);
46
-
47
- return $vars;
48
- }
49
-
50
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php DELETED
@@ -1,111 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class MicroweberInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'module' => 'userfiles/modules/{$name}/',
8
- 'module-skin' => 'userfiles/modules/{$name}/templates/',
9
- 'template' => 'userfiles/templates/{$name}/',
10
- 'element' => 'userfiles/elements/{$name}/',
11
- 'vendor' => 'vendor/{$name}/',
12
- 'components' => 'components/{$name}/'
13
- );
14
-
15
- /**
16
- * Format package name.
17
- *
18
- * For package type microweber-module, cut off a trailing '-module' if present
19
- *
20
- * For package type microweber-template, cut off a trailing '-template' if present.
21
- *
22
- */
23
- public function inflectPackageVars($vars)
24
- {
25
- if ($vars['type'] === 'microweber-template') {
26
- return $this->inflectTemplateVars($vars);
27
- }
28
- if ($vars['type'] === 'microweber-templates') {
29
- return $this->inflectTemplatesVars($vars);
30
- }
31
- if ($vars['type'] === 'microweber-core') {
32
- return $this->inflectCoreVars($vars);
33
- }
34
- if ($vars['type'] === 'microweber-adapter') {
35
- return $this->inflectCoreVars($vars);
36
- }
37
- if ($vars['type'] === 'microweber-module') {
38
- return $this->inflectModuleVars($vars);
39
- }
40
- if ($vars['type'] === 'microweber-modules') {
41
- return $this->inflectModulesVars($vars);
42
- }
43
- if ($vars['type'] === 'microweber-skin') {
44
- return $this->inflectSkinVars($vars);
45
- }
46
- if ($vars['type'] === 'microweber-element' or $vars['type'] === 'microweber-elements') {
47
- return $this->inflectElementVars($vars);
48
- }
49
-
50
- return $vars;
51
- }
52
-
53
- protected function inflectTemplateVars($vars)
54
- {
55
- $vars['name'] = preg_replace('/-template$/', '', $vars['name']);
56
- $vars['name'] = preg_replace('/template-$/', '', $vars['name']);
57
-
58
- return $vars;
59
- }
60
-
61
- protected function inflectTemplatesVars($vars)
62
- {
63
- $vars['name'] = preg_replace('/-templates$/', '', $vars['name']);
64
- $vars['name'] = preg_replace('/templates-$/', '', $vars['name']);
65
-
66
- return $vars;
67
- }
68
-
69
- protected function inflectCoreVars($vars)
70
- {
71
- $vars['name'] = preg_replace('/-providers$/', '', $vars['name']);
72
- $vars['name'] = preg_replace('/-provider$/', '', $vars['name']);
73
- $vars['name'] = preg_replace('/-adapter$/', '', $vars['name']);
74
-
75
- return $vars;
76
- }
77
-
78
- protected function inflectModuleVars($vars)
79
- {
80
- $vars['name'] = preg_replace('/-module$/', '', $vars['name']);
81
- $vars['name'] = preg_replace('/module-$/', '', $vars['name']);
82
-
83
- return $vars;
84
- }
85
-
86
- protected function inflectModulesVars($vars)
87
- {
88
- $vars['name'] = preg_replace('/-modules$/', '', $vars['name']);
89
- $vars['name'] = preg_replace('/modules-$/', '', $vars['name']);
90
-
91
- return $vars;
92
- }
93
-
94
- protected function inflectSkinVars($vars)
95
- {
96
- $vars['name'] = preg_replace('/-skin$/', '', $vars['name']);
97
- $vars['name'] = preg_replace('/skin-$/', '', $vars['name']);
98
-
99
- return $vars;
100
- }
101
-
102
- protected function inflectElementVars($vars)
103
- {
104
- $vars['name'] = preg_replace('/-elements$/', '', $vars['name']);
105
- $vars['name'] = preg_replace('/elements-$/', '', $vars['name']);
106
- $vars['name'] = preg_replace('/-element$/', '', $vars['name']);
107
- $vars['name'] = preg_replace('/element-$/', '', $vars['name']);
108
-
109
- return $vars;
110
- }
111
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/ModxInstaller.php DELETED
@@ -1,12 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- /**
5
- * An installer to handle MODX specifics when installing packages.
6
- */
7
- class ModxInstaller extends BaseInstaller
8
- {
9
- protected $locations = array(
10
- 'extra' => 'core/packages/{$name}/'
11
- );
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php DELETED
@@ -1,57 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class MoodleInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'mod' => 'mod/{$name}/',
8
- 'admin_report' => 'admin/report/{$name}/',
9
- 'atto' => 'lib/editor/atto/plugins/{$name}/',
10
- 'tool' => 'admin/tool/{$name}/',
11
- 'assignment' => 'mod/assignment/type/{$name}/',
12
- 'assignsubmission' => 'mod/assign/submission/{$name}/',
13
- 'assignfeedback' => 'mod/assign/feedback/{$name}/',
14
- 'auth' => 'auth/{$name}/',
15
- 'availability' => 'availability/condition/{$name}/',
16
- 'block' => 'blocks/{$name}/',
17
- 'booktool' => 'mod/book/tool/{$name}/',
18
- 'cachestore' => 'cache/stores/{$name}/',
19
- 'cachelock' => 'cache/locks/{$name}/',
20
- 'calendartype' => 'calendar/type/{$name}/',
21
- 'format' => 'course/format/{$name}/',
22
- 'coursereport' => 'course/report/{$name}/',
23
- 'datafield' => 'mod/data/field/{$name}/',
24
- 'datapreset' => 'mod/data/preset/{$name}/',
25
- 'editor' => 'lib/editor/{$name}/',
26
- 'enrol' => 'enrol/{$name}/',
27
- 'filter' => 'filter/{$name}/',
28
- 'gradeexport' => 'grade/export/{$name}/',
29
- 'gradeimport' => 'grade/import/{$name}/',
30
- 'gradereport' => 'grade/report/{$name}/',
31
- 'gradingform' => 'grade/grading/form/{$name}/',
32
- 'local' => 'local/{$name}/',
33
- 'logstore' => 'admin/tool/log/store/{$name}/',
34
- 'ltisource' => 'mod/lti/source/{$name}/',
35
- 'ltiservice' => 'mod/lti/service/{$name}/',
36
- 'message' => 'message/output/{$name}/',
37
- 'mnetservice' => 'mnet/service/{$name}/',
38
- 'plagiarism' => 'plagiarism/{$name}/',
39
- 'portfolio' => 'portfolio/{$name}/',
40
- 'qbehaviour' => 'question/behaviour/{$name}/',
41
- 'qformat' => 'question/format/{$name}/',
42
- 'qtype' => 'question/type/{$name}/',
43
- 'quizaccess' => 'mod/quiz/accessrule/{$name}/',
44
- 'quiz' => 'mod/quiz/report/{$name}/',
45
- 'report' => 'report/{$name}/',
46
- 'repository' => 'repository/{$name}/',
47
- 'scormreport' => 'mod/scorm/report/{$name}/',
48
- 'search' => 'search/engine/{$name}/',
49
- 'theme' => 'theme/{$name}/',
50
- 'tinymce' => 'lib/editor/tinymce/plugins/{$name}/',
51
- 'profilefield' => 'user/profile/field/{$name}/',
52
- 'webservice' => 'webservice/{$name}/',
53
- 'workshopallocation' => 'mod/workshop/allocation/{$name}/',
54
- 'workshopeval' => 'mod/workshop/eval/{$name}/',
55
- 'workshopform' => 'mod/workshop/form/{$name}/'
56
- );
57
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php DELETED
@@ -1,46 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class OctoberInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'module' => 'modules/{$name}/',
8
- 'plugin' => 'plugins/{$vendor}/{$name}/',
9
- 'theme' => 'themes/{$name}/'
10
- );
11
-
12
- /**
13
- * Format package name.
14
- *
15
- * For package type october-plugin, cut off a trailing '-plugin' if present.
16
- *
17
- * For package type october-theme, cut off a trailing '-theme' if present.
18
- *
19
- */
20
- public function inflectPackageVars($vars)
21
- {
22
- if ($vars['type'] === 'october-plugin') {
23
- return $this->inflectPluginVars($vars);
24
- }
25
-
26
- if ($vars['type'] === 'october-theme') {
27
- return $this->inflectThemeVars($vars);
28
- }
29
-
30
- return $vars;
31
- }
32
-
33
- protected function inflectPluginVars($vars)
34
- {
35
- $vars['name'] = preg_replace('/^oc-|-plugin$/', '', $vars['name']);
36
-
37
- return $vars;
38
- }
39
-
40
- protected function inflectThemeVars($vars)
41
- {
42
- $vars['name'] = preg_replace('/^oc-|-theme$/', '', $vars['name']);
43
-
44
- return $vars;
45
- }
46
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php DELETED
@@ -1,24 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class OntoWikiInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'extension' => 'extensions/{$name}/',
8
- 'theme' => 'extensions/themes/{$name}/',
9
- 'translation' => 'extensions/translations/{$name}/',
10
- );
11
-
12
- /**
13
- * Format package name to lower case and remove ".ontowiki" suffix
14
- */
15
- public function inflectPackageVars($vars)
16
- {
17
- $vars['name'] = strtolower($vars['name']);
18
- $vars['name'] = preg_replace('/.ontowiki$/', '', $vars['name']);
19
- $vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
20
- $vars['name'] = preg_replace('/-translation$/', '', $vars['name']);
21
-
22
- return $vars;
23
- }
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php DELETED
@@ -1,14 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
-
5
- class OsclassInstaller extends BaseInstaller
6
- {
7
-
8
- protected $locations = array(
9
- 'plugin' => 'oc-content/plugins/{$name}/',
10
- 'theme' => 'oc-content/themes/{$name}/',
11
- 'language' => 'oc-content/languages/{$name}/',
12
- );
13
-
14
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/OxidInstaller.php DELETED
@@ -1,59 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- use Composer\Package\PackageInterface;
5
-
6
- class OxidInstaller extends BaseInstaller
7
- {
8
- const VENDOR_PATTERN = '/^modules\/(?P<vendor>.+)\/.+/';
9
-
10
- protected $locations = array(
11
- 'module' => 'modules/{$name}/',
12
- 'theme' => 'application/views/{$name}/',
13
- 'out' => 'out/{$name}/',
14
- );
15
-
16
- /**
17
- * getInstallPath
18
- *
19
- * @param PackageInterface $package
20
- * @param string $frameworkType
21
- * @return void
22
- */
23
- public function getInstallPath(PackageInterface $package, $frameworkType = '')
24
- {
25
- $installPath = parent::getInstallPath($package, $frameworkType);
26
- $type = $this->package->getType();
27
- if ($type === 'oxid-module') {
28
- $this->prepareVendorDirectory($installPath);
29
- }
30
- return $installPath;
31
- }
32
-
33
- /**
34
- * prepareVendorDirectory
35
- *
36
- * Makes sure there is a vendormetadata.php file inside
37
- * the vendor folder if there is a vendor folder.
38
- *
39
- * @param string $installPath
40
- * @return void
41
- */
42
- protected function prepareVendorDirectory($installPath)
43
- {
44
- $matches = '';
45
- $hasVendorDirectory = preg_match(self::VENDOR_PATTERN, $installPath, $matches);
46
- if (!$hasVendorDirectory) {
47
- return;
48
- }
49
-
50
- $vendorDirectory = $matches['vendor'];
51
- $vendorPath = getcwd() . '/modules/' . $vendorDirectory;
52
- if (!file_exists($vendorPath)) {
53
- mkdir($vendorPath, 0755, true);
54
- }
55
-
56
- $vendorMetaDataPath = $vendorPath . '/vendormetadata.php';
57
- touch($vendorMetaDataPath);
58
- }
59
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/PPIInstaller.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class PPIInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'module' => 'modules/{$name}/',
8
- );
9
- }
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php DELETED
@@ -1,11 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class PhiftyInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'bundle' => 'bundles/{$name}/',
8
- 'library' => 'libraries/{$name}/',
9
- 'framework' => 'frameworks/{$name}/',
10
- );
11
- }
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php DELETED
@@ -1,11 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class PhpBBInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'extension' => 'ext/{$vendor}/{$name}/',
8
- 'language' => 'language/{$name}/',
9
- 'style' => 'styles/{$name}/',
10
- );
11
- }
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php DELETED
@@ -1,21 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class PimcoreInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'plugin' => 'plugins/{$name}/',
8
- );
9
-
10
- /**
11
- * Format package name to CamelCase
12
- */
13
- public function inflectPackageVars($vars)
14
- {
15
- $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
16
- $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
17
- $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
18
-
19
- return $vars;
20
- }
21
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php DELETED
@@ -1,32 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- /**
5
- * Class PiwikInstaller
6
- *
7
- * @package Composer\Installers
8
- */
9
- class PiwikInstaller extends BaseInstaller
10
- {
11
- /**
12
- * @var array
13
- */
14
- protected $locations = array(
15
- 'plugin' => 'plugins/{$name}/',
16
- );
17
-
18
- /**
19
- * Format package name to CamelCase
20
- * @param array $vars
21
- *
22
- * @return array
23
- */
24
- public function inflectPackageVars($vars)
25
- {
26
- $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
27
- $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
28
- $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
29
-
30
- return $vars;
31
- }
32
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php DELETED
@@ -1,29 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class PlentymarketsInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'plugin' => '{$name}/'
8
- );
9
-
10
- /**
11
- * Remove hyphen, "plugin" and format to camelcase
12
- * @param array $vars
13
- *
14
- * @return array
15
- */
16
- public function inflectPackageVars($vars)
17
- {
18
- $vars['name'] = explode("-", $vars['name']);
19
- foreach ($vars['name'] as $key => $name) {
20
- $vars['name'][$key] = ucfirst($vars['name'][$key]);
21
- if (strcasecmp($name, "Plugin") == 0) {
22
- unset($vars['name'][$key]);
23
- }
24
- }
25
- $vars['name'] = implode("",$vars['name']);
26
-
27
- return $vars;
28
- }
29
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/Plugin.php DELETED
@@ -1,17 +0,0 @@
1
- <?php
2
-
3
- namespace Composer\Installers;
4
-
5
- use Composer\Composer;
6
- use Composer\IO\IOInterface;
7
- use Composer\Plugin\PluginInterface;
8
-
9
- class Plugin implements PluginInterface
10
- {
11
-
12
- public function activate(Composer $composer, IOInterface $io)
13
- {
14
- $installer = new Installer($io, $composer);
15
- $composer->getInstallationManager()->addInstaller($installer);
16
- }
17
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/PortoInstaller.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class PortoInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'container' => 'app/Containers/{$name}/',
8
- );
9
- }
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class PrestashopInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'module' => 'modules/{$name}/',
8
- 'theme' => 'themes/{$name}/',
9
- );
10
- }
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php DELETED
@@ -1,11 +0,0 @@
1
- <?php
2
-
3
- namespace Composer\Installers;
4
-
5
- class PuppetInstaller extends BaseInstaller
6
- {
7
-
8
- protected $locations = array(
9
- 'module' => 'modules/{$name}/',
10
- );
11
- }
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php DELETED
@@ -1,63 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class PxcmsInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'module' => 'app/Modules/{$name}/',
8
- 'theme' => 'themes/{$name}/',
9
- );
10
-
11
- /**
12
- * Format package name.
13
- *
14
- * @param array $vars
15
- *
16
- * @return array
17
- */
18
- public function inflectPackageVars($vars)
19
- {
20
- if ($vars['type'] === 'pxcms-module') {
21
- return $this->inflectModuleVars($vars);
22
- }
23
-
24
- if ($vars['type'] === 'pxcms-theme') {
25
- return $this->inflectThemeVars($vars);
26
- }
27
-
28
- return $vars;
29
- }
30
-
31
- /**
32
- * For package type pxcms-module, cut off a trailing '-plugin' if present.
33
- *
34
- * return string
35
- */
36
- protected function inflectModuleVars($vars)
37
- {
38
- $vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy)
39
- $vars['name'] = str_replace('module-', '', $vars['name']); // strip out module-
40
- $vars['name'] = preg_replace('/-module$/', '', $vars['name']); // strip out -module
41
- $vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s
42
- $vars['name'] = ucwords($vars['name']); // make module name camelcased
43
-
44
- return $vars;
45
- }
46
-
47
-
48
- /**
49
- * For package type pxcms-module, cut off a trailing '-plugin' if present.
50
- *
51
- * return string
52
- */
53
- protected function inflectThemeVars($vars)
54
- {
55
- $vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy)
56
- $vars['name'] = str_replace('theme-', '', $vars['name']); // strip out theme-
57
- $vars['name'] = preg_replace('/-theme$/', '', $vars['name']); // strip out -theme
58
- $vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s
59
- $vars['name'] = ucwords($vars['name']); // make module name camelcased
60
-
61
- return $vars;
62
- }
63
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php DELETED
@@ -1,24 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class RadPHPInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'bundle' => 'src/{$name}/'
8
- );
9
-
10
- /**
11
- * Format package name to CamelCase
12
- */
13
- public function inflectPackageVars($vars)
14
- {
15
- $nameParts = explode('/', $vars['name']);
16
- foreach ($nameParts as &$value) {
17
- $value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
18
- $value = str_replace(array('-', '_'), ' ', $value);
19
- $value = str_replace(' ', '', ucwords($value));
20
- }
21
- $vars['name'] = implode('/', $nameParts);
22
- return $vars;
23
- }
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class ReIndexInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'theme' => 'themes/{$name}/',
8
- 'plugin' => 'plugins/{$name}/'
9
- );
10
- }
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class RedaxoInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'addon' => 'redaxo/include/addons/{$name}/',
8
- 'bestyle-plugin' => 'redaxo/include/addons/be_style/plugins/{$name}/'
9
- );
10
- }
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php DELETED
@@ -1,22 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class RoundcubeInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'plugin' => 'plugins/{$name}/',
8
- );
9
-
10
- /**
11
- * Lowercase name and changes the name to a underscores
12
- *
13
- * @param array $vars
14
- * @return array
15
- */
16
- public function inflectPackageVars($vars)
17
- {
18
- $vars['name'] = strtolower(str_replace('-', '_', $vars['name']));
19
-
20
- return $vars;
21
- }
22
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/SMFInstaller.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class SMFInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'module' => 'Sources/{$name}/',
8
- 'theme' => 'Themes/{$name}/',
9
- );
10
- }
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php DELETED
@@ -1,60 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- /**
5
- * Plugin/theme installer for shopware
6
- * @author Benjamin Boit
7
- */
8
- class ShopwareInstaller extends BaseInstaller
9
- {
10
- protected $locations = array(
11
- 'backend-plugin' => 'engine/Shopware/Plugins/Local/Backend/{$name}/',
12
- 'core-plugin' => 'engine/Shopware/Plugins/Local/Core/{$name}/',
13
- 'frontend-plugin' => 'engine/Shopware/Plugins/Local/Frontend/{$name}/',
14
- 'theme' => 'templates/{$name}/',
15
- 'plugin' => 'custom/plugins/{$name}/',
16
- 'frontend-theme' => 'themes/Frontend/{$name}/',
17
- );
18
-
19
- /**
20
- * Transforms the names
21
- * @param array $vars
22
- * @return array
23
- */
24
- public function inflectPackageVars($vars)
25
- {
26
- if ($vars['type'] === 'shopware-theme') {
27
- return $this->correctThemeName($vars);
28
- }
29
-
30
- return $this->correctPluginName($vars);
31
- }
32
-
33
- /**
34
- * Changes the name to a camelcased combination of vendor and name
35
- * @param array $vars
36
- * @return array
37
- */
38
- private function correctPluginName($vars)
39
- {
40
- $camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) {
41
- return strtoupper($matches[0][1]);
42
- }, $vars['name']);
43
-
44
- $vars['name'] = ucfirst($vars['vendor']) . ucfirst($camelCasedName);
45
-
46
- return $vars;
47
- }
48
-
49
- /**
50
- * Changes the name to a underscore separated name
51
- * @param array $vars
52
- * @return array
53
- */
54
- private function correctThemeName($vars)
55
- {
56
- $vars['name'] = str_replace('-', '_', $vars['name']);
57
-
58
- return $vars;
59
- }
60
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php DELETED
@@ -1,35 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- use Composer\Package\PackageInterface;
5
-
6
- class SilverStripeInstaller extends BaseInstaller
7
- {
8
- protected $locations = array(
9
- 'module' => '{$name}/',
10
- 'theme' => 'themes/{$name}/',
11
- );
12
-
13
- /**
14
- * Return the install path based on package type.
15
- *
16
- * Relies on built-in BaseInstaller behaviour with one exception: silverstripe/framework
17
- * must be installed to 'sapphire' and not 'framework' if the version is <3.0.0
18
- *
19
- * @param PackageInterface $package
20
- * @param string $frameworkType
21
- * @return string
22
- */
23
- public function getInstallPath(PackageInterface $package, $frameworkType = '')
24
- {
25
- if (
26
- $package->getName() == 'silverstripe/framework'
27
- && preg_match('/^\d+\.\d+\.\d+/', $package->getVersion())
28
- && version_compare($package->getVersion(), '2.999.999') < 0
29
- ) {
30
- return $this->templatePath($this->locations['module'], array('name' => 'sapphire'));
31
- }
32
-
33
- return parent::getInstallPath($package, $frameworkType);
34
- }
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php DELETED
@@ -1,25 +0,0 @@
1
- <?php
2
-
3
- namespace Composer\Installers;
4
-
5
- class SiteDirectInstaller extends BaseInstaller
6
- {
7
- protected $locations = array(
8
- 'module' => 'modules/{$vendor}/{$name}/',
9
- 'plugin' => 'plugins/{$vendor}/{$name}/'
10
- );
11
-
12
- public function inflectPackageVars($vars)
13
- {
14
- return $this->parseVars($vars);
15
- }
16
-
17
- protected function parseVars($vars)
18
- {
19
- $vars['vendor'] = strtolower($vars['vendor']) == 'sitedirect' ? 'SiteDirect' : $vars['vendor'];
20
- $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
21
- $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
22
-
23
- return $vars;
24
- }
25
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php DELETED
@@ -1,49 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class SyDESInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'module' => 'app/modules/{$name}/',
8
- 'theme' => 'themes/{$name}/',
9
- );
10
-
11
- /**
12
- * Format module name.
13
- *
14
- * Strip `sydes-` prefix and a trailing '-theme' or '-module' from package name if present.
15
- *
16
- * @param array @vars
17
- *
18
- * @return array
19
- */
20
- public function inflectPackageVars($vars)
21
- {
22
- if ($vars['type'] == 'sydes-module') {
23
- return $this->inflectModuleVars($vars);
24
- }
25
-
26
- if ($vars['type'] === 'sydes-theme') {
27
- return $this->inflectThemeVars($vars);
28
- }
29
-
30
- return $vars;
31
- }
32
-
33
- public function inflectModuleVars($vars)
34
- {
35
- $vars['name'] = preg_replace('/(^sydes-|-module$)/i', '', $vars['name']);
36
- $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
37
- $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
38
-
39
- return $vars;
40
- }
41
-
42
- protected function inflectThemeVars($vars)
43
- {
44
- $vars['name'] = preg_replace('/(^sydes-|-theme$)/', '', $vars['name']);
45
- $vars['name'] = strtolower($vars['name']);
46
-
47
- return $vars;
48
- }
49
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php DELETED
@@ -1,26 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- /**
5
- * Plugin installer for symfony 1.x
6
- *
7
- * @author Jérôme Tamarelle <jerome@tamarelle.net>
8
- */
9
- class Symfony1Installer extends BaseInstaller
10
- {
11
- protected $locations = array(
12
- 'plugin' => 'plugins/{$name}/',
13
- );
14
-
15
- /**
16
- * Format package name to CamelCase
17
- */
18
- public function inflectPackageVars($vars)
19
- {
20
- $vars['name'] = preg_replace_callback('/(-[a-z])/', function ($matches) {
21
- return strtoupper($matches[0][1]);
22
- }, $vars['name']);
23
-
24
- return $vars;
25
- }
26
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php DELETED
@@ -1,16 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- /**
5
- * Extension installer for TYPO3 CMS
6
- *
7
- * @deprecated since 1.0.25, use https://packagist.org/packages/typo3/cms-composer-installers instead
8
- *
9
- * @author Sascha Egerer <sascha.egerer@dkd.de>
10
- */
11
- class TYPO3CmsInstaller extends BaseInstaller
12
- {
13
- protected $locations = array(
14
- 'extension' => 'typo3conf/ext/{$name}/',
15
- );
16
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php DELETED
@@ -1,38 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- /**
5
- * An installer to handle TYPO3 Flow specifics when installing packages.
6
- */
7
- class TYPO3FlowInstaller extends BaseInstaller
8
- {
9
- protected $locations = array(
10
- 'package' => 'Packages/Application/{$name}/',
11
- 'framework' => 'Packages/Framework/{$name}/',
12
- 'plugin' => 'Packages/Plugins/{$name}/',
13
- 'site' => 'Packages/Sites/{$name}/',
14
- 'boilerplate' => 'Packages/Boilerplates/{$name}/',
15
- 'build' => 'Build/{$name}/',
16
- );
17
-
18
- /**
19
- * Modify the package name to be a TYPO3 Flow style key.
20
- *
21
- * @param array $vars
22
- * @return array
23
- */
24
- public function inflectPackageVars($vars)
25
- {
26
- $autoload = $this->package->getAutoload();
27
- if (isset($autoload['psr-0']) && is_array($autoload['psr-0'])) {
28
- $namespace = key($autoload['psr-0']);
29
- $vars['name'] = str_replace('\\', '.', $namespace);
30
- }
31
- if (isset($autoload['psr-4']) && is_array($autoload['psr-4'])) {
32
- $namespace = key($autoload['psr-4']);
33
- $vars['name'] = rtrim(str_replace('\\', '.', $namespace), '.');
34
- }
35
-
36
- return $vars;
37
- }
38
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php DELETED
@@ -1,12 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class TheliaInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'module' => 'local/modules/{$name}/',
8
- 'frontoffice-template' => 'templates/frontOffice/{$name}/',
9
- 'backoffice-template' => 'templates/backOffice/{$name}/',
10
- 'email-template' => 'templates/email/{$name}/',
11
- );
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/TuskInstaller.php DELETED
@@ -1,14 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
- /**
4
- * Composer installer for 3rd party Tusk utilities
5
- * @author Drew Ewing <drew@phenocode.com>
6
- */
7
- class TuskInstaller extends BaseInstaller
8
- {
9
- protected $locations = array(
10
- 'task' => '.tusk/tasks/{$name}/',
11
- 'command' => '.tusk/commands/{$name}/',
12
- 'asset' => 'assets/tusk/{$name}/',
13
- );
14
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class UserFrostingInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'sprinkle' => 'app/sprinkles/{$name}/',
8
- );
9
- }
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class VanillaInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'plugin' => 'plugins/{$name}/',
8
- 'theme' => 'themes/{$name}/',
9
- );
10
- }
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php DELETED
@@ -1,49 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class VgmcpInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'bundle' => 'src/{$vendor}/{$name}/',
8
- 'theme' => 'themes/{$name}/'
9
- );
10
-
11
- /**
12
- * Format package name.
13
- *
14
- * For package type vgmcp-bundle, cut off a trailing '-bundle' if present.
15
- *
16
- * For package type vgmcp-theme, cut off a trailing '-theme' if present.
17
- *
18
- */
19
- public function inflectPackageVars($vars)
20
- {
21
- if ($vars['type'] === 'vgmcp-bundle') {
22
- return $this->inflectPluginVars($vars);
23
- }
24
-
25
- if ($vars['type'] === 'vgmcp-theme') {
26
- return $this->inflectThemeVars($vars);
27
- }
28
-
29
- return $vars;
30
- }
31
-
32
- protected function inflectPluginVars($vars)
33
- {
34
- $vars['name'] = preg_replace('/-bundle$/', '', $vars['name']);
35
- $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
36
- $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
37
-
38
- return $vars;
39
- }
40
-
41
- protected function inflectThemeVars($vars)
42
- {
43
- $vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
44
- $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
45
- $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
46
-
47
- return $vars;
48
- }
49
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
-
3
- namespace Composer\Installers;
4
-
5
- class WHMCSInstaller extends BaseInstaller
6
- {
7
- protected $locations = array(
8
- 'gateway' => 'modules/gateways/{$name}/',
9
- );
10
- }
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class WolfCMSInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'plugin' => 'wolf/plugins/{$name}/',
8
- );
9
- }
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php DELETED
@@ -1,12 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class WordPressInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'plugin' => 'wp-content/plugins/{$name}/',
8
- 'theme' => 'wp-content/themes/{$name}/',
9
- 'muplugin' => 'wp-content/mu-plugins/{$name}/',
10
- 'dropin' => 'wp-content/{$name}/',
11
- );
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/YawikInstaller.php DELETED
@@ -1,32 +0,0 @@
1
- <?php
2
- /**
3
- * Created by PhpStorm.
4
- * User: cbleek
5
- * Date: 25.03.16
6
- * Time: 20:55
7
- */
8
-
9
- namespace Composer\Installers;
10
-
11
-
12
- class YawikInstaller extends BaseInstaller
13
- {
14
- protected $locations = array(
15
- 'module' => 'module/{$name}/',
16
- );
17
-
18
- /**
19
- * Format package name to CamelCase
20
- * @param array $vars
21
- *
22
- * @return array
23
- */
24
- public function inflectPackageVars($vars)
25
- {
26
- $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
27
- $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
28
- $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
29
-
30
- return $vars;
31
- }
32
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/ZendInstaller.php DELETED
@@ -1,11 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class ZendInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'library' => 'library/{$name}/',
8
- 'extra' => 'extras/library/{$name}/',
9
- 'module' => 'module/{$name}/',
10
- );
11
- }
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
- namespace Composer\Installers;
3
-
4
- class ZikulaInstaller extends BaseInstaller
5
- {
6
- protected $locations = array(
7
- 'module' => 'modules/{$vendor}-{$name}/',
8
- 'theme' => 'themes/{$vendor}-{$name}/'
9
- );
10
- }
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/src/bootstrap.php DELETED
@@ -1,13 +0,0 @@
1
- <?php
2
- function includeIfExists($file)
3
- {
4
- if (file_exists($file)) {
5
- return include $file;
6
- }
7
- }
8
- if ((!$loader = includeIfExists(__DIR__ . '/../vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__ . '/../../../autoload.php'))) {
9
- die('You must set up the project dependencies, run the following commands:'.PHP_EOL.
10
- 'curl -s http://getcomposer.org/installer | php'.PHP_EOL.
11
- 'php composer.phar install'.PHP_EOL);
12
- }
13
- return $loader;
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/tests/Composer/Installers/Test/AsgardInstallerTest.php DELETED
@@ -1,80 +0,0 @@
1
- <?php
2
- namespace Composer\Installers\Test;
3
-
4
- use Composer\Installers\AsgardInstaller;
5
- use Composer\Package\Package;
6
- use Composer\Composer;
7
- use PHPUnit\Framework\TestCase;
8
-
9
- class AsgardInstallerTest extends TestCase
10
- {
11
- /**
12
- * @var AsgardInstaller
13
- */
14
- private $installer;
15
-
16
- public function setUp()
17
- {
18
- $this->installer = new AsgardInstaller(
19
- new Package('NyanCat', '4.2', '4.2'),
20
- new Composer()
21
- );
22
- }
23
-
24
- /**
25
- * @dataProvider packageNameInflectionProvider
26
- */
27
- public function testInflectPackageVars($type, $name, $expected)
28
- {
29
- $this->assertEquals(
30
- array('name' => $expected, 'type' => $type),
31
- $this->installer->inflectPackageVars(array('name' => $name, 'type' => $type))
32
- );
33
- }
34
-
35
- public function packageNameInflectionProvider()
36
- {
37
- return array(
38
- // Should keep module name StudlyCase
39
- array(
40
- 'asgard-module',
41
- 'user-profile',
42
- 'UserProfile'
43
- ),
44
- array(
45
- 'asgard-module',
46
- 'asgard-module',
47
- 'Asgard'
48
- ),
49
- array(
50
- 'asgard-module',
51
- 'blog',
52
- 'Blog'
53
- ),
54
- // tests that exactly one '-module' is cut off
55
- array(
56
- 'asgard-module',
57
- 'some-module-module',
58
- 'SomeModule',
59
- ),
60
- // tests that exactly one '-theme' is cut off
61
- array(
62
- 'asgard-theme',
63
- 'some-theme-theme',
64
- 'SomeTheme',
65
- ),
66
- // tests that names without '-theme' suffix stay valid
67
- array(
68
- 'asgard-theme',
69
- 'someothertheme',
70
- 'Someothertheme',
71
- ),
72
- // Should keep theme name StudlyCase
73
- array(
74
- 'asgard-theme',
75
- 'adminlte-advanced',
76
- 'AdminlteAdvanced'
77
- ),
78
- );
79
- }
80
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/tests/Composer/Installers/Test/BitrixInstallerTest.php DELETED
@@ -1,75 +0,0 @@
1
- <?php
2
-
3
- namespace Composer\Installers\Test;
4
-
5
- use Composer\Installers\BitrixInstaller;
6
- use Composer\Package\Package;
7
- use Composer\Composer;
8
-
9
- /**
10
- * Tests for the BitrixInstaller Class
11
- *
12
- * @coversDefaultClass Composer\Installers\BitrixInstaller
13
- */
14
- class BitrixInstallerTest extends TestCase
15
- {
16
- /** @var BitrixInstaller */
17
- private $installer;
18
-
19
- /** @var Composer */
20
- private $composer;
21
-
22
-
23
- /**
24
- * Sets up the fixture, for example, instantiate the class-under-test.
25
- *
26
- * This method is called before a test is executed.
27
- */
28
- final function setUp()
29
- {
30
- $this->composer = new Composer();
31
- }
32
-
33
- /**
34
- * @param string $vars
35
- * @param string $expectedVars
36
- *
37
- * @covers ::inflectPackageVars
38
- *
39
- * @dataProvider provideExpectedInflectionResults
40
- */
41
- final public function testInflectPackageVars($vars, $expectedVars)
42
- {
43
-
44
- $this->installer = new BitrixInstaller(
45
- new Package($vars['name'], '4.2', '4.2'),
46
- $this->composer
47
- );
48
- $actual = $this->installer->inflectPackageVars($vars);
49
- $this->assertEquals($actual, $expectedVars);
50
- }
51
-
52
- /**
53
- * Provides various parameters for packages and the expected result after inflection
54
- *
55
- * @return array
56
- */
57
- final public function provideExpectedInflectionResults()
58
- {
59
- return array(
60
- //check bitrix-dir is correct
61
- array(
62
- array('name' => 'Nyan/Cat'),
63
- array('name' => 'Nyan/Cat', 'bitrix_dir' => 'bitrix')
64
- ),
65
- array(
66
- array('name' => 'Nyan/Cat', 'bitrix_dir' => 'bitrix'),
67
- array('name' => 'Nyan/Cat', 'bitrix_dir' => 'bitrix')
68
- ),
69
- array(
70
- array('name' => 'Nyan/Cat', 'bitrix_dir' => 'local'),
71
- array('name' => 'Nyan/Cat', 'bitrix_dir' => 'local')
72
- ),
73
- );
74
- }
75
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php DELETED
@@ -1,114 +0,0 @@
1
- <?php
2
- namespace Composer\Installers\Test;
3
-
4
- use Composer\Installers\CakePHPInstaller;
5
- use Composer\Repository\RepositoryManager;
6
- use Composer\Repository\InstalledArrayRepository;
7
- use Composer\Package\Package;
8
- use Composer\Package\RootPackage;
9
- use Composer\Package\Version\VersionParser;
10
- use Composer\Composer;
11
- use Composer\Config;
12
-
13
- class CakePHPInstallerTest extends TestCase
14
- {
15
- private $composer;
16
- private $io;
17
-
18
- /**
19
- * setUp
20
- *
21
- * @return void
22
- */
23
- public function setUp()
24
- {
25
- $this->package = new Package('CamelCased', '1.0', '1.0');
26
- $this->io = $this->getMock('Composer\IO\PackageInterface');
27
- $this->composer = new Composer();
28
- $this->composer->setConfig(new Config(false));
29
- }
30
-
31
- /**
32
- * testInflectPackageVars
33
- *
34
- * @return void
35
- */
36
- public function testInflectPackageVars()
37
- {
38
- $installer = new CakePHPInstaller($this->package, $this->composer);
39
- $result = $installer->inflectPackageVars(array('name' => 'CamelCased'));
40
- $this->assertEquals($result, array('name' => 'CamelCased'));
41
-
42
- $installer = new CakePHPInstaller($this->package, $this->composer);
43
- $result = $installer->inflectPackageVars(array('name' => 'with-dash'));
44
- $this->assertEquals($result, array('name' => 'WithDash'));
45
-
46
- $installer = new CakePHPInstaller($this->package, $this->composer);
47
- $result = $installer->inflectPackageVars(array('name' => 'with_underscore'));
48
- $this->assertEquals($result, array('name' => 'WithUnderscore'));
49
-
50
- $installer = new CakePHPInstaller($this->package, $this->composer);
51
- $result = $installer->inflectPackageVars(array('name' => 'cake/acl'));
52
- $this->assertEquals($result, array('name' => 'Cake/Acl'));
53
-
54
- $installer = new CakePHPInstaller($this->package, $this->composer);
55
- $result = $installer->inflectPackageVars(array('name' => 'cake/debug-kit'));
56
- $this->assertEquals($result, array('name' => 'Cake/DebugKit'));
57
- }
58
-
59
- /**
60
- * Test getLocations returning appropriate values based on CakePHP version
61
- *
62
- */
63
- public function testGetLocations() {
64
- $package = new RootPackage('CamelCased', '1.0', '1.0');
65
- $composer = $this->composer;
66
- $rm = new RepositoryManager(
67
- $this->getMock('Composer\IO\IOInterface'),
68
- $this->getMock('Composer\Config')
69
- );
70
- $composer->setRepositoryManager($rm);
71
- $installer = new CakePHPInstaller($package, $composer);
72
-
73
- // 2.0 < cakephp < 3.0
74
- $this->setCakephpVersion($rm, '2.0.0');
75
- $result = $installer->getLocations();
76
- $this->assertContains('Plugin/', $result['plugin']);
77
-
78
- $this->setCakephpVersion($rm, '2.5.9');
79
- $result = $installer->getLocations();
80
- $this->assertContains('Plugin/', $result['plugin']);
81
-
82
- $this->setCakephpVersion($rm, '~2.5');
83
- $result = $installer->getLocations();
84
- $this->assertContains('Plugin/', $result['plugin']);
85
-
86
- // special handling for 2.x versions when 3.x is still in development
87
- $this->setCakephpVersion($rm, 'dev-master');
88
- $result = $installer->getLocations();
89
- $this->assertContains('Plugin/', $result['plugin']);
90
-
91
- $this->setCakephpVersion($rm, '>=2.5');
92
- $result = $installer->getLocations();
93
- $this->assertContains('Plugin/', $result['plugin']);
94
-
95
- // cakephp >= 3.0
96
- $this->setCakephpVersion($rm, '3.0.*-dev');
97
- $result = $installer->getLocations();
98
- $this->assertContains('vendor/{$vendor}/{$name}/', $result['plugin']);
99
-
100
- $this->setCakephpVersion($rm, '~8.8');
101
- $result = $installer->getLocations();
102
- $this->assertContains('vendor/{$vendor}/{$name}/', $result['plugin']);
103
- }
104
-
105
- protected function setCakephpVersion($rm, $version) {
106
- $parser = new VersionParser();
107
- list(, $version) = explode(' ', $parser->parseConstraints($version));
108
- $installed = new InstalledArrayRepository();
109
- $package = new Package('cakephp/cakephp', $version, $version);
110
- $installed->addPackage($package);
111
- $rm->setLocalRepository($installed);
112
- }
113
-
114
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/tests/Composer/Installers/Test/CraftInstallerTest.php DELETED
@@ -1,83 +0,0 @@
1
- <?php
2
-
3
- namespace Composer\Installers\Test;
4
-
5
- use Composer\Installers\CraftInstaller;
6
-
7
- /**
8
- * Tests for the CraftInstaller Class
9
- *
10
- * @coversDefaultClass Composer\Installers\CraftInstaller
11
- */
12
- class CraftInstallerTest extends TestCase
13
- {
14
- /** @var CraftInstaller */
15
- private $installer;
16
-
17
- /**
18
- * Sets up the fixture, for example, instantiate the class-under-test.
19
- *
20
- * This method is called before a test is executed.
21
- */
22
- final public function setup()
23
- {
24
- $this->installer = new CraftInstaller();
25
- }
26
-
27
- /**
28
- * @param string $packageName
29
- * @param string $expectedName
30
- *
31
- * @covers ::inflectPackageVars
32
- *
33
- * @dataProvider provideExpectedInflectionResults
34
- */
35
- final public function testInflectPackageVars($packageName, $expectedName)
36
- {
37
- $installer = $this->installer;
38
-
39
- $vars = array('name' => $packageName);
40
- $expected = array('name' => $expectedName);
41
-
42
- $actual = $installer->inflectPackageVars($vars);
43
-
44
- $this->assertEquals($actual, $expected);
45
- }
46
-
47
- /**
48
- * Provides various names for packages and the expected result after inflection
49
- *
50
- * @return array
51
- */
52
- final public function provideExpectedInflectionResults()
53
- {
54
- return array(
55
- // lowercase
56
- array('foo', 'foo'),
57
- array('craftfoo', 'craftfoo'),
58
- array('fooplugin', 'fooplugin'),
59
- array('craftfooplugin', 'craftfooplugin'),
60
- // lowercase - dash
61
- array('craft-foo', 'foo'),
62
- array('foo-plugin', 'foo'),
63
- array('craft-foo-plugin', 'foo'),
64
- // lowercase - underscore
65
- array('craft_foo', 'craft_foo'),
66
- array('foo_plugin', 'foo_plugin'),
67
- array('craft_foo_plugin', 'craft_foo_plugin'),
68
- // CamelCase
69
- array('Foo', 'Foo'),
70
- array('CraftFoo', 'CraftFoo'),
71
- array('FooPlugin', 'FooPlugin'),
72
- array('CraftFooPlugin', 'CraftFooPlugin'),
73
- // CamelCase - Dash
74
- array('Craft-Foo', 'Foo'),
75
- array('Foo-Plugin', 'Foo'),
76
- array('Craft-Foo-Plugin', 'Foo'),
77
- // CamelCase - underscore
78
- array('Craft_Foo', 'Craft_Foo'),
79
- array('Foo_Plugin', 'Foo_Plugin'),
80
- array('Craft_Foo_Plugin', 'Craft_Foo_Plugin'),
81
- );
82
- }
83
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/tests/Composer/Installers/Test/DokuWikiInstallerTest.php DELETED
@@ -1,90 +0,0 @@
1
- <?php
2
- namespace Composer\Installers\Test;
3
-
4
- use Composer\Installers\DokuWikiInstaller;
5
- use Composer\Package\Package;
6
- use Composer\Composer;
7
- use PHPUnit\Framework\TestCase as BaseTestCase;
8
-
9
- class DokuWikiInstallerTest extends BaseTestCase
10
- {
11
- /**
12
- * @var DokuWikiInstaller
13
- */
14
- private $installer;
15
-
16
- public function setUp()
17
- {
18
- $this->installer = new DokuWikiInstaller(
19
- new Package('NyanCat', '4.2', '4.2'),
20
- new Composer()
21
- );
22
- }
23
-
24
- /**
25
- * @dataProvider packageNameInflectionProvider
26
- */
27
- public function testInflectPackageVars($type, $name, $expected)
28
- {
29
- $this->assertEquals(
30
- $this->installer->inflectPackageVars(array('name' => $name, 'type'=>$type)),
31
- array('name' => $expected, 'type'=>$type)
32
- );
33
- }
34
-
35
- public function packageNameInflectionProvider()
36
- {
37
- return array(
38
- array(
39
- 'dokuwiki-plugin',
40
- 'dokuwiki-test-plugin',
41
- 'test',
42
- ),
43
- array(
44
- 'dokuwiki-plugin',
45
- 'test-plugin',
46
- 'test',
47
- ),
48
- array(
49
- 'dokuwiki-plugin',
50
- 'dokuwiki_test',
51
- 'test',
52
- ),
53
- array(
54
- 'dokuwiki-plugin',
55
- 'test',
56
- 'test',
57
- ),
58
- array(
59
- 'dokuwiki-plugin',
60
- 'test-template',
61
- 'test-template',
62
- ),
63
- array(
64
- 'dokuwiki-template',
65
- 'dokuwiki-test-template',
66
- 'test',
67
- ),
68
- array(
69
- 'dokuwiki-template',
70
- 'test-template',
71
- 'test',
72
- ),
73
- array(
74
- 'dokuwiki-template',
75
- 'dokuwiki_test',
76
- 'test',
77
- ),
78
- array(
79
- 'dokuwiki-template',
80
- 'test',
81
- 'test',
82
- ),
83
- array(
84
- 'dokuwiki-template',
85
- 'test-plugin',
86
- 'test-plugin',
87
- ),
88
- );
89
- }
90
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/tests/Composer/Installers/Test/GravInstallerTest.php DELETED
@@ -1,63 +0,0 @@
1
- <?php
2
- namespace Composer\Installers\Test;
3
-
4
- use Composer\Composer;
5
- use Composer\Installers\GravInstaller;
6
-
7
- class GravInstallerTest extends TestCase
8
- {
9
- /* @var \Composer\Composer */
10
- protected $composer;
11
-
12
- public function setUp()
13
- {
14
- $this->composer = new Composer();
15
- }
16
-
17
- public function testInflectPackageVars()
18
- {
19
- $package = $this->getPackage('vendor/name', '0.0.0');
20
- $installer = new GravInstaller($package, $this->composer);
21
- $packageVars = $this->getPackageVars($package);
22
-
23
- $result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => 'test')));
24
- $this->assertEquals('test', $result['name']);
25
-
26
- foreach ($installer->getLocations() as $name => $location) {
27
- $result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => "$name-test")));
28
- $this->assertEquals('test', $result['name']);
29
- $result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => "test-$name")));
30
- $this->assertEquals('test', $result['name']);
31
- $result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => "$name-test-test")));
32
- $this->assertEquals('test-test', $result['name']);
33
- $result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => "test-test-$name")));
34
- $this->assertEquals('test-test', $result['name']);
35
- $result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => "grav-$name-test")));
36
- $this->assertEquals('test', $result['name']);
37
- $result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => "grav-test-$name")));
38
- $this->assertEquals('test', $result['name']);
39
- $result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => "grav-$name-test-test")));
40
- $this->assertEquals('test-test', $result['name']);
41
- $result = $installer->inflectPackageVars(array_merge($packageVars, array('name' => "grav-test-test-$name")));
42
- $this->assertEquals('test-test', $result['name']);
43
- }
44
- }
45
-
46
- /**
47
- * @param $package \Composer\Package\PackageInterface
48
- */
49
- public function getPackageVars($package)
50
- {
51
- $type = $package->getType();
52
-
53
- $prettyName = $package->getPrettyName();
54
- if (strpos($prettyName, '/') !== false) {
55
- list($vendor, $name) = explode('/', $prettyName);
56
- } else {
57
- $vendor = '';
58
- $name = $prettyName;
59
- }
60
-
61
- return compact('name', 'vendor', 'type');
62
- }
63
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php DELETED
@@ -1,552 +0,0 @@
1
- <?php
2
- namespace Composer\Installers\Test;
3
-
4
- use Composer\Installers\Installer;
5
- use Composer\Util\Filesystem;
6
- use Composer\Package\Package;
7
- use Composer\Package\RootPackage;
8
- use Composer\Composer;
9
- use Composer\Config;
10
-
11
- class InstallerTest extends TestCase
12
- {
13
- private $composer;
14
- private $config;
15
- private $vendorDir;
16
- private $binDir;
17
- private $dm;
18
- private $repository;
19
- private $io;
20
- private $fs;
21
-
22
- /**
23
- * setUp
24
- *
25
- * @return void
26
- */
27
- public function setUp()
28
- {
29
- $this->fs = new Filesystem;
30
-
31
- $this->composer = new Composer();
32
- $this->config = new Config();
33
- $this->composer->setConfig($this->config);
34
-
35
- $this->vendorDir = realpath(sys_get_temp_dir()) . DIRECTORY_SEPARATOR . 'baton-test-vendor';
36
- $this->ensureDirectoryExistsAndClear($this->vendorDir);
37
-
38
- $this->binDir = realpath(sys_get_temp_dir()) . DIRECTORY_SEPARATOR . 'baton-test-bin';
39
- $this->ensureDirectoryExistsAndClear($this->binDir);
40
-
41
- $this->config->merge(array(
42
- 'config' => array(
43
- 'vendor-dir' => $this->vendorDir,
44
- 'bin-dir' => $this->binDir,
45
- ),
46
- ));
47
-
48
- $this->dm = $this->getMockBuilder('Composer\Downloader\DownloadManager')
49
- ->disableOriginalConstructor()
50
- ->getMock();
51
- $this->composer->setDownloadManager($this->dm);
52
-
53
- $this->repository = $this->getMock('Composer\Repository\InstalledRepositoryInterface');
54
- $this->io = $this->getMock('Composer\IO\IOInterface');
55
- }
56
-
57
- /**
58
- * tearDown
59
- *
60
- * @return void
61
- */
62
- public function tearDown()
63
- {
64
- $this->fs->removeDirectory($this->vendorDir);
65
- $this->fs->removeDirectory($this->binDir);
66
- }
67
-
68
- /**
69
- * testSupports
70
- *
71
- * @return void
72
- *
73
- * @dataProvider dataForTestSupport
74
- */
75
- public function testSupports($type, $expected)
76
- {
77
- $installer = new Installer($this->io, $this->composer);
78
- $this->assertSame($expected, $installer->supports($type), sprintf('Failed to show support for %s', $type));
79
- }
80
-
81
- /**
82
- * dataForTestSupport
83
- */
84
- public function dataForTestSupport()
85
- {
86
- return array(
87
- array('agl-module', true),
88
- array('aimeos-extension', true),
89
- array('annotatecms-module', true),
90
- array('annotatecms-component', true),
91
- array('annotatecms-service', true),
92
- array('attogram-module', true),
93
- array('bitrix-module', true),
94
- array('bitrix-component', true),
95
- array('bitrix-theme', true),
96
- array('bonefish-package', true),
97
- array('cakephp', false),
98
- array('cakephp-', false),
99
- array('cakephp-app', false),
100
- array('cakephp-plugin', true),
101
- array('chef-cookbook', true),
102
- array('chef-role', true),
103
- array('cockpit-module', true),
104
- array('codeigniter-app', false),
105
- array('codeigniter-library', true),
106
- array('codeigniter-third-party', true),
107
- array('codeigniter-module', true),
108
- array('concrete5-block', true),
109
- array('concrete5-package', true),
110
- array('concrete5-theme', true),
111
- array('concrete5-core', true),
112
- array('concrete5-update', true),
113
- array('craft-plugin', true),
114
- array('croogo-plugin', true),
115
- array('croogo-theme', true),
116
- array('decibel-app', true),
117
- array('dokuwiki-plugin', true),
118
- array('dokuwiki-template', true),
119
- array('drupal-module', true),
120
- array('dolibarr-module', true),
121
- array('ee3-theme', true),
122
- array('ee3-addon', true),
123
- array('ee2-theme', true),
124
- array('ee2-addon', true),
125
- array('elgg-plugin', true),
126
- array('eliasis-component', true),
127
- array('eliasis-module', true),
128
- array('eliasis-plugin', true),
129
- array('eliasis-template', true),
130
- array('ezplatform-assets', true),
131
- array('ezplatform-meta-assets', true),
132
- array('fuel-module', true),
133
- array('fuel-package', true),
134
- array('fuel-theme', true),
135
- array('fuelphp-component', true),
136
- array('hurad-plugin', true),
137
- array('hurad-theme', true),
138
- array('imagecms-template', true),
139
- array('imagecms-module', true),
140
- array('imagecms-library', true),
141
- array('itop-extension', true),
142
- array('joomla-library', true),
143
- array('kanboard-plugin', true),
144
- array('kirby-plugin', true),
145
- array('kohana-module', true),
146
- array('lms-plugin', true),
147
- array('lms-template', true),
148
- array('lms-document-template', true),
149
- array('lms-userpanel-module', true),
150
- array('laravel-library', true),
151
- array('lavalite-theme', true),
152
- array('lavalite-package', true),
153
- array('lithium-library', true),
154
- array('magento-library', true),
155
- array('majima-plugin', true),
156
- array('mako-package', true),
157
- array('modx-extra', true),
158
- array('modxevo-snippet', true),
159
- array('modxevo-plugin', true),
160
- array('modxevo-module', true),
161
- array('modxevo-template', true),
162
- array('modxevo-lib', true),
163
- array('mediawiki-extension', true),
164
- array('mediawiki-skin', true),
165
- array('microweber-module', true),
166
- array('modulework-module', true),
167
- array('moodle-mod', true),
168
- array('october-module', true),
169
- array('october-plugin', true),
170
- array('piwik-plugin', true),
171
- array('pxcms-module', true),
172
- array('pxcms-theme', true),
173
- array('phpbb-extension', true),
174
- array('pimcore-plugin', true),
175
- array('plentymarkets-plugin', true),
176
- array('ppi-module', true),
177
- array('prestashop-module', true),
178
- array('prestashop-theme', true),
179
- array('puppet-module', true),
180
- array('porto-container', true),
181
- array('radphp-bundle', true),
182
- array('redaxo-addon', true),
183
- array('redaxo-bestyle-plugin', true),
184
- array('reindex-theme', true),
185
- array('reindex-plugin', true),
186
- array('roundcube-plugin', true),
187
- array('shopware-backend-plugin', true),
188
- array('shopware-core-plugin', true),
189
- array('shopware-frontend-plugin', true),
190
- array('shopware-theme', true),
191
- array('shopware-plugin', true),
192
- array('shopware-frontend-theme', true),
193
- array('silverstripe-module', true),
194
- array('silverstripe-theme', true),
195
- array('smf-module', true),
196
- array('smf-theme', true),
197
- array('sydes-module', true),
198
- array('sydes-theme', true),
199
- array('symfony1-plugin', true),
200
- array('thelia-module', true),
201
- array('thelia-frontoffice-template', true),
202
- array('thelia-backoffice-template', true),
203
- array('thelia-email-template', true),
204
- array('tusk-task', true),
205
- array('tusk-asset', true),
206
- array('typo3-flow-plugin', true),
207
- array('typo3-cms-extension', true),
208
- array('userfrosting-sprinkle', true),
209
- array('vanilla-plugin', true),
210
- array('vanilla-theme', true),
211
- array('whmcs-gateway', true),
212
- array('wolfcms-plugin', true),
213
- array('wordpress-plugin', true),
214
- array('wordpress-core', false),
215
- array('yawik-module', true),
216
- array('zend-library', true),
217
- array('zikula-module', true),
218
- array('zikula-theme', true),
219
- array('kodicms-plugin', true),
220
- array('kodicms-media', true),
221
- array('phifty-bundle', true),
222
- array('phifty-library', true),
223
- array('phifty-framework', true),
224
- array('osclass-plugin', true),
225
- array('osclass-theme', true),
226
- array('osclass-language', true),
227
- );
228
- }
229
-
230
- /**
231
- * testInstallPath
232
- *
233
- * @dataProvider dataForTestInstallPath
234
- */
235
- public function testInstallPath($type, $path, $name, $version = '1.0.0')
236
- {
237
- $installer = new Installer($this->io, $this->composer);
238
- $package = new Package($name, $version, $version);
239
-
240
- $package->setType($type);
241
- $result = $installer->getInstallPath($package);
242
- $this->assertEquals($path, $result);
243
- }
244
-
245
- /**
246
- * dataFormTestInstallPath
247
- */
248
- public function dataForTestInstallPath()
249
- {
250
- return array(
251
- array('agl-module', 'More/MyTestPackage/', 'agl/my_test-package'),
252
- array('aimeos-extension', 'ext/ai-test/', 'author/ai-test'),
253
- array('annotatecms-module', 'addons/modules/my_module/', 'vysinsky/my_module'),
254
- array('annotatecms-component', 'addons/components/my_component/', 'vysinsky/my_component'),
255
- array('annotatecms-service', 'addons/services/my_service/', 'vysinsky/my_service'),
256
- array('attogram-module', 'modules/my_module/', 'author/my_module'),
257
- array('bitrix-module', 'bitrix/modules/my_module/', 'author/my_module'),
258
- array('bitrix-component', 'bitrix/components/my_component/', 'author/my_component'),
259
- array('bitrix-theme', 'bitrix/templates/my_theme/', 'author/my_theme'),
260
- array('bitrix-d7-module', 'bitrix/modules/author.my_module/', 'author/my_module'),
261
- array('bitrix-d7-component', 'bitrix/components/author/my_component/', 'author/my_component'),
262
- array('bitrix-d7-template', 'bitrix/templates/author_my_template/', 'author/my_template'),
263
- array('bonefish-package', 'Packages/bonefish/package/', 'bonefish/package'),
264
- array('cakephp-plugin', 'Plugin/Ftp/', 'shama/ftp'),
265
- array('chef-cookbook', 'Chef/mre/my_cookbook/', 'mre/my_cookbook'),
266
- array('chef-role', 'Chef/roles/my_role/', 'mre/my_role'),
267
- array('cockpit-module', 'cockpit/modules/addons/My_module/', 'piotr-cz/cockpit-my_module'),
268
- array('codeigniter-library', 'application/libraries/my_package/', 'shama/my_package'),
269
- array('codeigniter-module', 'application/modules/my_package/', 'shama/my_package'),
270
- array('concrete5-block', 'application/blocks/concrete5_block/', 'remo/concrete5_block'),
271
- array('concrete5-package', 'packages/concrete5_package/', 'remo/concrete5_package'),
272
- array('concrete5-theme', 'application/themes/concrete5_theme/', 'remo/concrete5_theme'),
273
- array('concrete5-core', 'concrete/', 'concrete5/core'),
274
- array('concrete5-update', 'updates/concrete5/', 'concrete5/concrete5'),
275
- array('craft-plugin', 'craft/plugins/my_plugin/', 'mdcpepper/my_plugin'),
276
- array('croogo-plugin', 'Plugin/Sitemaps/', 'fahad19/sitemaps'),
277
- array('croogo-theme', 'View/Themed/Readable/', 'rchavik/readable'),
278
- array('decibel-app', 'app/someapp/', 'author/someapp'),
279
- array('dokuwiki-plugin', 'lib/plugins/someplugin/', 'author/someplugin'),
280
- array('dokuwiki-template', 'lib/tpl/sometemplate/', 'author/sometemplate'),
281
- array('dolibarr-module', 'htdocs/custom/my_module/', 'shama/my_module'),
282
- array('drupal-module', 'modules/my_module/', 'shama/my_module'),
283
- array('drupal-theme', 'themes/my_module/', 'shama/my_module'),
284
- array('drupal-profile', 'profiles/my_module/', 'shama/my_module'),
285
- array('drupal-drush', 'drush/my_module/', 'shama/my_module'),
286
- array('elgg-plugin', 'mod/sample_plugin/', 'test/sample_plugin'),
287
- array('eliasis-component', 'components/my_component/', 'shama/my_component'),
288
- array('eliasis-module', 'modules/my_module/', 'shama/my_module'),
289
- array('eliasis-plugin', 'plugins/my_plugin/', 'shama/my_plugin'),
290
- array('eliasis-template', 'templates/my_template/', 'shama/my_template'),
291
- array('ee3-addon', 'system/user/addons/ee_theme/', 'author/ee_theme'),
292
- array('ee3-theme', 'themes/user/ee_package/', 'author/ee_package'),
293
- array('ee2-addon', 'system/expressionengine/third_party/ee_theme/', 'author/ee_theme'),
294
- array('ee2-theme', 'themes/third_party/ee_package/', 'author/ee_package'),
295
- array('ezplatform-assets', 'web/assets/ezplatform/ezplatform_comp/', 'author/ezplatform_comp'),
296
- array('ezplatform-meta-assets', 'web/assets/ezplatform/', 'author/ezplatform_comp'),
297
- array('fuel-module', 'fuel/app/modules/module/', 'fuel/module'),
298
- array('fuel-package', 'fuel/packages/orm/', 'fuel/orm'),
299
- array('fuel-theme', 'fuel/app/themes/theme/', 'fuel/theme'),
300
- array('fuelphp-component', 'components/demo/', 'fuelphp/demo'),
301
- array('hurad-plugin', 'plugins/Akismet/', 'atkrad/akismet'),
302
- array('hurad-theme', 'plugins/Hurad2013/', 'atkrad/Hurad2013'),
303
- array('imagecms-template', 'templates/my_template/', 'shama/my_template'),
304
- array('imagecms-module', 'application/modules/my_module/', 'shama/my_module'),
305
- array('imagecms-library', 'application/libraries/my_library/', 'shama/my_library'),
306
- array('itop-extension', 'extensions/my_extension/', 'shama/my_extension'),
307
- array('joomla-plugin', 'plugins/my_plugin/', 'shama/my_plugin'),
308
- array('kanboard-plugin', 'plugins/my_plugin/', 'shama/my_plugin'),
309
- array('kirby-plugin', 'site/plugins/my_plugin/', 'shama/my_plugin'),
310
- array('kohana-module', 'modules/my_package/', 'shama/my_package'),
311
- array('lms-plugin', 'plugins/MyPackage/', 'shama/MyPackage'),
312
- array('lms-plugin', 'plugins/MyPackage/', 'shama/my_package'),
313
- array('lms-template', 'templates/MyPackage/', 'shama/MyPackage'),
314
- array('lms-template', 'templates/MyPackage/', 'shama/my_package'),
315
- array('lms-document-template', 'documents/templates/MyPackage/', 'shama/MyPackage'),
316
- array('lms-document-template', 'documents/templates/MyPackage/', 'shama/my_package'),
317
- array('lms-userpanel-module', 'userpanel/modules/MyPackage/', 'shama/MyPackage'),
318
- array('lms-userpanel-module', 'userpanel/modules/MyPackage/', 'shama/my_package'),
319
- array('laravel-library', 'libraries/my_package/', 'shama/my_package'),
320
- array('lavalite-theme', 'public/themes/my_theme/', 'shama/my_theme'),
321
- array('lavalite-package', 'packages/my_group/my_package/', 'my_group/my_package'),
322
- array('lithium-library', 'libraries/li3_test/', 'user/li3_test'),
323
- array('magento-library', 'lib/foo/', 'test/foo'),
324
- array('majima-plugin', 'plugins/MyPlugin/', 'shama/my-plugin'),
325
- array('modx-extra', 'core/packages/extra/', 'vendor/extra'),
326
- array('modxevo-snippet', 'assets/snippets/my_snippet/', 'shama/my_snippet'),
327
- array('modxevo-plugin', 'assets/plugins/my_plugin/', 'shama/my_plugin'),
328
- array('modxevo-module', 'assets/modules/my_module/', 'shama/my_module'),
329
- array('modxevo-template', 'assets/templates/my_template/', 'shama/my_template'),
330
- array('modxevo-lib', 'assets/lib/my_lib/', 'shama/my_lib'),
331
- array('mako-package', 'app/packages/my_package/', 'shama/my_package'),
332
- array('mediawiki-extension', 'extensions/APC/', 'author/APC'),
333
- array('mediawiki-extension', 'extensions/APC/', 'author/APC-extension'),
334
- array('mediawiki-extension', 'extensions/UploadWizard/', 'author/upload-wizard'),
335
- array('mediawiki-extension', 'extensions/SyntaxHighlight_GeSHi/', 'author/syntax-highlight_GeSHi'),
336
- array('mediawiki-skin', 'skins/someskin/', 'author/someskin-skin'),
337
- array('mediawiki-skin', 'skins/someskin/', 'author/someskin'),
338
- array('microweber-module', 'userfiles/modules/my-thing/', 'author/my-thing-module'),
339
- array('modulework-module', 'modules/my_package/', 'shama/my_package'),
340
- array('moodle-mod', 'mod/my_package/', 'shama/my_package'),
341
- array('october-module', 'modules/my_plugin/', 'shama/my_plugin'),
342
- array('october-plugin', 'plugins/shama/my_plugin/', 'shama/my_plugin'),
343
- array('october-theme', 'themes/my_theme/', 'shama/my_theme'),
344
- array('piwik-plugin', 'plugins/VisitSummary/', 'shama/visit-summary'),
345
- array('prestashop-module', 'modules/a-module/', 'vendor/a-module'),
346
- array('prestashop-theme', 'themes/a-theme/', 'vendor/a-theme'),
347
- array('pxcms-module', 'app/Modules/Foo/', 'vendor/module-foo'),
348
- array('pxcms-module', 'app/Modules/Foo/', 'vendor/pxcms-foo'),
349
- array('pxcms-theme', 'themes/Foo/', 'vendor/theme-foo'),
350
- array('pxcms-theme', 'themes/Foo/', 'vendor/pxcms-foo'),
351
- array('phpbb-extension', 'ext/test/foo/', 'test/foo'),
352
- array('phpbb-style', 'styles/foo/', 'test/foo'),
353
- array('phpbb-language', 'language/foo/', 'test/foo'),
354
- array('pimcore-plugin', 'plugins/MyPlugin/', 'ubikz/my_plugin'),
355
- array('plentymarkets-plugin', 'HelloWorld/', 'plugin-hello-world'),
356
- array('ppi-module', 'modules/foo/', 'test/foo'),
357
- array('puppet-module', 'modules/puppet-name/', 'puppet/puppet-name'),
358
- array('porto-container', 'app/Containers/container-name/', 'test/container-name'),
359
- array('radphp-bundle', 'src/Migration/', 'atkrad/migration'),
360
- array('redaxo-addon', 'redaxo/include/addons/my_plugin/', 'shama/my_plugin'),
361
- array('redaxo-bestyle-plugin', 'redaxo/include/addons/be_style/plugins/my_plugin/', 'shama/my_plugin'),
362
- array('reindex-theme', 'themes/my_module/', 'author/my_module'),
363
- array('reindex-plugin', 'plugins/my_module/', 'author/my_module'),
364
- array('roundcube-plugin', 'plugins/base/', 'test/base'),
365
- array('roundcube-plugin', 'plugins/replace_dash/', 'test/replace-dash'),
366
- array('shopware-backend-plugin', 'engine/Shopware/Plugins/Local/Backend/ShamaMyBackendPlugin/', 'shama/my-backend-plugin'),
367
- array('shopware-core-plugin', 'engine/Shopware/Plugins/Local/Core/ShamaMyCorePlugin/', 'shama/my-core-plugin'),
368
- array('shopware-frontend-plugin', 'engine/Shopware/Plugins/Local/Frontend/ShamaMyFrontendPlugin/', 'shama/my-frontend-plugin'),
369
- array('shopware-theme', 'templates/my_theme/', 'shama/my-theme'),
370
- array('shopware-frontend-theme', 'themes/Frontend/ShamaMyFrontendTheme/', 'shama/my-frontend-theme'),
371
- array('shopware-plugin', 'custom/plugins/ShamaMyPlugin/', 'shama/my-plugin'),
372
- array('silverstripe-module', 'my_module/', 'shama/my_module'),
373
- array('silverstripe-module', 'sapphire/', 'silverstripe/framework', '2.4.0'),
374
- array('silverstripe-module', 'framework/', 'silverstripe/framework', '3.0.0'),
375
- array('silverstripe-module', 'framework/', 'silverstripe/framework', '3.0.0-rc1'),
376
- array('silverstripe-module', 'framework/', 'silverstripe/framework', 'my/branch'),
377
- array('silverstripe-theme', 'themes/my_theme/', 'shama/my_theme'),
378
- array('smf-module', 'Sources/my_module/', 'shama/my_module'),
379
- array('smf-theme', 'Themes/my_theme/', 'shama/my_theme'),
380
- array('symfony1-plugin', 'plugins/sfShamaPlugin/', 'shama/sfShamaPlugin'),
381
- array('symfony1-plugin', 'plugins/sfShamaPlugin/', 'shama/sf-shama-plugin'),
382
- array('thelia-module', 'local/modules/my_module/', 'shama/my_module'),
383
- array('thelia-frontoffice-template', 'templates/frontOffice/my_template_fo/', 'shama/my_template_fo'),
384
- array('thelia-backoffice-template', 'templates/backOffice/my_template_bo/', 'shama/my_template_bo'),
385
- array('thelia-email-template', 'templates/email/my_template_email/', 'shama/my_template_email'),
386
- array('tusk-task', '.tusk/tasks/my_task/', 'shama/my_task'),
387
- array('typo3-flow-package', 'Packages/Application/my_package/', 'shama/my_package'),
388
- array('typo3-flow-build', 'Build/my_package/', 'shama/my_package'),
389
- array('typo3-cms-extension', 'typo3conf/ext/my_extension/', 'shama/my_extension'),
390
- array('userfrosting-sprinkle', 'app/sprinkles/my_sprinkle/', 'shama/my_sprinkle'),
391
- array('vanilla-plugin', 'plugins/my_plugin/', 'shama/my_plugin'),
392
- array('vanilla-theme', 'themes/my_theme/', 'shama/my_theme'),
393
- array('whmcs-gateway', 'modules/gateways/gateway_name/', 'vendor/gateway_name'),
394
- array('wolfcms-plugin', 'wolf/plugins/my_plugin/', 'shama/my_plugin'),
395
- array('wordpress-plugin', 'wp-content/plugins/my_plugin/', 'shama/my_plugin'),
396
- array('wordpress-muplugin', 'wp-content/mu-plugins/my_plugin/', 'shama/my_plugin'),
397
- array('zend-extra', 'extras/library/zend_test/', 'shama/zend_test'),
398
- array('zikula-module', 'modules/my-test_module/', 'my/test_module'),
399
- array('zikula-theme', 'themes/my-test_theme/', 'my/test_theme'),
400
- array('kodicms-media', 'cms/media/vendor/my_media/', 'shama/my_media'),
401
- array('kodicms-plugin', 'cms/plugins/my_plugin/', 'shama/my_plugin'),
402
- array('phifty-bundle', 'bundles/core/', 'shama/core'),
403
- array('phifty-library', 'libraries/my-lib/', 'shama/my-lib'),
404
- array('phifty-framework', 'frameworks/my-framework/', 'shama/my-framework'),
405
- array('yawik-module', 'module/MyModule/', 'shama/my_module'),
406
- array('osclass-plugin', 'oc-content/plugins/sample_plugin/', 'test/sample_plugin'),
407
- array('osclass-theme', 'oc-content/themes/sample_theme/', 'test/sample_theme'),
408
- array('osclass-language', 'oc-content/languages/sample_lang/', 'test/sample_lang'),
409
- );
410
- }
411
-
412
- /**
413
- * testGetCakePHPInstallPathException
414
- *
415
- * @return void
416
- *
417
- * @expectedException \InvalidArgumentException
418
- */
419
- public function testGetCakePHPInstallPathException()
420
- {
421
- $installer = new Installer($this->io, $this->composer);
422
- $package = new Package('shama/ftp', '1.0.0', '1.0.0');
423
-
424
- $package->setType('cakephp-whoops');
425
- $result = $installer->getInstallPath($package);
426
- }
427
-
428
- /**
429
- * testCustomInstallPath
430
- */
431
- public function testCustomInstallPath()
432
- {
433
- $installer = new Installer($this->io, $this->composer);
434
- $package = new Package('shama/ftp', '1.0.0', '1.0.0');
435
- $package->setType('cakephp-plugin');
436
- $consumerPackage = new RootPackage('foo/bar', '1.0.0', '1.0.0');
437
- $this->composer->setPackage($consumerPackage);
438
- $consumerPackage->setExtra(array(
439
- 'installer-paths' => array(
440
- 'my/custom/path/{$name}/' => array(
441
- 'shama/ftp',
442
- 'foo/bar',
443
- ),
444
- ),
445
- ));
446
- $result = $installer->getInstallPath($package);
447
- $this->assertEquals('my/custom/path/Ftp/', $result);
448
- }
449
-
450
- /**
451
- * testCustomInstallerName
452
- */
453
- public function testCustomInstallerName()
454
- {
455
- $installer = new Installer($this->io, $this->composer);
456
- $package = new Package('shama/cakephp-ftp-plugin', '1.0.0', '1.0.0');
457
- $package->setType('cakephp-plugin');
458
- $package->setExtra(array(
459
- 'installer-name' => 'FTP',
460
- ));
461
- $result = $installer->getInstallPath($package);
462
- $this->assertEquals('Plugin/FTP/', $result);
463
- }
464
-
465
- /**
466
- * testCustomTypePath
467
- */
468
- public function testCustomTypePath()
469
- {
470
- $installer = new Installer($this->io, $this->composer);
471
- $package = new Package('slbmeh/my_plugin', '1.0.0', '1.0.0');
472
- $package->setType('wordpress-plugin');
473
- $consumerPackage = new RootPackage('foo/bar', '1.0.0', '1.0.0');
474
- $this->composer->setPackage($consumerPackage);
475
- $consumerPackage->setExtra(array(
476
- 'installer-paths' => array(
477
- 'my/custom/path/{$name}/' => array(
478
- 'type:wordpress-plugin'
479
- ),
480
- ),
481
- ));
482
- $result = $installer->getInstallPath($package);
483
- $this->assertEquals('my/custom/path/my_plugin/', $result);
484
- }
485
-
486
- /**
487
- * testVendorPath
488
- */
489
- public function testVendorPath()
490
- {
491
- $installer = new Installer($this->io, $this->composer);
492
- $package = new Package('penyaskito/my_module', '1.0.0', '1.0.0');
493
- $package->setType('drupal-module');
494
- $consumerPackage = new RootPackage('drupal/drupal', '1.0.0', '1.0.0');
495
- $this->composer->setPackage($consumerPackage);
496
- $consumerPackage->setExtra(array(
497
- 'installer-paths' => array(
498
- 'modules/custom/{$name}/' => array(
499
- 'vendor:penyaskito'
500
- ),
501
- ),
502
- ));
503
- $result = $installer->getInstallPath($package);
504
- $this->assertEquals('modules/custom/my_module/', $result);
505
- }
506
-
507
- /**
508
- * testNoVendorName
509
- */
510
- public function testNoVendorName()
511
- {
512
- $installer = new Installer($this->io, $this->composer);
513
- $package = new Package('sfPhpunitPlugin', '1.0.0', '1.0.0');
514
-
515
- $package->setType('symfony1-plugin');
516
- $result = $installer->getInstallPath($package);
517
- $this->assertEquals('plugins/sfPhpunitPlugin/', $result);
518
- }
519
-
520
- /**
521
- * testTypo3Inflection
522
- */
523
- public function testTypo3Inflection()
524
- {
525
- $installer = new Installer($this->io, $this->composer);
526
- $package = new Package('typo3/fluid', '1.0.0', '1.0.0');
527
-
528
- $package->setAutoload(array(
529
- 'psr-0' => array(
530
- 'TYPO3\\Fluid' => 'Classes',
531
- ),
532
- ));
533
-
534
- $package->setType('typo3-flow-package');
535
- $result = $installer->getInstallPath($package);
536
- $this->assertEquals('Packages/Application/TYPO3.Fluid/', $result);
537
- }
538
-
539
- public function testUninstallAndDeletePackageFromLocalRepo()
540
- {
541
- $package = new Package('foo', '1.0.0', '1.0.0');
542
-
543
- $installer = $this->getMock('Composer\Installers\Installer', array('getInstallPath'), array($this->io, $this->composer));
544
- $installer->expects($this->atLeastOnce())->method('getInstallPath')->with($package)->will($this->returnValue(sys_get_temp_dir().'/foo'));
545
-
546
- $repo = $this->getMock('Composer\Repository\InstalledRepositoryInterface');
547
- $repo->expects($this->once())->method('hasPackage')->with($package)->will($this->returnValue(true));
548
- $repo->expects($this->once())->method('removePackage')->with($package);
549
-
550
- $installer->uninstall($repo, $package);
551
- }
552
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/tests/Composer/Installers/Test/MayaInstallerTest.php DELETED
@@ -1,62 +0,0 @@
1
- <?php
2
- namespace Composer\Installers\Test;
3
-
4
- use Composer\Installers\MayaInstaller;
5
- use Composer\Package\Package;
6
- use Composer\Composer;
7
- use PHPUnit\Framework\TestCase as BaseTestCase;
8
-
9
- class MayaInstallerTest extends BaseTestCase
10
- {
11
- /**
12
- * @var MayaInstaller
13
- */
14
- private $installer;
15
-
16
- public function setUp()
17
- {
18
- $this->installer = new MayaInstaller(
19
- new Package('NyanCat', '4.2', '4.2'),
20
- new Composer()
21
- );
22
- }
23
-
24
- /**
25
- * @dataProvider packageNameInflectionProvider
26
- */
27
- public function testInflectPackageVars($type, $name, $expected)
28
- {
29
- $this->assertEquals(
30
- array('name' => $expected, 'type' => $type),
31
- $this->installer->inflectPackageVars(array('name' => $name, 'type' => $type))
32
- );
33
- }
34
-
35
- public function packageNameInflectionProvider()
36
- {
37
- return array(
38
- // Should keep module name StudlyCase
39
- array(
40
- 'maya-module',
41
- 'user-profile',
42
- 'UserProfile'
43
- ),
44
- array(
45
- 'maya-module',
46
- 'maya-module',
47
- 'Maya'
48
- ),
49
- array(
50
- 'maya-module',
51
- 'blog',
52
- 'Blog'
53
- ),
54
- // tests that exactly one '-module' is cut off
55
- array(
56
- 'maya-module',
57
- 'some-module-module',
58
- 'SomeModule',
59
- ),
60
- );
61
- }
62
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/tests/Composer/Installers/Test/MediaWikiInstallerTest.php DELETED
@@ -1,67 +0,0 @@
1
- <?php
2
- namespace Composer\Installers\Test;
3
-
4
- use Composer\Installers\MediaWikiInstaller;
5
- use Composer\Package\Package;
6
- use Composer\Composer;
7
- use PHPUnit\Framework\TestCase as BaseTestCase;
8
-
9
- class MediaWikiInstallerTest extends BaseTestCase
10
- {
11
- /**
12
- * @var MediaWikiInstaller
13
- */
14
- private $installer;
15
-
16
- public function setUp()
17
- {
18
- $this->installer = new MediaWikiInstaller(
19
- new Package('NyanCat', '4.2', '4.2'),
20
- new Composer()
21
- );
22
- }
23
-
24
- /**
25
- * @dataProvider packageNameInflectionProvider
26
- */
27
- public function testInflectPackageVars($type, $name, $expected)
28
- {
29
- $this->assertEquals(
30
- $this->installer->inflectPackageVars(array('name' => $name, 'type'=>$type)),
31
- array('name' => $expected, 'type'=>$type)
32
- );
33
- }
34
-
35
- public function packageNameInflectionProvider()
36
- {
37
- return array(
38
- array(
39
- 'mediawiki-extension',
40
- 'sub-page-list',
41
- 'SubPageList',
42
- ),
43
- array(
44
- 'mediawiki-extension',
45
- 'sub-page-list-extension',
46
- 'SubPageList',
47
- ),
48
- array(
49
- 'mediawiki-extension',
50
- 'semantic-mediawiki',
51
- 'SemanticMediawiki',
52
- ),
53
- // tests that exactly one '-skin' is cut off, and that skins do not get ucwords treatment like extensions
54
- array(
55
- 'mediawiki-skin',
56
- 'some-skin-skin',
57
- 'some-skin',
58
- ),
59
- // tests that names without '-skin' suffix stay valid
60
- array(
61
- 'mediawiki-skin',
62
- 'someotherskin',
63
- 'someotherskin',
64
- ),
65
- );
66
- }
67
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/tests/Composer/Installers/Test/OctoberInstallerTest.php DELETED
@@ -1,67 +0,0 @@
1
- <?php
2
- namespace Composer\Installers\Test;
3
-
4
- use Composer\Installers\OctoberInstaller;
5
- use Composer\Package\Package;
6
- use Composer\Composer;
7
- use PHPUnit\Framework\TestCase as BaseTestCase;
8
-
9
- class OctoberInstallerTest extends BaseTestCase
10
- {
11
- /**
12
- * @var OctoberInstaller
13
- */
14
- private $installer;
15
-
16
- public function setUp()
17
- {
18
- $this->installer = new OctoberInstaller(
19
- new Package('NyanCat', '4.2', '4.2'),
20
- new Composer()
21
- );
22
- }
23
-
24
- /**
25
- * @dataProvider packageNameInflectionProvider
26
- */
27
- public function testInflectPackageVars($type, $name, $expected)
28
- {
29
- $this->assertEquals(
30
- $this->installer->inflectPackageVars(array('name' => $name, 'type' => $type)),
31
- array('name' => $expected, 'type' => $type)
32
- );
33
- }
34
-
35
- public function packageNameInflectionProvider()
36
- {
37
- return array(
38
- array(
39
- 'october-plugin',
40
- 'subpagelist',
41
- 'subpagelist',
42
- ),
43
- array(
44
- 'october-plugin',
45
- 'subpagelist-plugin',
46
- 'subpagelist',
47
- ),
48
- array(
49
- 'october-plugin',
50
- 'semanticoctober',
51
- 'semanticoctober',
52
- ),
53
- // tests that exactly one '-theme' is cut off
54
- array(
55
- 'october-theme',
56
- 'some-theme-theme',
57
- 'some-theme',
58
- ),
59
- // tests that names without '-theme' suffix stay valid
60
- array(
61
- 'october-theme',
62
- 'someothertheme',
63
- 'someothertheme',
64
- ),
65
- );
66
- }
67
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/tests/Composer/Installers/Test/OntoWikiInstallerTest.php DELETED
@@ -1,84 +0,0 @@
1
- <?php
2
- namespace Composer\Installers\Test;
3
-
4
- use Composer\Installers\OntoWikiInstaller;
5
- use PHPUnit\Framework\TestCase as BaseTestCase;
6
-
7
- /**
8
- * Test for the OntoWikiInstaller
9
- * code was taken from DokuWikiInstaller
10
- */
11
- class OntoWikiInstallerTest extends BaseTestCase
12
- {
13
- /**
14
- * @var OntoWikiInstaller
15
- */
16
- private $installer;
17
-
18
- public function setUp()
19
- {
20
- $this->installer = new OntoWikiInstaller();
21
- }
22
-
23
- /**
24
- * @dataProvider packageNameInflectionProvider
25
- */
26
- public function testInflectPackageVars($type, $name, $expected)
27
- {
28
- $this->assertEquals(
29
- $this->installer->inflectPackageVars(array('name' => $name, 'type'=>$type)),
30
- array('name' => $expected, 'type'=>$type)
31
- );
32
- }
33
-
34
- public function packageNameInflectionProvider()
35
- {
36
- return array(
37
- array(
38
- 'ontowiki-extension',
39
- 'CSVImport.ontowiki',
40
- 'csvimport',
41
- ),
42
- array(
43
- 'ontowiki-extension',
44
- 'csvimport',
45
- 'csvimport',
46
- ),
47
- array(
48
- 'ontowiki-extension',
49
- 'some_ontowiki_extension',
50
- 'some_ontowiki_extension',
51
- ),
52
- array(
53
- 'ontowiki-extension',
54
- 'some_ontowiki_extension.ontowiki',
55
- 'some_ontowiki_extension',
56
- ),
57
- array(
58
- 'ontowiki-translation',
59
- 'de-translation.ontowiki',
60
- 'de',
61
- ),
62
- array(
63
- 'ontowiki-translation',
64
- 'en-US-translation.ontowiki',
65
- 'en-us',
66
- ),
67
- array(
68
- 'ontowiki-translation',
69
- 'en-US-translation',
70
- 'en-us',
71
- ),
72
- array(
73
- 'ontowiki-theme',
74
- 'blue-theme.ontowiki',
75
- 'blue',
76
- ),
77
- array(
78
- 'ontowiki-theme',
79
- 'blue-theme',
80
- 'blue',
81
- ),
82
- );
83
- }
84
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/tests/Composer/Installers/Test/PimcoreInstallerTest.php DELETED
@@ -1,44 +0,0 @@
1
- <?php
2
- namespace Composer\Installers\Test;
3
-
4
- use Composer\Installers\PimcoreInstaller;
5
- use Composer\Package\Package;
6
- use Composer\Composer;
7
-
8
- class PimcoreInstallerTest extends TestCase
9
- {
10
- private $composer;
11
- private $io;
12
-
13
- /**
14
- * setUp
15
- *
16
- * @return void
17
- */
18
- public function setUp()
19
- {
20
- $this->package = new Package('CamelCased', '1.0', '1.0');
21
- $this->io = $this->getMock('Composer\IO\PackageInterface');
22
- $this->composer = new Composer();
23
- }
24
-
25
- /**
26
- * testInflectPackageVars
27
- *
28
- * @return void
29
- */
30
- public function testInflectPackageVars()
31
- {
32
- $installer = new PimcoreInstaller($this->package, $this->composer);
33
- $result = $installer->inflectPackageVars(array('name' => 'CamelCased'));
34
- $this->assertEquals($result, array('name' => 'CamelCased'));
35
-
36
- $installer = new PimcoreInstaller($this->package, $this->composer);
37
- $result = $installer->inflectPackageVars(array('name' => 'with-dash'));
38
- $this->assertEquals($result, array('name' => 'WithDash'));
39
-
40
- $installer = new PimcoreInstaller($this->package, $this->composer);
41
- $result = $installer->inflectPackageVars(array('name' => 'with_underscore'));
42
- $this->assertEquals($result, array('name' => 'WithUnderscore'));
43
- }
44
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/tests/Composer/Installers/Test/PiwikInstallerTest.php DELETED
@@ -1,63 +0,0 @@
1
- <?php
2
- namespace Composer\Installers\Test;
3
-
4
- use Composer\Composer;
5
- use Composer\Installers\PiwikInstaller;
6
- use Composer\Package\Package;
7
- use Composer\Package\PackageInterface;
8
-
9
- /**
10
- * Class PiwikInstallerTest
11
- *
12
- * @package Composer\Installers\Test
13
- */
14
- class PiwikInstallerTest extends TestCase
15
- {
16
- /**
17
- * @varComposer
18
- */
19
- private $composer;
20
-
21
- /**
22
- * @var PackageInterface
23
- */
24
- private $io;
25
-
26
- /**
27
- * @var Package
28
- */
29
- private $package;
30
-
31
- /**
32
- * setUp
33
- *
34
- * @return void
35
- */
36
- public function setUp()
37
- {
38
- $this->package = new Package('VisitSummary', '1.0', '1.0');
39
- $this->io = $this->getMock('Composer\IO\PackageInterface');
40
- $this->composer = new Composer();
41
- }
42
-
43
- /**
44
- * testInflectPackageVars
45
- *
46
- * @return void
47
- */
48
- public function testInflectPackageVars()
49
- {
50
- $installer = new PiwikInstaller($this->package, $this->composer);
51
- $result = $installer->inflectPackageVars(array('name' => 'VisitSummary'));
52
- $this->assertEquals($result, array('name' => 'VisitSummary'));
53
-
54
- $installer = new PiwikInstaller($this->package, $this->composer);
55
- $result = $installer->inflectPackageVars(array('name' => 'visit-summary'));
56
- $this->assertEquals($result, array('name' => 'VisitSummary'));
57
-
58
- $installer = new PiwikInstaller($this->package, $this->composer);
59
- $result = $installer->inflectPackageVars(array('name' => 'visit_summary'));
60
- $this->assertEquals($result, array('name' => 'VisitSummary'));
61
- }
62
-
63
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/tests/Composer/Installers/Test/SiteDirectInstallerTest.php DELETED
@@ -1,120 +0,0 @@
1
- <?php
2
-
3
- namespace Composer\Installers\Test;
4
-
5
- use Composer\Composer;
6
- use Composer\Installers\SiteDirectInstaller;
7
- use Composer\Package\Package;
8
-
9
- class SiteDirectInstallerTest extends TestCase
10
- {
11
- /** @var SiteDirectInstaller $installer */
12
- protected $installer;
13
-
14
- /** @var Package */
15
- private $package;
16
-
17
- public function SetUp()
18
- {
19
- $this->package = new Package('sitedirect/some_name', '1.0.9', '1.0');
20
- $this->installer = new SiteDirectInstaller(
21
- $this->package,
22
- new Composer()
23
- );
24
-
25
- }
26
-
27
- /**
28
- * @dataProvider dataProvider
29
- */
30
- public function testInflectPackageVars($data, $expected)
31
- {
32
- $result = $this->installer->inflectPackageVars($data);
33
- $this->assertEquals($result, $expected);
34
- }
35
-
36
- /**
37
- * @dataProvider dataProvider
38
- */
39
- public function testInstallPath($data, $expected)
40
- {
41
- $result = $this->installer->inflectPackageVars($data);
42
- $path = $this->createPackage($data);
43
-
44
- // use $result to get the proper capitalization for the vendor path
45
- $expectedPath = "modules/{$result['vendor']}/{$result['name']}/";
46
- $notExpectedPath = "modules/{$data['vendor']}/{$data['name']}/";
47
- $this->assertEquals($expectedPath, $path);
48
- $this->assertNotEquals($notExpectedPath, $path);
49
- }
50
-
51
- /**
52
- * @param $data
53
- * @return string
54
- */
55
- private function createPackage($data)
56
- {
57
- $fullName = "{$data['vendor']}/{$data['name']}";
58
-
59
- $package = new Package($fullName, '1.0', '1.0');
60
- $package->setType('sitedirect-module');
61
- $installer = new SiteDirectInstaller($package, new Composer());
62
-
63
- $path = $installer->getInstallPath($package, 'sitedirect');
64
- return $path;
65
- }
66
-
67
- public function dataProvider()
68
- {
69
- return array(
70
- array(
71
- 'data' => array(
72
- 'name' => 'kernel',
73
- 'vendor' => 'sitedirect',
74
- 'type' => 'sitedirect-module',
75
- ),
76
- 'expected' => array(
77
- 'name' => 'Kernel',
78
- 'vendor' => 'SiteDirect',
79
- 'type' => 'sitedirect-module',
80
- )
81
- ),
82
- array(
83
- 'data' => array(
84
- 'name' => 'that_guy',
85
- 'vendor' => 'whatGuy',
86
- 'type' => 'sitedirect-module',
87
- ),
88
- 'expected' => array(
89
- 'name' => 'ThatGuy',
90
- 'vendor' => 'whatGuy',
91
- 'type' => 'sitedirect-module',
92
- )
93
- ),
94
- array(
95
- 'data' => array(
96
- 'name' => 'checkout',
97
- 'vendor' => 'someVendor',
98
- 'type' => 'sitedirect-plugin',
99
- ),
100
- 'expected' => array(
101
- 'name' => 'Checkout',
102
- 'vendor' => 'someVendor',
103
- 'type' => 'sitedirect-plugin',
104
- )
105
- ),
106
- array(
107
- 'data' => array(
108
- 'name' => 'checkout',
109
- 'vendor' => 'siteDirect',
110
- 'type' => 'sitedirect-plugin',
111
- ),
112
- 'expected' => array(
113
- 'name' => 'Checkout',
114
- 'vendor' => 'SiteDirect',
115
- 'type' => 'sitedirect-plugin',
116
- )
117
- ),
118
- );
119
- }
120
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/tests/Composer/Installers/Test/SyDESInstallerTest.php DELETED
@@ -1,82 +0,0 @@
1
- <?php
2
- namespace Composer\Installers\Test;
3
-
4
- use Composer\Installers\SyDESInstaller;
5
- use Composer\Package\Package;
6
- use Composer\Composer;
7
- use PHPUnit\Framework\TestCase as BaseTestCase;
8
-
9
- class SyDESInstallerTest extends BaseTestCase
10
- {
11
- /**
12
- * @var SyDESInstaller
13
- */
14
- private $installer;
15
-
16
- public function setUp()
17
- {
18
- $this->installer = new SyDESInstaller(
19
- new Package('NyanCat', '4.2', '4.2'),
20
- new Composer()
21
- );
22
- }
23
-
24
- /**
25
- * @dataProvider packageNameInflectionProvider
26
- */
27
- public function testInflectPackageVars($type, $name, $expected)
28
- {
29
- $this->assertEquals(
30
- array('name' => $expected, 'type' => $type),
31
- $this->installer->inflectPackageVars(array('name' => $name, 'type' => $type))
32
- );
33
- }
34
-
35
- public function packageNameInflectionProvider()
36
- {
37
- return array(
38
- // modules
39
- array(
40
- 'sydes-module',
41
- 'name',
42
- 'Name'
43
- ),
44
- array(
45
- 'sydes-module',
46
- 'sample-name',
47
- 'SampleName'
48
- ),
49
- array(
50
- 'sydes-module',
51
- 'sydes-name',
52
- 'Name'
53
- ),
54
- array(
55
- 'sydes-module',
56
- 'sample-name-module',
57
- 'SampleName',
58
- ),
59
- array(
60
- 'sydes-module',
61
- 'sydes-sample-name-module',
62
- 'SampleName'
63
- ),
64
- // themes
65
- array(
66
- 'sydes-theme',
67
- 'some-theme-theme',
68
- 'some-theme',
69
- ),
70
- array(
71
- 'sydes-theme',
72
- 'sydes-sometheme',
73
- 'sometheme',
74
- ),
75
- array(
76
- 'sydes-theme',
77
- 'Sample-Name',
78
- 'sample-name'
79
- ),
80
- );
81
- }
82
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/tests/Composer/Installers/Test/TestCase.php DELETED
@@ -1,65 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of Composer.
5
- *
6
- * (c) Nils Adermann <naderman@naderman.de>
7
- * Jordi Boggiano <j.boggiano@seld.be>
8
- *
9
- * For the full copyright and license information, please view the LICENSE
10
- * file that was distributed with this source code.
11
- */
12
-
13
- namespace Composer\Installers\Test;
14
-
15
- use Composer\Package\Version\VersionParser;
16
- use Composer\Package\Package;
17
- use Composer\Package\AliasPackage;
18
- use Composer\Package\LinkConstraint\VersionConstraint;
19
- use Composer\Util\Filesystem;
20
- use PHPUnit\Framework\TestCase as BaseTestCase;
21
-
22
- abstract class TestCase extends BaseTestCase
23
- {
24
- private static $parser;
25
-
26
- protected static function getVersionParser()
27
- {
28
- if (!self::$parser) {
29
- self::$parser = new VersionParser();
30
- }
31
-
32
- return self::$parser;
33
- }
34
-
35
- protected function getVersionConstraint($operator, $version)
36
- {
37
- return new VersionConstraint(
38
- $operator,
39
- self::getVersionParser()->normalize($version)
40
- );
41
- }
42
-
43
- protected function getPackage($name, $version)
44
- {
45
- $normVersion = self::getVersionParser()->normalize($version);
46
-
47
- return new Package($name, $normVersion, $version);
48
- }
49
-
50
- protected function getAliasPackage($package, $version)
51
- {
52
- $normVersion = self::getVersionParser()->normalize($version);
53
-
54
- return new AliasPackage($package, $normVersion, $version);
55
- }
56
-
57
- protected function ensureDirectoryExistsAndClear($directory)
58
- {
59
- $fs = new Filesystem();
60
- if (is_dir($directory)) {
61
- $fs->removeDirectory($directory);
62
- }
63
- mkdir($directory, 0777, true);
64
- }
65
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/tests/Composer/Installers/Test/VgmcpInstallerTest.php DELETED
@@ -1,80 +0,0 @@
1
- <?php
2
- namespace Composer\Installers\Test;
3
-
4
- use Composer\Installers\VgmcpInstaller;
5
- use Composer\Package\Package;
6
- use Composer\Composer;
7
- use PHPUnit\Framework\TestCase as BaseTestCase;
8
-
9
- class VgmcpInstallerTest extends BaseTestCase
10
- {
11
- /**
12
- * @var VgmcpInstaller
13
- */
14
- private $installer;
15
-
16
- public function setUp()
17
- {
18
- $this->installer = new VgmcpInstaller(
19
- new Package('NyanCat', '4.2', '4.2'),
20
- new Composer()
21
- );
22
- }
23
-
24
- /**
25
- * @dataProvider packageNameInflectionProvider
26
- */
27
- public function testInflectPackageVars($type, $name, $expected)
28
- {
29
- $this->assertEquals(
30
- array('name' => $expected, 'type' => $type),
31
- $this->installer->inflectPackageVars(array('name' => $name, 'type' => $type))
32
- );
33
- }
34
-
35
- public function packageNameInflectionProvider()
36
- {
37
- return array(
38
- // Should keep bundle name StudlyCase
39
- array(
40
- 'vgmcp-bundle',
41
- 'user-profile',
42
- 'UserProfile'
43
- ),
44
- array(
45
- 'vgmcp-bundle',
46
- 'vgmcp-bundle',
47
- 'Vgmcp'
48
- ),
49
- array(
50
- 'vgmcp-bundle',
51
- 'blog',
52
- 'Blog'
53
- ),
54
- // tests that exactly one '-bundle' is cut off
55
- array(
56
- 'vgmcp-bundle',
57
- 'some-bundle-bundle',
58
- 'SomeBundle',
59
- ),
60
- // tests that exactly one '-theme' is cut off
61
- array(
62
- 'vgmcp-theme',
63
- 'some-theme-theme',
64
- 'SomeTheme',
65
- ),
66
- // tests that names without '-theme' suffix stay valid
67
- array(
68
- 'vgmcp-theme',
69
- 'someothertheme',
70
- 'Someothertheme',
71
- ),
72
- // Should keep theme name StudlyCase
73
- array(
74
- 'vgmcp-theme',
75
- 'adminlte-advanced',
76
- 'AdminlteAdvanced'
77
- ),
78
- );
79
- }
80
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/tests/Composer/Installers/Test/YawikInstallerTest.php DELETED
@@ -1,64 +0,0 @@
1
- <?php
2
- namespace Composer\Installers\Test;
3
-
4
- use Composer\Composer;
5
- use Composer\Installers\YawikInstaller;
6
- use Composer\Package\Package;
7
- use Composer\Package\PackageInterface;
8
-
9
- /**
10
- * Class YawikInstallerTest
11
- *
12
- * @package Composer\Installers\Test
13
- */
14
- class YawikInstallerTest extends TestCase
15
- {
16
- /**
17
- * @varComposer
18
- */
19
- private $composer;
20
-
21
- /**
22
- * @var PackageInterface
23
- */
24
- private $io;
25
-
26
- /**
27
- * @var Package
28
- */
29
- private $package;
30
-
31
- /**
32
- * setUp
33
- *
34
- * @return void
35
- */
36
- public function setUp()
37
- {
38
- $this->package = new Package('YawikCompanyRegistration', '1.0', '1.0');
39
- $this->io = $this->getMock('Composer\IO\PackageInterface');
40
- $this->composer = new Composer();
41
- }
42
-
43
- /**
44
- * testInflectPackageVars
45
- *
46
- * @dataProvider packageNameProvider
47
- * @return void
48
- */
49
- public function testInflectPackageVars($input)
50
- {
51
- $installer = new YawikInstaller($this->package, $this->composer);
52
- $result = $installer->inflectPackageVars(array('name' => $input));
53
- $this->assertEquals($result, array('name' => 'YawikCompanyRegistration'));
54
- }
55
-
56
- public function packageNameProvider()
57
- {
58
- return array(
59
- array('yawik-company-registration'),
60
- array('yawik_company_registration'),
61
- array('YawikCompanyRegistration')
62
- );
63
- }
64
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/installers/tests/bootstrap.php DELETED
@@ -1,4 +0,0 @@
1
- <?php
2
-
3
- $loader = require __DIR__ . '/../src/bootstrap.php';
4
- $loader->add('Composer\Installers\Test', __DIR__);
 
 
 
 
vendor/composer/platform_check.php DELETED
@@ -1,26 +0,0 @@
1
- <?php
2
-
3
- // platform_check.php @generated by Composer
4
-
5
- $issues = array();
6
-
7
- if (!(PHP_VERSION_ID >= 50600)) {
8
- $issues[] = 'Your Composer dependencies require a PHP version ">= 5.6.0". You are running ' . PHP_VERSION . '.';
9
- }
10
-
11
- if ($issues) {
12
- if (!headers_sent()) {
13
- header('HTTP/1.1 500 Internal Server Error');
14
- }
15
- if (!ini_get('display_errors')) {
16
- if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
17
- fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
18
- } elseif (!headers_sent()) {
19
- echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
20
- }
21
- }
22
- trigger_error(
23
- 'Composer detected issues in your platform: ' . implode(' ', $issues),
24
- E_USER_ERROR
25
- );
26
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wp-dependencies.json DELETED
@@ -1,10 +0,0 @@
1
- [
2
- {
3
- "name": "Classic Editor",
4
- "host": "wordpress",
5
- "slug": "classic-editor/classic-editor.php",
6
- "uri": "https://wordpress.org/plugins/classic-editor/",
7
- "branch": "trunk",
8
- "optional": false
9
- }
10
- ]