Facebook for WooCommerce - Version 2.6.27

Version Description

  • 2022-10-14 =
  • Fix - Revert "Switch to Jetpack autoloader. (#1996 PR refresh)".
Download this release

Release Info

Developer automattic
Plugin Icon Facebook for WooCommerce
Version 2.6.27
Comparing to
See all releases

Code changes from version 2.6.26 to 2.6.27

Files changed (55) hide show
  1. changelog.txt +3 -0
  2. class-wc-facebookcommerce.php +1 -1
  3. facebook-for-woocommerce.php +2 -2
  4. i18n/languages/facebook-for-woocommerce.pot +2 -2
  5. readme.txt +4 -1
  6. vendor/autoload.php +1 -1
  7. vendor/autoload_packages.php +0 -13
  8. vendor/automattic/jetpack-autoloader/.gitignore +0 -1
  9. vendor/automattic/jetpack-autoloader/CHANGELOG.md +0 -330
  10. vendor/automattic/jetpack-autoloader/LICENSE.txt +0 -357
  11. vendor/automattic/jetpack-autoloader/README.md +0 -75
  12. vendor/automattic/jetpack-autoloader/SECURITY.md +0 -38
  13. vendor/automattic/jetpack-autoloader/composer.json +0 -46
  14. vendor/automattic/jetpack-autoloader/src/AutoloadFileWriter.php +0 -105
  15. vendor/automattic/jetpack-autoloader/src/AutoloadGenerator.php +0 -393
  16. vendor/automattic/jetpack-autoloader/src/AutoloadProcessor.php +0 -180
  17. vendor/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php +0 -198
  18. vendor/automattic/jetpack-autoloader/src/ManifestGenerator.php +0 -121
  19. vendor/automattic/jetpack-autoloader/src/autoload.php +0 -5
  20. vendor/automattic/jetpack-autoloader/src/class-autoloader-handler.php +0 -139
  21. vendor/automattic/jetpack-autoloader/src/class-autoloader-locator.php +0 -82
  22. vendor/automattic/jetpack-autoloader/src/class-autoloader.php +0 -82
  23. vendor/automattic/jetpack-autoloader/src/class-container.php +0 -142
  24. vendor/automattic/jetpack-autoloader/src/class-hook-manager.php +0 -68
  25. vendor/automattic/jetpack-autoloader/src/class-latest-autoloader-guard.php +0 -78
  26. vendor/automattic/jetpack-autoloader/src/class-manifest-reader.php +0 -91
  27. vendor/automattic/jetpack-autoloader/src/class-path-processor.php +0 -186
  28. vendor/automattic/jetpack-autoloader/src/class-php-autoloader.php +0 -85
  29. vendor/automattic/jetpack-autoloader/src/class-plugin-locator.php +0 -148
  30. vendor/automattic/jetpack-autoloader/src/class-plugins-handler.php +0 -156
  31. vendor/automattic/jetpack-autoloader/src/class-shutdown-handler.php +0 -84
  32. vendor/automattic/jetpack-autoloader/src/class-version-loader.php +0 -156
  33. vendor/automattic/jetpack-autoloader/src/class-version-selector.php +0 -61
  34. vendor/composer/InstalledVersions.php +7 -7
  35. vendor/composer/autoload_classmap.php +0 -5
  36. vendor/composer/autoload_psr4.php +0 -1
  37. vendor/composer/autoload_real.php +4 -4
  38. vendor/composer/autoload_static.php +4 -14
  39. vendor/composer/installed.json +0 -54
  40. vendor/composer/installed.php +10 -19
  41. vendor/composer/jetpack_autoload_classmap.php +0 -933
  42. vendor/jetpack-autoloader/class-autoloader-handler.php +0 -147
  43. vendor/jetpack-autoloader/class-autoloader-locator.php +0 -90
  44. vendor/jetpack-autoloader/class-autoloader.php +0 -90
  45. vendor/jetpack-autoloader/class-container.php +0 -150
  46. vendor/jetpack-autoloader/class-hook-manager.php +0 -76
  47. vendor/jetpack-autoloader/class-latest-autoloader-guard.php +0 -86
  48. vendor/jetpack-autoloader/class-manifest-reader.php +0 -99
  49. vendor/jetpack-autoloader/class-path-processor.php +0 -194
  50. vendor/jetpack-autoloader/class-php-autoloader.php +0 -93
  51. vendor/jetpack-autoloader/class-plugin-locator.php +0 -156
  52. vendor/jetpack-autoloader/class-plugins-handler.php +0 -164
  53. vendor/jetpack-autoloader/class-shutdown-handler.php +0 -92
  54. vendor/jetpack-autoloader/class-version-loader.php +0 -164
  55. vendor/jetpack-autoloader/class-version-selector.php +0 -69
changelog.txt CHANGED
@@ -1,5 +1,8 @@
1
  *** Facebook for WooCommerce Changelog ***
2
 
 
 
 
3
  = 2.6.26 - 2022-10-13 =
4
  * Add - wc_facebook_should_sync_product filter.
5
  * Dev - Rename JobRegistry to JobManager.
1
  *** Facebook for WooCommerce Changelog ***
2
 
3
+ = 2.6.27 - 2022-10-14 =
4
+ * Fix - Revert "Switch to Jetpack autoloader. (#1996 PR refresh)".
5
+
6
  = 2.6.26 - 2022-10-13 =
7
  * Add - wc_facebook_should_sync_product filter.
8
  * Dev - Rename JobRegistry to JobManager.
class-wc-facebookcommerce.php CHANGED
@@ -143,7 +143,7 @@ if ( ! class_exists( 'WC_Facebookcommerce' ) ) :
143
  );
144
 
145
  if ( \WC_Facebookcommerce_Utils::isWoocommerceIntegration() ) {
146
- require_once __DIR__ . '/vendor/autoload_packages.php';
147
 
148
  include_once 'facebook-commerce.php';
149
 
143
  );
144
 
145
  if ( \WC_Facebookcommerce_Utils::isWoocommerceIntegration() ) {
146
+ require_once __DIR__ . '/vendor/autoload.php';
147
 
148
  include_once 'facebook-commerce.php';
149
 
facebook-for-woocommerce.php CHANGED
@@ -11,7 +11,7 @@
11
  * Description: Grow your business on Facebook! Use this official plugin to help sell more of your products using Facebook. After completing the setup, you'll be ready to create ads that promote your products and you can also create a shop section on your Page where customers can browse your products on Facebook.
12
  * Author: Facebook
13
  * Author URI: https://www.facebook.com/
14
- * Version: 2.6.26
15
  * Text Domain: facebook-for-woocommerce
16
  * Tested up to: 6.0
17
  * WC requires at least: 3.5.0
@@ -33,7 +33,7 @@ class WC_Facebook_Loader {
33
  /**
34
  * @var string the plugin version. This must be in the main plugin file to be automatically bumped by Woorelease.
35
  */
36
- const PLUGIN_VERSION = '2.6.26'; // WRCS: DEFINED_VERSION.
37
 
38
  // Minimum PHP version required by this plugin.
39
  const MINIMUM_PHP_VERSION = '7.0.0';
11
  * Description: Grow your business on Facebook! Use this official plugin to help sell more of your products using Facebook. After completing the setup, you'll be ready to create ads that promote your products and you can also create a shop section on your Page where customers can browse your products on Facebook.
12
  * Author: Facebook
13
  * Author URI: https://www.facebook.com/
14
+ * Version: 2.6.27
15
  * Text Domain: facebook-for-woocommerce
16
  * Tested up to: 6.0
17
  * WC requires at least: 3.5.0
33
  /**
34
  * @var string the plugin version. This must be in the main plugin file to be automatically bumped by Woorelease.
35
  */
36
+ const PLUGIN_VERSION = '2.6.27'; // WRCS: DEFINED_VERSION.
37
 
38
  // Minimum PHP version required by this plugin.
39
  const MINIMUM_PHP_VERSION = '7.0.0';
i18n/languages/facebook-for-woocommerce.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the same license as the Facebook for WooCommerce plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WooCommerce 2.6.26\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/facebook-for-woocommerce\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2022-10-13T16:52:36-04:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.5.0\n"
15
  "X-Domain: facebook-for-woocommerce\n"
2
  # This file is distributed under the same license as the Facebook for WooCommerce plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WooCommerce 2.6.27\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/facebook-for-woocommerce\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2022-10-14T10:07:32+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.5.0\n"
15
  "X-Domain: facebook-for-woocommerce\n"
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: facebook, automattic, woothemes
3
  Tags: facebook, shop, catalog, advertise, pixel, product
4
  Requires at least: 4.4
5
  Tested up to: 6.0
6
- Stable tag: 2.6.26
7
  Requires PHP: 5.6 or greater
8
  MySQL: 5.6 or greater
9
  License: GPLv2 or later
@@ -39,6 +39,9 @@ When opening a bug on GitHub, please give us as many details as possible.
39
 
40
  == Changelog ==
41
 
 
 
 
42
  = 2.6.26 - 2022-10-13 =
43
  * Add - wc_facebook_should_sync_product filter.
44
  * Dev - Rename JobRegistry to JobManager.
3
  Tags: facebook, shop, catalog, advertise, pixel, product
4
  Requires at least: 4.4
5
  Tested up to: 6.0
6
+ Stable tag: 2.6.27
7
  Requires PHP: 5.6 or greater
8
  MySQL: 5.6 or greater
9
  License: GPLv2 or later
39
 
40
  == Changelog ==
41
 
42
+ = 2.6.27 - 2022-10-14 =
43
+ * Fix - Revert "Switch to Jetpack autoloader. (#1996 PR refresh)".
44
+
45
  = 2.6.26 - 2022-10-13 =
46
  * Add - wc_facebook_should_sync_product filter.
47
  * Dev - Rename JobRegistry to JobManager.
vendor/autoload.php CHANGED
@@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
9
 
10
  require_once __DIR__ . '/composer/autoload_real.php';
11
 
12
- return ComposerAutoloaderInit7a4ce98532f7554f89341184a808a021::getLoader();
9
 
10
  require_once __DIR__ . '/composer/autoload_real.php';
11
 
12
+ return ComposerAutoloaderInitf1679011dcec7e6e85162030bf6d35f9::getLoader();
vendor/autoload_packages.php DELETED
@@ -1,13 +0,0 @@
1
- <?php
2
- /**
3
- * This file was automatically generated by automattic/jetpack-autoloader.
4
- *
5
- * @package automattic/jetpack-autoloader
6
- */
7
-
8
- namespace Automattic\Jetpack\Autoloader\jp7a4ce98532f7554f89341184a808a021;
9
-
10
- // phpcs:ignore
11
-
12
- require_once __DIR__ . '/jetpack-autoloader/class-autoloader.php';
13
- Autoloader::init();
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/automattic/jetpack-autoloader/.gitignore DELETED
@@ -1 +0,0 @@
1
- tests/php/tmp
 
vendor/automattic/jetpack-autoloader/CHANGELOG.md DELETED
@@ -1,330 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [2.11.10] - 2022-10-05
9
- - Tests: Clear `COMPOSER_AUTH` environment variable when running Composer for tests. [#26404]
10
-
11
- ## [2.11.9] - 2022-09-27
12
- ### Fixed
13
- - Tests: Clear `COMPOSER_AUTH` environment variable when running Composer for tests. [#26404]
14
-
15
- ## [2.11.8] - 2022-09-20
16
- ### Fixed
17
- - Tests: skip test if it requires a version of Composer not compatible with the running version of PHP. [#26143]
18
-
19
- ## [2.11.7] - 2022-07-26
20
- ### Changed
21
- - Updated package dependencies. [#25158]
22
-
23
- ## [2.11.6] - 2022-06-21
24
- ### Changed
25
- - Renaming `master` to `trunk`.
26
-
27
- ## [2.11.5] - 2022-05-18
28
- ### Fixed
29
- - Fix new PHPCS sniffs. [#24366]
30
-
31
- ## [2.11.4] - 2022-04-26
32
- ### Changed
33
- - Updated package dependencies.
34
-
35
- ## [2.11.3] - 2022-04-19
36
- ### Changed
37
- - PHPCS: Fix `WordPress.Security.ValidatedSanitizedInput`
38
-
39
- ## [2.11.2] - 2022-03-29
40
- ### Changed
41
- - Microperformance: Use === null instead of is_null
42
-
43
- ## [2.11.1] - 2022-03-08
44
- ### Removed
45
- - Removed the Upgrade Handler.
46
-
47
- ## [2.11.0] - 2022-03-08
48
- ### Added
49
- - On plugin update, pre-load all (non-PSR-4) classes from the plugin to avoid mid-upgrade fatals.
50
-
51
- ## [2.10.13] - 2022-03-01
52
- ### Fixed
53
- - Fix tests for upstream phpunit change.
54
-
55
- ## [2.10.12] - 2022-01-25
56
- ### Changed
57
- - Updated package dependencies.
58
-
59
- ## [2.10.11] - 2022-01-04
60
- ### Changed
61
- - Switch to pcov for code coverage.
62
- - Updated package dependencies
63
-
64
- ## [2.10.10] - 2021-11-16
65
- ### Added
66
- - Soft return if autoloader chain is not available.
67
-
68
- ## [2.10.9] - 2021-11-02
69
- ### Changed
70
- - Set `convertDeprecationsToExceptions` true in PHPUnit config.
71
-
72
- ## [2.10.8] - 2021-10-13
73
- ### Changed
74
- - Updated package dependencies.
75
-
76
- ## [2.10.7] - 2021-10-07
77
- ### Changed
78
- - Updated package dependencies
79
-
80
- ## [2.10.6] - 2021-09-28
81
- ### Changed
82
- - Updated package dependencies.
83
-
84
- ## [2.10.5] - 2021-08-31
85
- ### Changed
86
- - Run composer update on test-php command instead of phpunit
87
- - Tests: update PHPUnit polyfills dependency (yoast/phpunit-polyfills).
88
-
89
- ## [2.10.4] - 2021-08-10
90
- ### Changed
91
- - Updated package dependencies.
92
-
93
- ## [2.10.3] - 2021-05-25
94
- ### Changed
95
- - Updated package dependencies.
96
-
97
- ## [2.10.2] - 2021-04-27
98
- ### Changed
99
- - Updated package dependencies.
100
-
101
- ## [2.10.1] - 2021-03-30
102
- ### Added
103
- - Composer alias for dev-master, to improve dependencies
104
- - Tests: Added code coverage transformation
105
-
106
- ### Changed
107
- - Update package dependencies.
108
-
109
- ### Fixed
110
- - Fix coverage test
111
- - Fix uninstallation fatal
112
- - Update tests for changed composer 2.0.9 hash.
113
- - Use `composer update` rather than `install` in scripts, as composer.lock isn't checked in.
114
-
115
- ## [2.10.0] - 2021-02-09
116
-
117
- - Autoloader: test suite refactor
118
-
119
- ## [2.9.1] - 2021-02-05
120
-
121
- - CI: Make tests more generic
122
- - Autoloader: stricter type-checking on WP functions
123
- - Autoloader: prevent transitive plugin execution
124
-
125
- ## [2.9.0] - 2021-01-25
126
-
127
- - Autoloader: revised latest autoloader inclusion semantics
128
- - Add mirror-repo information to all current composer packages
129
- - Monorepo: Reorganize all projects
130
- - Autoloader: Don't cache deactivating plugins
131
-
132
- ## [2.8.0] - 2020-12-18
133
-
134
- ## [2.7.1] - 2020-12-18
135
-
136
- - Autoloader: Added realpath resolution to plugin paths
137
-
138
- ## [2.7.0] - 2020-12-08
139
-
140
- - Autoloader: Preemptively load unknown plugins from cache
141
- - Removed unwanted dot
142
- - Pin dependencies
143
- - Packages: Update for PHP 8 testing
144
-
145
- ## [2.6.0] - 2020-11-19
146
-
147
- - Autoloader: AutoloadGenerator no longer extends Composer's AutoloadGenerator class
148
- - Autoloader: Reuse an existing autoloader suffix if available
149
- - Updated PHPCS: Packages and Debugger
150
-
151
- ## [2.5.0] - 2020-10-08
152
-
153
- - Autoloader: remove the defined('JETPACK_AUTOLOAD_DEV') checks from the tests
154
-
155
- ## [2.4.0] - 2020-09-28
156
-
157
- - Autoloader: remove the plugins_loaded bullet point from the README
158
- - Packages: avoid PHPCS warnings
159
- - Autoloader: add PSR-0 support
160
- - Autoloader: Detect filtering of active_plugins
161
- - Autoloader: Support unoptimized PSR-4
162
-
163
- ## [2.3.0] - 2020-08-21
164
-
165
- - Autoloader: remove the plugin update hook
166
-
167
- ## [2.2.0] - 2020-08-14
168
-
169
- - Autoloader: don't reset the autoloader version during plugin update
170
- - CI: Try collect js coverage
171
-
172
- ## [2.1.0] - 2020-07-27
173
-
174
- - Autoloader: convert '\' directory separators to '/' in plugin paths
175
- - Autoloader: Avoid a PHP warning when an empty string is passed to `is_directory_plugin()`.
176
- - Autoloader: Tests: Use a string with define
177
-
178
- ## [2.0.2] - 2020-07-09
179
-
180
- - Autoloader: Avoid a PHP warning when an empty string is passed to `is_directory_plugin()`.
181
-
182
- ## [2.0.1] - 2020-07-02
183
-
184
- - Autoloader: Tests: Use a string with define
185
-
186
- ## [2.0.0] - 2020-06-29
187
-
188
- ## [2.0.0-beta] - 2020-06-29
189
-
190
- - Autoloader: Support Composer v2.0
191
- - Autoloader: use paths to identify plugins instead of the directories
192
- - Autoloader: fix the fatal that occurs during plugin update
193
- - Autoloader: add fallback check for plugin path in mu-plugins
194
- - Autoloader: use JETPACK__PLUGIN_DIR when looking for the jetpack plugin directory.
195
- - Feature Branch: Update the Autoloader
196
- - PHPCS: Clean up the packages
197
- - PHPCS Updates after WPCS 2.3
198
-
199
- ## [1.7.0] - 2020-04-23
200
-
201
- - Jetpack: Move comment notification override back to the constructor
202
-
203
- ## [1.6.0] - 2020-03-26
204
-
205
- - Autoloader: Remove file check to improve performance.
206
-
207
- ## [1.5.0] - 2020-02-25
208
-
209
- - Jetpack: instantiate manager object if it's null
210
-
211
- ## [1.4.1] - 2020-02-14
212
-
213
- - Autoloader: Load only latest version of autoload files to avoid conflicts.
214
-
215
- ## [1.4.0] - 2020-01-23
216
-
217
- - Autoloader: Remove the ignored classes
218
-
219
- ## [1.3.8] - 2020-01-14
220
-
221
- - Trying to add deterministic initialization.
222
- - Autoloader: Remove Manager_Interface and Plugin\Tracking from ignored list
223
- - Autoloader: Remove Jetpack_IXR_Client from ignore list
224
-
225
- ## [1.3.7] - 2019-12-10
226
-
227
- ## [1.3.6] - 2019-12-09
228
-
229
- - Autoloader: Use long-form sytax for array
230
-
231
- ## [1.3.5] - 2019-11-26
232
-
233
- - Fix/php notice status
234
-
235
- ## [1.3.4] - 2019-11-08
236
-
237
- - Deprecate Jetpack::is_development_mode() in favor of the packaged Status()-&gt;is_development_mode()
238
-
239
- ## [1.3.3] - 2019-10-28
240
-
241
- - Packages: Add gitattributes files to all packages that need th…
242
-
243
- ## [1.3.2] - 2019-09-24
244
-
245
- - Autoloader: Cover scenarios where composer/autoload_files.php…
246
-
247
- ## [1.3.1] - 2019-09-20
248
-
249
- - Docs: Unify usage of @package phpdoc tags
250
-
251
- ## [1.3.0] - 2019-09-14
252
-
253
- - Fix for empty namespaces. #13459
254
- - Connection: Move the Jetpack IXR client to the package
255
- - Adds full connection cycle capability to the Connection package.
256
- - Jetpack 7.5: Back compatibility package
257
-
258
- ## [1.2.0] - 2019-06-24
259
-
260
- - Jetpack DNA: Add full classmap support to Autoloader
261
- - Move Jetpack_Sync_Main from legacy to PSR-4
262
-
263
- ## [1.1.0] - 2019-06-19
264
-
265
- - Packages: Move autoloader tests to the package
266
- - DNA: Move Jetpack Usage tracking to its own file
267
- - Jetpack DNA: More isolation of Tracks Package
268
- - Autoloader: Ignore XMLRPC_Connector if called too early
269
- - Autoloader: Ignore Jetpack_Signature if called too early
270
-
271
- ## 1.0.0 - 2019-06-11
272
-
273
- - Add Custom Autoloader
274
-
275
- [2.11.10]: https://github.com/Automattic/jetpack-autoloader/compare/v2.11.9...v2.11.10
276
- [2.11.9]: https://github.com/Automattic/jetpack-autoloader/compare/v2.11.8...v2.11.9
277
- [2.11.8]: https://github.com/Automattic/jetpack-autoloader/compare/v2.11.7...v2.11.8
278
- [2.11.7]: https://github.com/Automattic/jetpack-autoloader/compare/v2.11.6...v2.11.7
279
- [2.11.6]: https://github.com/Automattic/jetpack-autoloader/compare/v2.11.5...v2.11.6
280
- [2.11.5]: https://github.com/Automattic/jetpack-autoloader/compare/v2.11.4...v2.11.5
281
- [2.11.4]: https://github.com/Automattic/jetpack-autoloader/compare/v2.11.3...v2.11.4
282
- [2.11.3]: https://github.com/Automattic/jetpack-autoloader/compare/v2.11.2...v2.11.3
283
- [2.11.2]: https://github.com/Automattic/jetpack-autoloader/compare/v2.11.1...v2.11.2
284
- [2.11.1]: https://github.com/Automattic/jetpack-autoloader/compare/v2.11.0...v2.11.1
285
- [2.11.0]: https://github.com/Automattic/jetpack-autoloader/compare/v2.10.13...v2.11.0
286
- [2.10.13]: https://github.com/Automattic/jetpack-autoloader/compare/v2.10.12...v2.10.13
287
- [2.10.12]: https://github.com/Automattic/jetpack-autoloader/compare/v2.10.11...v2.10.12
288
- [2.10.11]: https://github.com/Automattic/jetpack-autoloader/compare/v2.10.10...v2.10.11
289
- [2.10.10]: https://github.com/Automattic/jetpack-autoloader/compare/v2.10.9...v2.10.10
290
- [2.10.9]: https://github.com/Automattic/jetpack-autoloader/compare/v2.10.8...v2.10.9
291
- [2.10.8]: https://github.com/Automattic/jetpack-autoloader/compare/v2.10.7...v2.10.8
292
- [2.10.7]: https://github.com/Automattic/jetpack-autoloader/compare/v2.10.6...v2.10.7
293
- [2.10.6]: https://github.com/Automattic/jetpack-autoloader/compare/v2.10.5...v2.10.6
294
- [2.10.5]: https://github.com/Automattic/jetpack-autoloader/compare/v2.10.4...v2.10.5
295
- [2.10.4]: https://github.com/Automattic/jetpack-autoloader/compare/v2.10.3...v2.10.4
296
- [2.10.3]: https://github.com/Automattic/jetpack-autoloader/compare/v2.10.2...v2.10.3
297
- [2.10.2]: https://github.com/Automattic/jetpack-autoloader/compare/v2.10.1...v2.10.2
298
- [2.10.1]: https://github.com/Automattic/jetpack-autoloader/compare/v2.10.0...v2.10.1
299
- [2.10.0]: https://github.com/Automattic/jetpack-autoloader/compare/v2.9.1...v2.10.0
300
- [2.9.1]: https://github.com/Automattic/jetpack-autoloader/compare/v2.9.0...v2.9.1
301
- [2.9.0]: https://github.com/Automattic/jetpack-autoloader/compare/v2.8.0...v2.9.0
302
- [2.8.0]: https://github.com/Automattic/jetpack-autoloader/compare/v2.7.1...v2.8.0
303
- [2.7.1]: https://github.com/Automattic/jetpack-autoloader/compare/v2.7.0...v2.7.1
304
- [2.7.0]: https://github.com/Automattic/jetpack-autoloader/compare/v2.6.0...v2.7.0
305
- [2.6.0]: https://github.com/Automattic/jetpack-autoloader/compare/v2.5.0...v2.6.0
306
- [2.5.0]: https://github.com/Automattic/jetpack-autoloader/compare/v2.4.0...v2.5.0
307
- [2.4.0]: https://github.com/Automattic/jetpack-autoloader/compare/v2.3.0...v2.4.0
308
- [2.3.0]: https://github.com/Automattic/jetpack-autoloader/compare/v2.2.0...v2.3.0
309
- [2.2.0]: https://github.com/Automattic/jetpack-autoloader/compare/v2.1.0...v2.2.0
310
- [2.1.0]: https://github.com/Automattic/jetpack-autoloader/compare/v2.0.2...v2.1.0
311
- [2.0.2]: https://github.com/Automattic/jetpack-autoloader/compare/v2.0.1...v2.0.2
312
- [2.0.1]: https://github.com/Automattic/jetpack-autoloader/compare/v2.0.0...v2.0.1
313
- [2.0.0]: https://github.com/Automattic/jetpack-autoloader/compare/v2.0.0-beta...v2.0.0
314
- [2.0.0-beta]: https://github.com/Automattic/jetpack-autoloader/compare/v1.7.0...v2.0.0-beta
315
- [1.7.0]: https://github.com/Automattic/jetpack-autoloader/compare/v1.6.0...v1.7.0
316
- [1.6.0]: https://github.com/Automattic/jetpack-autoloader/compare/v1.5.0...v1.6.0
317
- [1.5.0]: https://github.com/Automattic/jetpack-autoloader/compare/v1.4.1...v1.5.0
318
- [1.4.1]: https://github.com/Automattic/jetpack-autoloader/compare/v1.4.0...v1.4.1
319
- [1.4.0]: https://github.com/Automattic/jetpack-autoloader/compare/v1.3.8...v1.4.0
320
- [1.3.8]: https://github.com/Automattic/jetpack-autoloader/compare/v1.3.7...v1.3.8
321
- [1.3.7]: https://github.com/Automattic/jetpack-autoloader/compare/v1.3.6...v1.3.7
322
- [1.3.6]: https://github.com/Automattic/jetpack-autoloader/compare/v1.3.5...v1.3.6
323
- [1.3.5]: https://github.com/Automattic/jetpack-autoloader/compare/v1.3.4...v1.3.5
324
- [1.3.4]: https://github.com/Automattic/jetpack-autoloader/compare/v1.3.3...v1.3.4
325
- [1.3.3]: https://github.com/Automattic/jetpack-autoloader/compare/v1.3.2...v1.3.3
326
- [1.3.2]: https://github.com/Automattic/jetpack-autoloader/compare/v1.3.1...v1.3.2
327
- [1.3.1]: https://github.com/Automattic/jetpack-autoloader/compare/v1.3.0...v1.3.1
328
- [1.3.0]: https://github.com/Automattic/jetpack-autoloader/compare/v1.2.0...v1.3.0
329
- [1.2.0]: https://github.com/Automattic/jetpack-autoloader/compare/v1.1.0...v1.2.0
330
- [1.1.0]: https://github.com/Automattic/jetpack-autoloader/compare/v1.0.0...v1.1.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/automattic/jetpack-autoloader/LICENSE.txt DELETED
@@ -1,357 +0,0 @@
1
- This program is free software; you can redistribute it and/or modify
2
- it under the terms of the GNU General Public License as published by
3
- the Free Software Foundation; either version 2 of the License, or
4
- (at your option) any later version.
5
-
6
- This program is distributed in the hope that it will be useful,
7
- but WITHOUT ANY WARRANTY; without even the implied warranty of
8
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9
- GNU General Public License for more details.
10
-
11
- You should have received a copy of the GNU General Public License
12
- along with this program; if not, write to the Free Software
13
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
14
-
15
-
16
- ===================================
17
-
18
-
19
- GNU GENERAL PUBLIC LICENSE
20
- Version 2, June 1991
21
-
22
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
23
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24
- Everyone is permitted to copy and distribute verbatim copies
25
- of this license document, but changing it is not allowed.
26
-
27
- Preamble
28
-
29
- The licenses for most software are designed to take away your
30
- freedom to share and change it. By contrast, the GNU General Public
31
- License is intended to guarantee your freedom to share and change free
32
- software--to make sure the software is free for all its users. This
33
- General Public License applies to most of the Free Software
34
- Foundation's software and to any other program whose authors commit to
35
- using it. (Some other Free Software Foundation software is covered by
36
- the GNU Lesser General Public License instead.) You can apply it to
37
- your programs, too.
38
-
39
- When we speak of free software, we are referring to freedom, not
40
- price. Our General Public Licenses are designed to make sure that you
41
- have the freedom to distribute copies of free software (and charge for
42
- this service if you wish), that you receive source code or can get it
43
- if you want it, that you can change the software or use pieces of it
44
- in new free programs; and that you know you can do these things.
45
-
46
- To protect your rights, we need to make restrictions that forbid
47
- anyone to deny you these rights or to ask you to surrender the rights.
48
- These restrictions translate to certain responsibilities for you if you
49
- distribute copies of the software, or if you modify it.
50
-
51
- For example, if you distribute copies of such a program, whether
52
- gratis or for a fee, you must give the recipients all the rights that
53
- you have. You must make sure that they, too, receive or can get the
54
- source code. And you must show them these terms so they know their
55
- rights.
56
-
57
- We protect your rights with two steps: (1) copyright the software, and
58
- (2) offer you this license which gives you legal permission to copy,
59
- distribute and/or modify the software.
60
-
61
- Also, for each author's protection and ours, we want to make certain
62
- that everyone understands that there is no warranty for this free
63
- software. If the software is modified by someone else and passed on, we
64
- want its recipients to know that what they have is not the original, so
65
- that any problems introduced by others will not reflect on the original
66
- authors' reputations.
67
-
68
- Finally, any free program is threatened constantly by software
69
- patents. We wish to avoid the danger that redistributors of a free
70
- program will individually obtain patent licenses, in effect making the
71
- program proprietary. To prevent this, we have made it clear that any
72
- patent must be licensed for everyone's free use or not licensed at all.
73
-
74
- The precise terms and conditions for copying, distribution and
75
- modification follow.
76
-
77
- GNU GENERAL PUBLIC LICENSE
78
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
79
-
80
- 0. This License applies to any program or other work which contains
81
- a notice placed by the copyright holder saying it may be distributed
82
- under the terms of this General Public License. The "Program", below,
83
- refers to any such program or work, and a "work based on the Program"
84
- means either the Program or any derivative work under copyright law:
85
- that is to say, a work containing the Program or a portion of it,
86
- either verbatim or with modifications and/or translated into another
87
- language. (Hereinafter, translation is included without limitation in
88
- the term "modification".) Each licensee is addressed as "you".
89
-
90
- Activities other than copying, distribution and modification are not
91
- covered by this License; they are outside its scope. The act of
92
- running the Program is not restricted, and the output from the Program
93
- is covered only if its contents constitute a work based on the
94
- Program (independent of having been made by running the Program).
95
- Whether that is true depends on what the Program does.
96
-
97
- 1. You may copy and distribute verbatim copies of the Program's
98
- source code as you receive it, in any medium, provided that you
99
- conspicuously and appropriately publish on each copy an appropriate
100
- copyright notice and disclaimer of warranty; keep intact all the
101
- notices that refer to this License and to the absence of any warranty;
102
- and give any other recipients of the Program a copy of this License
103
- along with the Program.
104
-
105
- You may charge a fee for the physical act of transferring a copy, and
106
- you may at your option offer warranty protection in exchange for a fee.
107
-
108
- 2. You may modify your copy or copies of the Program or any portion
109
- of it, thus forming a work based on the Program, and copy and
110
- distribute such modifications or work under the terms of Section 1
111
- above, provided that you also meet all of these conditions:
112
-
113
- a) You must cause the modified files to carry prominent notices
114
- stating that you changed the files and the date of any change.
115
-
116
- b) You must cause any work that you distribute or publish, that in
117
- whole or in part contains or is derived from the Program or any
118
- part thereof, to be licensed as a whole at no charge to all third
119
- parties under the terms of this License.
120
-
121
- c) If the modified program normally reads commands interactively
122
- when run, you must cause it, when started running for such
123
- interactive use in the most ordinary way, to print or display an
124
- announcement including an appropriate copyright notice and a
125
- notice that there is no warranty (or else, saying that you provide
126
- a warranty) and that users may redistribute the program under
127
- these conditions, and telling the user how to view a copy of this
128
- License. (Exception: if the Program itself is interactive but
129
- does not normally print such an announcement, your work based on
130
- the Program is not required to print an announcement.)
131
-
132
- These requirements apply to the modified work as a whole. If
133
- identifiable sections of that work are not derived from the Program,
134
- and can be reasonably considered independent and separate works in
135
- themselves, then this License, and its terms, do not apply to those
136
- sections when you distribute them as separate works. But when you
137
- distribute the same sections as part of a whole which is a work based
138
- on the Program, the distribution of the whole must be on the terms of
139
- this License, whose permissions for other licensees extend to the
140
- entire whole, and thus to each and every part regardless of who wrote it.
141
-
142
- Thus, it is not the intent of this section to claim rights or contest
143
- your rights to work written entirely by you; rather, the intent is to
144
- exercise the right to control the distribution of derivative or
145
- collective works based on the Program.
146
-
147
- In addition, mere aggregation of another work not based on the Program
148
- with the Program (or with a work based on the Program) on a volume of
149
- a storage or distribution medium does not bring the other work under
150
- the scope of this License.
151
-
152
- 3. You may copy and distribute the Program (or a work based on it,
153
- under Section 2) in object code or executable form under the terms of
154
- Sections 1 and 2 above provided that you also do one of the following:
155
-
156
- a) Accompany it with the complete corresponding machine-readable
157
- source code, which must be distributed under the terms of Sections
158
- 1 and 2 above on a medium customarily used for software interchange; or,
159
-
160
- b) Accompany it with a written offer, valid for at least three
161
- years, to give any third party, for a charge no more than your
162
- cost of physically performing source distribution, a complete
163
- machine-readable copy of the corresponding source code, to be
164
- distributed under the terms of Sections 1 and 2 above on a medium
165
- customarily used for software interchange; or,
166
-
167
- c) Accompany it with the information you received as to the offer
168
- to distribute corresponding source code. (This alternative is
169
- allowed only for noncommercial distribution and only if you
170
- received the program in object code or executable form with such
171
- an offer, in accord with Subsection b above.)
172
-
173
- The source code for a work means the preferred form of the work for
174
- making modifications to it. For an executable work, complete source
175
- code means all the source code for all modules it contains, plus any
176
- associated interface definition files, plus the scripts used to
177
- control compilation and installation of the executable. However, as a
178
- special exception, the source code distributed need not include
179
- anything that is normally distributed (in either source or binary
180
- form) with the major components (compiler, kernel, and so on) of the
181
- operating system on which the executable runs, unless that component
182
- itself accompanies the executable.
183
-
184
- If distribution of executable or object code is made by offering
185
- access to copy from a designated place, then offering equivalent
186
- access to copy the source code from the same place counts as
187
- distribution of the source code, even though third parties are not
188
- compelled to copy the source along with the object code.
189
-
190
- 4. You may not copy, modify, sublicense, or distribute the Program
191
- except as expressly provided under this License. Any attempt
192
- otherwise to copy, modify, sublicense or distribute the Program is
193
- void, and will automatically terminate your rights under this License.
194
- However, parties who have received copies, or rights, from you under
195
- this License will not have their licenses terminated so long as such
196
- parties remain in full compliance.
197
-
198
- 5. You are not required to accept this License, since you have not
199
- signed it. However, nothing else grants you permission to modify or
200
- distribute the Program or its derivative works. These actions are
201
- prohibited by law if you do not accept this License. Therefore, by
202
- modifying or distributing the Program (or any work based on the
203
- Program), you indicate your acceptance of this License to do so, and
204
- all its terms and conditions for copying, distributing or modifying
205
- the Program or works based on it.
206
-
207
- 6. Each time you redistribute the Program (or any work based on the
208
- Program), the recipient automatically receives a license from the
209
- original licensor to copy, distribute or modify the Program subject to
210
- these terms and conditions. You may not impose any further
211
- restrictions on the recipients' exercise of the rights granted herein.
212
- You are not responsible for enforcing compliance by third parties to
213
- this License.
214
-
215
- 7. If, as a consequence of a court judgment or allegation of patent
216
- infringement or for any other reason (not limited to patent issues),
217
- conditions are imposed on you (whether by court order, agreement or
218
- otherwise) that contradict the conditions of this License, they do not
219
- excuse you from the conditions of this License. If you cannot
220
- distribute so as to satisfy simultaneously your obligations under this
221
- License and any other pertinent obligations, then as a consequence you
222
- may not distribute the Program at all. For example, if a patent
223
- license would not permit royalty-free redistribution of the Program by
224
- all those who receive copies directly or indirectly through you, then
225
- the only way you could satisfy both it and this License would be to
226
- refrain entirely from distribution of the Program.
227
-
228
- If any portion of this section is held invalid or unenforceable under
229
- any particular circumstance, the balance of the section is intended to
230
- apply and the section as a whole is intended to apply in other
231
- circumstances.
232
-
233
- It is not the purpose of this section to induce you to infringe any
234
- patents or other property right claims or to contest validity of any
235
- such claims; this section has the sole purpose of protecting the
236
- integrity of the free software distribution system, which is
237
- implemented by public license practices. Many people have made
238
- generous contributions to the wide range of software distributed
239
- through that system in reliance on consistent application of that
240
- system; it is up to the author/donor to decide if he or she is willing
241
- to distribute software through any other system and a licensee cannot
242
- impose that choice.
243
-
244
- This section is intended to make thoroughly clear what is believed to
245
- be a consequence of the rest of this License.
246
-
247
- 8. If the distribution and/or use of the Program is restricted in
248
- certain countries either by patents or by copyrighted interfaces, the
249
- original copyright holder who places the Program under this License
250
- may add an explicit geographical distribution limitation excluding
251
- those countries, so that distribution is permitted only in or among
252
- countries not thus excluded. In such case, this License incorporates
253
- the limitation as if written in the body of this License.
254
-
255
- 9. The Free Software Foundation may publish revised and/or new versions
256
- of the General Public License from time to time. Such new versions will
257
- be similar in spirit to the present version, but may differ in detail to
258
- address new problems or concerns.
259
-
260
- Each version is given a distinguishing version number. If the Program
261
- specifies a version number of this License which applies to it and "any
262
- later version", you have the option of following the terms and conditions
263
- either of that version or of any later version published by the Free
264
- Software Foundation. If the Program does not specify a version number of
265
- this License, you may choose any version ever published by the Free Software
266
- Foundation.
267
-
268
- 10. If you wish to incorporate parts of the Program into other free
269
- programs whose distribution conditions are different, write to the author
270
- to ask for permission. For software which is copyrighted by the Free
271
- Software Foundation, write to the Free Software Foundation; we sometimes
272
- make exceptions for this. Our decision will be guided by the two goals
273
- of preserving the free status of all derivatives of our free software and
274
- of promoting the sharing and reuse of software generally.
275
-
276
- NO WARRANTY
277
-
278
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
279
- FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
280
- OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
281
- PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
282
- OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
283
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
284
- TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
285
- PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
286
- REPAIR OR CORRECTION.
287
-
288
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
289
- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
290
- REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
291
- INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
292
- OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
293
- TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
294
- YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
295
- PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
296
- POSSIBILITY OF SUCH DAMAGES.
297
-
298
- END OF TERMS AND CONDITIONS
299
-
300
- How to Apply These Terms to Your New Programs
301
-
302
- If you develop a new program, and you want it to be of the greatest
303
- possible use to the public, the best way to achieve this is to make it
304
- free software which everyone can redistribute and change under these terms.
305
-
306
- To do so, attach the following notices to the program. It is safest
307
- to attach them to the start of each source file to most effectively
308
- convey the exclusion of warranty; and each file should have at least
309
- the "copyright" line and a pointer to where the full notice is found.
310
-
311
- <one line to give the program's name and a brief idea of what it does.>
312
- Copyright (C) <year> <name of author>
313
-
314
- This program is free software; you can redistribute it and/or modify
315
- it under the terms of the GNU General Public License as published by
316
- the Free Software Foundation; either version 2 of the License, or
317
- (at your option) any later version.
318
-
319
- This program is distributed in the hope that it will be useful,
320
- but WITHOUT ANY WARRANTY; without even the implied warranty of
321
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
322
- GNU General Public License for more details.
323
-
324
- You should have received a copy of the GNU General Public License along
325
- with this program; if not, write to the Free Software Foundation, Inc.,
326
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
327
-
328
- Also add information on how to contact you by electronic and paper mail.
329
-
330
- If the program is interactive, make it output a short notice like this
331
- when it starts in an interactive mode:
332
-
333
- Gnomovision version 69, Copyright (C) year name of author
334
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
335
- This is free software, and you are welcome to redistribute it
336
- under certain conditions; type `show c' for details.
337
-
338
- The hypothetical commands `show w' and `show c' should show the appropriate
339
- parts of the General Public License. Of course, the commands you use may
340
- be called something other than `show w' and `show c'; they could even be
341
- mouse-clicks or menu items--whatever suits your program.
342
-
343
- You should also get your employer (if you work as a programmer) or your
344
- school, if any, to sign a "copyright disclaimer" for the program, if
345
- necessary. Here is a sample; alter the names:
346
-
347
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
348
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
349
-
350
- <signature of Ty Coon>, 1 April 1989
351
- Ty Coon, President of Vice
352
-
353
- This General Public License does not permit incorporating your program into
354
- proprietary programs. If your program is a subroutine library, you may
355
- consider it more useful to permit linking proprietary applications with the
356
- library. If this is what you want to do, use the GNU Lesser General
357
- Public License instead of this License.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/automattic/jetpack-autoloader/README.md DELETED
@@ -1,75 +0,0 @@
1
- A custom autoloader for Composer
2
- =====================================
3
-
4
- This is a custom autoloader generator that uses a classmap to always load the latest version of a class.
5
-
6
- The problem this autoloader is trying to solve is conflicts that arise when two or more plugins use the same package, but one of the plugins uses an older version of said package.
7
-
8
- This is solved by keeping an in memory map of all the different classes that can be loaded, and updating the map with the path to the latest version of the package for the autoloader to find when we instantiate the class.
9
-
10
- It diverges from the default Composer autoloader setup in the following ways:
11
-
12
- * It creates `jetpack_autoload_classmap.php` and `jetpack_autoload_filemap.php` files in the `vendor/composer` directory.
13
- * This file includes the version numbers from each package that is used.
14
- * The autoloader will only load the latest version of the package no matter what plugin loads the package. This behavior is guaranteed only when every plugin that uses the package uses this autoloader. If any plugin that requires the package uses a different autoloader, this autoloader may not be able to control which version of the package is loaded.
15
-
16
- Usage
17
- -----
18
-
19
- In your project's `composer.json`, add the following lines:
20
-
21
- ```json
22
- {
23
- "require-dev": {
24
- "automattic/jetpack-autoloader": "^1"
25
- }
26
- }
27
- ```
28
-
29
- Your project must use the default composer vendor directory, `vendor`.
30
-
31
- After the next update/install, you will have a `vendor/autoload_packages.php` file.
32
- Load the file in your plugin via main plugin file.
33
-
34
- In the main plugin you will also need to include the files like this.
35
- ```php
36
- require_once plugin_dir_path( __FILE__ ) . '/vendor/autoload_packages.php';
37
- ```
38
-
39
- Working with Development Versions of Packages
40
- -----
41
-
42
- The autoloader will attempt to use the package with the latest semantic version.
43
-
44
- During development, you can force the autoloader to use development package versions by setting the `JETPACK_AUTOLOAD_DEV` constant to true. When `JETPACK_AUTOLOAD_DEV` is true, the autoloader will prefer the following versions over semantic versions:
45
- - `9999999-dev`
46
- - Versions with a `dev-` prefix.
47
-
48
-
49
- Autoloading Standards
50
- ----
51
-
52
- All new Jetpack package development should use classmap autoloading, which allows the class and file names to comply with the WordPress Coding Standards.
53
-
54
- ### Optimized Autoloader
55
-
56
- An optimized autoloader is generated when:
57
- * `composer install` or `composer update` is called with `-o` or `--optimize-autoloader`
58
- * `composer dump-autoload` is called with `-o` or `--optimize`
59
-
60
- PSR-4 and PSR-0 namespaces are converted to classmaps.
61
-
62
- ### Unoptimized Autoloader
63
-
64
- Supports PSR-4 autoloading. PSR-0 namespaces are converted to classmaps.
65
-
66
-
67
- Autoloader Limitations
68
- -----
69
-
70
- Plugin Updates
71
-
72
- When moving a package class file, renaming a package class file, or changing a package class namespace, make sure that the class will not be loaded after a plugin update.
73
-
74
- The autoloader builds the in memory classmap as soon as the autoloader is loaded. The package class file paths in the map are not updated after a plugin update. If a plugins's package class files are moved during a plugin update and a moved file is autoloaded after the update, an error will occur.
75
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/automattic/jetpack-autoloader/SECURITY.md DELETED
@@ -1,38 +0,0 @@
1
- # Security Policy
2
-
3
- Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/).
4
-
5
- ## Supported Versions
6
-
7
- Generally, only the latest version of Jetpack has continued support. If a critical vulnerability is found in the current version of Jetpack, we may opt to backport any patches to previous versions.
8
-
9
- ## Reporting a Vulnerability
10
-
11
- [Jetpack](https://jetpack.com/) is an open-source plugin for WordPress. Our HackerOne program covers the plugin software, as well as a variety of related projects and infrastructure.
12
-
13
- **For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.**
14
-
15
- Our most critical targets are:
16
-
17
- * Jetpack and the Jetpack composer packages (all within this repo)
18
- * Jetpack.com -- the primary marketing site.
19
- * cloud.jetpack.com -- a management site.
20
- * wordpress.com -- the shared management site for both Jetpack and WordPress.com sites.
21
-
22
- For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic).
23
-
24
- _Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._
25
-
26
- ## Guidelines
27
-
28
- We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines:
29
-
30
- * Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines).
31
- * Pen-testing Production:
32
- * Please **setup a local environment** instead whenever possible. Most of our code is open source (see above).
33
- * If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC.
34
- * **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels.
35
- * To be eligible for a bounty, all of these guidelines must be followed.
36
- * Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability.
37
-
38
- We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/automattic/jetpack-autoloader/composer.json DELETED
@@ -1,46 +0,0 @@
1
- {
2
- "name": "automattic/jetpack-autoloader",
3
- "description": "Creates a custom autoloader for a plugin or theme.",
4
- "type": "composer-plugin",
5
- "license": "GPL-2.0-or-later",
6
- "require": {
7
- "composer-plugin-api": "^1.1 || ^2.0"
8
- },
9
- "require-dev": {
10
- "yoast/phpunit-polyfills": "1.0.3",
11
- "automattic/jetpack-changelogger": "^3.2"
12
- },
13
- "autoload": {
14
- "classmap": [
15
- "src/AutoloadGenerator.php"
16
- ],
17
- "psr-4": {
18
- "Automattic\\Jetpack\\Autoloader\\": "src"
19
- }
20
- },
21
- "scripts": {
22
- "phpunit": [
23
- "./vendor/phpunit/phpunit/phpunit --colors=always"
24
- ],
25
- "test-coverage": [
26
- "php -dpcov.directory=. ./vendor/bin/phpunit --coverage-php \"./tests/php/tmp/coverage-report.php\"",
27
- "php ./tests/php/bin/test-coverage.php \"$COVERAGE_DIR/clover.xml\""
28
- ],
29
- "test-php": [
30
- "@composer phpunit"
31
- ]
32
- },
33
- "minimum-stability": "dev",
34
- "prefer-stable": true,
35
- "extra": {
36
- "autotagger": true,
37
- "class": "Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin",
38
- "mirror-repo": "Automattic/jetpack-autoloader",
39
- "changelogger": {
40
- "link-template": "https://github.com/Automattic/jetpack-autoloader/compare/v${old}...v${new}"
41
- },
42
- "branch-alias": {
43
- "dev-trunk": "2.11.x-dev"
44
- }
45
- }
46
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/automattic/jetpack-autoloader/src/AutoloadFileWriter.php DELETED
@@ -1,105 +0,0 @@
1
- <?php // phpcs:ignore WordPress.Files.FileName
2
- /**
3
- * Autoloader file writer.
4
- *
5
- * @package automattic/jetpack-autoloader
6
- */
7
-
8
- // phpcs:disable WordPress.Files.FileName.InvalidClassFileName
9
- // phpcs:disable WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
10
- // phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
11
- // phpcs:disable WordPress.NamingConventions.ValidVariableName.InterpolatedVariableNotSnakeCase
12
- // phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
13
- // phpcs:disable WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase
14
- // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_var_export
15
- // phpcs:disable WordPress.WP.AlternativeFunctions.file_system_read_file_put_contents
16
- // phpcs:disable WordPress.WP.AlternativeFunctions.file_system_read_fopen
17
- // phpcs:disable WordPress.WP.AlternativeFunctions.file_system_read_fwrite
18
-
19
- namespace Automattic\Jetpack\Autoloader;
20
-
21
- /**
22
- * Class AutoloadFileWriter.
23
- */
24
- class AutoloadFileWriter {
25
-
26
- /**
27
- * The file comment to use.
28
- */
29
- const COMMENT = <<<AUTOLOADER_COMMENT
30
- /**
31
- * This file was automatically generated by automattic/jetpack-autoloader.
32
- *
33
- * @package automattic/jetpack-autoloader
34
- */
35
-
36
- AUTOLOADER_COMMENT;
37
-
38
- /**
39
- * Copies autoloader files and replaces any placeholders in them.
40
- *
41
- * @param IOInterface|null $io An IO for writing to.
42
- * @param string $outDir The directory to place the autoloader files in.
43
- * @param string $suffix The suffix to use in the autoloader's namespace.
44
- */
45
- public static function copyAutoloaderFiles( $io, $outDir, $suffix ) {
46
- $renameList = array(
47
- 'autoload.php' => '../autoload_packages.php',
48
- );
49
- $ignoreList = array(
50
- 'AutoloadGenerator.php',
51
- 'AutoloadProcessor.php',
52
- 'CustomAutoloaderPlugin.php',
53
- 'ManifestGenerator.php',
54
- 'AutoloadFileWriter.php',
55
- );
56
-
57
- // Copy all of the autoloader files.
58
- $files = scandir( __DIR__ );
59
- foreach ( $files as $file ) {
60
- // Only PHP files will be copied.
61
- if ( substr( $file, -4 ) !== '.php' ) {
62
- continue;
63
- }
64
-
65
- if ( in_array( $file, $ignoreList, true ) ) {
66
- continue;
67
- }
68
-
69
- $newFile = isset( $renameList[ $file ] ) ? $renameList[ $file ] : $file;
70
- $content = self::prepareAutoloaderFile( $file, $suffix );
71
-
72
- $written = file_put_contents( $outDir . '/' . $newFile, $content );
73
- if ( $io ) {
74
- if ( $written ) {
75
- $io->writeError( " <info>Generated: $newFile</info>" );
76
- } else {
77
- $io->writeError( " <error>Error: $newFile</error>" );
78
- }
79
- }
80
- }
81
- }
82
-
83
- /**
84
- * Prepares an autoloader file to be written to the destination.
85
- *
86
- * @param String $filename a file to prepare.
87
- * @param String $suffix Unique suffix used in the namespace.
88
- *
89
- * @return string
90
- */
91
- private static function prepareAutoloaderFile( $filename, $suffix ) {
92
- $header = self::COMMENT;
93
- $header .= PHP_EOL;
94
- $header .= 'namespace Automattic\Jetpack\Autoloader\jp' . $suffix . ';';
95
- $header .= PHP_EOL . PHP_EOL;
96
-
97
- $sourceLoader = fopen( __DIR__ . '/' . $filename, 'r' );
98
- $file_contents = stream_get_contents( $sourceLoader );
99
- return str_replace(
100
- '/* HEADER */',
101
- $header,
102
- $file_contents
103
- );
104
- }
105
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/automattic/jetpack-autoloader/src/AutoloadGenerator.php DELETED
@@ -1,393 +0,0 @@
1
- <?php // phpcs:ignore WordPress.Files.FileName
2
- /**
3
- * Autoloader Generator.
4
- *
5
- * @package automattic/jetpack-autoloader
6
- */
7
-
8
- // phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_useFound
9
- // phpcs:disable PHPCompatibility.LanguageConstructs.NewLanguageConstructs.t_ns_separatorFound
10
- // phpcs:disable PHPCompatibility.FunctionDeclarations.NewClosure.Found
11
- // phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_namespaceFound
12
- // phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_dirFound
13
- // phpcs:disable WordPress.Files.FileName.InvalidClassFileName
14
- // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_var_export
15
- // phpcs:disable WordPress.WP.AlternativeFunctions.file_system_read_file_put_contents
16
- // phpcs:disable WordPress.WP.AlternativeFunctions.file_system_read_fopen
17
- // phpcs:disable WordPress.WP.AlternativeFunctions.file_system_read_fwrite
18
- // phpcs:disable WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
19
- // phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
20
- // phpcs:disable WordPress.NamingConventions.ValidVariableName.InterpolatedVariableNotSnakeCase
21
- // phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
22
- // phpcs:disable WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase
23
-
24
- namespace Automattic\Jetpack\Autoloader;
25
-
26
- use Composer\Autoload\ClassMapGenerator;
27
- use Composer\Composer;
28
- use Composer\Config;
29
- use Composer\Installer\InstallationManager;
30
- use Composer\IO\IOInterface;
31
- use Composer\Package\PackageInterface;
32
- use Composer\Repository\InstalledRepositoryInterface;
33
- use Composer\Util\Filesystem;
34
- use Composer\Util\PackageSorter;
35
-
36
- /**
37
- * Class AutoloadGenerator.
38
- */
39
- class AutoloadGenerator {
40
-
41
- /**
42
- * The filesystem utility.
43
- *
44
- * @var Filesystem
45
- */
46
- private $filesystem;
47
-
48
- /**
49
- * Instantiate an AutoloadGenerator object.
50
- *
51
- * @param IOInterface $io IO object.
52
- */
53
- public function __construct( IOInterface $io = null ) {
54
- $this->io = $io;
55
- $this->filesystem = new Filesystem();
56
- }
57
-
58
- /**
59
- * Dump the Jetpack autoloader files.
60
- *
61
- * @param Composer $composer The Composer object.
62
- * @param Config $config Config object.
63
- * @param InstalledRepositoryInterface $localRepo Installed Repository object.
64
- * @param PackageInterface $mainPackage Main Package object.
65
- * @param InstallationManager $installationManager Manager for installing packages.
66
- * @param string $targetDir Path to the current target directory.
67
- * @param bool $scanPsrPackages Whether or not PSR packages should be converted to a classmap.
68
- * @param string $suffix The autoloader suffix.
69
- */
70
- public function dump(
71
- Composer $composer,
72
- Config $config,
73
- InstalledRepositoryInterface $localRepo,
74
- PackageInterface $mainPackage,
75
- InstallationManager $installationManager,
76
- $targetDir,
77
- $scanPsrPackages = false,
78
- $suffix = null
79
- ) {
80
- $this->filesystem->ensureDirectoryExists( $config->get( 'vendor-dir' ) );
81
-
82
- $packageMap = $composer->getAutoloadGenerator()->buildPackageMap( $installationManager, $mainPackage, $localRepo->getCanonicalPackages() );
83
- $autoloads = $this->parseAutoloads( $packageMap, $mainPackage );
84
-
85
- // Convert the autoloads into a format that the manifest generator can consume more easily.
86
- $basePath = $this->filesystem->normalizePath( realpath( getcwd() ) );
87
- $vendorPath = $this->filesystem->normalizePath( realpath( $config->get( 'vendor-dir' ) ) );
88
- $processedAutoloads = $this->processAutoloads( $autoloads, $scanPsrPackages, $vendorPath, $basePath );
89
- unset( $packageMap, $autoloads );
90
-
91
- // Make sure none of the legacy files remain that can lead to problems with the autoloader.
92
- $this->removeLegacyFiles( $vendorPath );
93
-
94
- // Write all of the files now that we're done.
95
- $this->writeAutoloaderFiles( $vendorPath . '/jetpack-autoloader/', $suffix );
96
- $this->writeManifests( $vendorPath . '/' . $targetDir, $processedAutoloads );
97
-
98
- if ( ! $scanPsrPackages ) {
99
- $this->io->writeError( '<warning>You are generating an unoptimized autoloader. If this is a production build, consider using the -o option.</warning>' );
100
- }
101
- }
102
-
103
- /**
104
- * Compiles an ordered list of namespace => path mappings
105
- *
106
- * @param array $packageMap Array of array(package, installDir-relative-to-composer.json).
107
- * @param PackageInterface $mainPackage Main package instance.
108
- *
109
- * @return array The list of path mappings.
110
- */
111
- public function parseAutoloads( array $packageMap, PackageInterface $mainPackage ) {
112
- $rootPackageMap = array_shift( $packageMap );
113
-
114
- $sortedPackageMap = $this->sortPackageMap( $packageMap );
115
- $sortedPackageMap[] = $rootPackageMap;
116
- array_unshift( $packageMap, $rootPackageMap );
117
-
118
- $psr0 = $this->parseAutoloadsType( $packageMap, 'psr-0', $mainPackage );
119
- $psr4 = $this->parseAutoloadsType( $packageMap, 'psr-4', $mainPackage );
120
- $classmap = $this->parseAutoloadsType( array_reverse( $sortedPackageMap ), 'classmap', $mainPackage );
121
- $files = $this->parseAutoloadsType( $sortedPackageMap, 'files', $mainPackage );
122
-
123
- krsort( $psr0 );
124
- krsort( $psr4 );
125
-
126
- return array(
127
- 'psr-0' => $psr0,
128
- 'psr-4' => $psr4,
129
- 'classmap' => $classmap,
130
- 'files' => $files,
131
- );
132
- }
133
-
134
- /**
135
- * Sorts packages by dependency weight
136
- *
137
- * Packages of equal weight retain the original order
138
- *
139
- * @param array $packageMap The package map.
140
- *
141
- * @return array
142
- */
143
- protected function sortPackageMap( array $packageMap ) {
144
- $packages = array();
145
- $paths = array();
146
-
147
- foreach ( $packageMap as $item ) {
148
- list( $package, $path ) = $item;
149
- $name = $package->getName();
150
- $packages[ $name ] = $package;
151
- $paths[ $name ] = $path;
152
- }
153
-
154
- $sortedPackages = PackageSorter::sortPackages( $packages );
155
-
156
- $sortedPackageMap = array();
157
-
158
- foreach ( $sortedPackages as $package ) {
159
- $name = $package->getName();
160
- $sortedPackageMap[] = array( $packages[ $name ], $paths[ $name ] );
161
- }
162
-
163
- return $sortedPackageMap;
164
- }
165
-
166
- /**
167
- * Returns the file identifier.
168
- *
169
- * @param PackageInterface $package The package instance.
170
- * @param string $path The path.
171
- */
172
- protected function getFileIdentifier( PackageInterface $package, $path ) {
173
- return md5( $package->getName() . ':' . $path );
174
- }
175
-
176
- /**
177
- * Returns the path code for the given path.
178
- *
179
- * @param Filesystem $filesystem The filesystem instance.
180
- * @param string $basePath The base path.
181
- * @param string $vendorPath The vendor path.
182
- * @param string $path The path.
183
- *
184
- * @return string The path code.
185
- */
186
- protected function getPathCode( Filesystem $filesystem, $basePath, $vendorPath, $path ) {
187
- if ( ! $filesystem->isAbsolutePath( $path ) ) {
188
- $path = $basePath . '/' . $path;
189
- }
190
- $path = $filesystem->normalizePath( $path );
191
-
192
- $baseDir = '';
193
- if ( 0 === strpos( $path . '/', $vendorPath . '/' ) ) {
194
- $path = substr( $path, strlen( $vendorPath ) );
195
- $baseDir = '$vendorDir';
196
-
197
- if ( false !== $path ) {
198
- $baseDir .= ' . ';
199
- }
200
- } else {
201
- $path = $filesystem->normalizePath( $filesystem->findShortestPath( $basePath, $path, true ) );
202
- if ( ! $filesystem->isAbsolutePath( $path ) ) {
203
- $baseDir = '$baseDir . ';
204
- $path = '/' . $path;
205
- }
206
- }
207
-
208
- if ( strpos( $path, '.phar' ) !== false ) {
209
- $baseDir = "'phar://' . " . $baseDir;
210
- }
211
-
212
- return $baseDir . ( ( false !== $path ) ? var_export( $path, true ) : '' );
213
- }
214
-
215
- /**
216
- * This function differs from the composer parseAutoloadsType in that beside returning the path.
217
- * It also return the path and the version of a package.
218
- *
219
- * Supports PSR-4, PSR-0, and classmap parsing.
220
- *
221
- * @param array $packageMap Map of all the packages.
222
- * @param string $type Type of autoloader to use.
223
- * @param PackageInterface $mainPackage Instance of the Package Object.
224
- *
225
- * @return array
226
- */
227
- protected function parseAutoloadsType( array $packageMap, $type, PackageInterface $mainPackage ) {
228
- $autoloads = array();
229
-
230
- foreach ( $packageMap as $item ) {
231
- list($package, $installPath) = $item;
232
- $autoload = $package->getAutoload();
233
-
234
- if ( $package === $mainPackage ) {
235
- $autoload = array_merge_recursive( $autoload, $package->getDevAutoload() );
236
- }
237
-
238
- if ( null !== $package->getTargetDir() && $package !== $mainPackage ) {
239
- $installPath = substr( $installPath, 0, -strlen( '/' . $package->getTargetDir() ) );
240
- }
241
-
242
- if ( in_array( $type, array( 'psr-4', 'psr-0' ), true ) && isset( $autoload[ $type ] ) && is_array( $autoload[ $type ] ) ) {
243
- foreach ( $autoload[ $type ] as $namespace => $paths ) {
244
- $paths = is_array( $paths ) ? $paths : array( $paths );
245
- foreach ( $paths as $path ) {
246
- $relativePath = empty( $installPath ) ? ( empty( $path ) ? '.' : $path ) : $installPath . '/' . $path;
247
- $autoloads[ $namespace ][] = array(
248
- 'path' => $relativePath,
249
- 'version' => $package->getVersion(), // Version of the class comes from the package - should we try to parse it?
250
- );
251
- }
252
- }
253
- }
254
-
255
- if ( 'classmap' === $type && isset( $autoload['classmap'] ) && is_array( $autoload['classmap'] ) ) {
256
- foreach ( $autoload['classmap'] as $paths ) {
257
- $paths = is_array( $paths ) ? $paths : array( $paths );
258
- foreach ( $paths as $path ) {
259
- $relativePath = empty( $installPath ) ? ( empty( $path ) ? '.' : $path ) : $installPath . '/' . $path;
260
- $autoloads[] = array(
261
- 'path' => $relativePath,
262
- 'version' => $package->getVersion(), // Version of the class comes from the package - should we try to parse it?
263
- );
264
- }
265
- }
266
- }
267
- if ( 'files' === $type && isset( $autoload['files'] ) && is_array( $autoload['files'] ) ) {
268
- foreach ( $autoload['files'] as $paths ) {
269
- $paths = is_array( $paths ) ? $paths : array( $paths );
270
- foreach ( $paths as $path ) {
271
- $relativePath = empty( $installPath ) ? ( empty( $path ) ? '.' : $path ) : $installPath . '/' . $path;
272
- $autoloads[ $this->getFileIdentifier( $package, $path ) ] = array(
273
- 'path' => $relativePath,
274
- 'version' => $package->getVersion(), // Version of the file comes from the package - should we try to parse it?
275
- );
276
- }
277
- }
278
- }
279
- }
280
-
281
- return $autoloads;
282
- }
283
-
284
- /**
285
- * Given Composer's autoloads this will convert them to a version that we can use to generate the manifests.
286
- *
287
- * When the $scanPsrPackages argument is true, PSR-4 namespaces are converted to classmaps. When $scanPsrPackages
288
- * is false, PSR-4 namespaces are not converted to classmaps.
289
- *
290
- * PSR-0 namespaces are always converted to classmaps.
291
- *
292
- * @param array $autoloads The autoloads we want to process.
293
- * @param bool $scanPsrPackages Whether or not PSR-4 packages should be converted to a classmap.
294
- * @param string $vendorPath The path to the vendor directory.
295
- * @param string $basePath The path to the current directory.
296
- *
297
- * @return array $processedAutoloads
298
- */
299
- private function processAutoloads( $autoloads, $scanPsrPackages, $vendorPath, $basePath ) {
300
- $processor = new AutoloadProcessor(
301
- function ( $path, $excludedClasses, $namespace ) use ( $basePath ) {
302
- $dir = $this->filesystem->normalizePath(
303
- $this->filesystem->isAbsolutePath( $path ) ? $path : $basePath . '/' . $path
304
- );
305
- return ClassMapGenerator::createMap(
306
- $dir,
307
- $excludedClasses,
308
- null, // Don't pass the IOInterface since the normal autoload generation will have reported already.
309
- empty( $namespace ) ? null : $namespace
310
- );
311
- },
312
- function ( $path ) use ( $basePath, $vendorPath ) {
313
- return $this->getPathCode( $this->filesystem, $basePath, $vendorPath, $path );
314
- }
315
- );
316
-
317
- return array(
318
- 'psr-4' => $processor->processPsr4Packages( $autoloads, $scanPsrPackages ),
319
- 'classmap' => $processor->processClassmap( $autoloads, $scanPsrPackages ),
320
- 'files' => $processor->processFiles( $autoloads ),
321
- );
322
- }
323
-
324
- /**
325
- * Removes all of the legacy autoloader files so they don't cause any problems.
326
- *
327
- * @param string $outDir The directory legacy files are written to.
328
- */
329
- private function removeLegacyFiles( $outDir ) {
330
- $files = array(
331
- 'autoload_functions.php',
332
- 'class-autoloader-handler.php',
333
- 'class-classes-handler.php',
334
- 'class-files-handler.php',
335
- 'class-plugins-handler.php',
336
- 'class-version-selector.php',
337
- );
338
- foreach ( $files as $file ) {
339
- $this->filesystem->remove( $outDir . '/' . $file );
340
- }
341
- }
342
-
343
- /**
344
- * Writes all of the autoloader files to disk.
345
- *
346
- * @param string $outDir The directory to write to.
347
- * @param string $suffix The unique autoloader suffix.
348
- */
349
- private function writeAutoloaderFiles( $outDir, $suffix ) {
350
- $this->io->writeError( "<info>Generating jetpack autoloader ($outDir)</info>" );
351
-
352
- // We will remove all autoloader files to generate this again.
353
- $this->filesystem->emptyDirectory( $outDir );
354
-
355
- // Write the autoloader files.
356
- AutoloadFileWriter::copyAutoloaderFiles( $this->io, $outDir, $suffix );
357
- }
358
-
359
- /**
360
- * Writes all of the manifest files to disk.
361
- *
362
- * @param string $outDir The directory to write to.
363
- * @param array $processedAutoloads The processed autoloads.
364
- */
365
- private function writeManifests( $outDir, $processedAutoloads ) {
366
- $this->io->writeError( "<info>Generating jetpack autoloader manifests ($outDir)</info>" );
367
-
368
- $manifestFiles = array(
369
- 'classmap' => 'jetpack_autoload_classmap.php',
370
- 'psr-4' => 'jetpack_autoload_psr4.php',
371
- 'files' => 'jetpack_autoload_filemap.php',
372
- );
373
-
374
- foreach ( $manifestFiles as $key => $file ) {
375
- // Make sure the file doesn't exist so it isn't there if we don't write it.
376
- $this->filesystem->remove( $outDir . '/' . $file );
377
- if ( empty( $processedAutoloads[ $key ] ) ) {
378
- continue;
379
- }
380
-
381
- $content = ManifestGenerator::buildManifest( $key, $file, $processedAutoloads[ $key ] );
382
- if ( empty( $content ) ) {
383
- continue;
384
- }
385
-
386
- if ( file_put_contents( $outDir . '/' . $file, $content ) ) {
387
- $this->io->writeError( " <info>Generated: $file</info>" );
388
- } else {
389
- $this->io->writeError( " <error>Error: $file</error>" );
390
- }
391
- }
392
- }
393
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/automattic/jetpack-autoloader/src/AutoloadProcessor.php DELETED
@@ -1,180 +0,0 @@
1
- <?php // phpcs:ignore WordPress.Files.FileName
2
- /**
3
- * Autoload Processor.
4
- *
5
- * @package automattic/jetpack-autoloader
6
- */
7
-
8
- // phpcs:disable WordPress.Files.FileName.InvalidClassFileName
9
- // phpcs:disable WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
10
- // phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
11
- // phpcs:disable WordPress.NamingConventions.ValidVariableName.InterpolatedVariableNotSnakeCase
12
- // phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
13
- // phpcs:disable WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase
14
-
15
- namespace Automattic\Jetpack\Autoloader;
16
-
17
- /**
18
- * Class AutoloadProcessor.
19
- */
20
- class AutoloadProcessor {
21
-
22
- /**
23
- * A callable for scanning a directory for all of its classes.
24
- *
25
- * @var callable
26
- */
27
- private $classmapScanner;
28
-
29
- /**
30
- * A callable for transforming a path into one to be used in code.
31
- *
32
- * @var callable
33
- */
34
- private $pathCodeTransformer;
35
-
36
- /**
37
- * The constructor.
38
- *
39
- * @param callable $classmapScanner A callable for scanning a directory for all of its classes.
40
- * @param callable $pathCodeTransformer A callable for transforming a path into one to be used in code.
41
- */
42
- public function __construct( $classmapScanner, $pathCodeTransformer ) {
43
- $this->classmapScanner = $classmapScanner;
44
- $this->pathCodeTransformer = $pathCodeTransformer;
45
- }
46
-
47
- /**
48
- * Processes the classmap autoloads into a relative path format including the version for each file.
49
- *
50
- * @param array $autoloads The autoloads we are processing.
51
- * @param bool $scanPsrPackages Whether or not PSR packages should be converted to a classmap.
52
- *
53
- * @return array $processed
54
- */
55
- public function processClassmap( $autoloads, $scanPsrPackages ) {
56
- // We can't scan PSR packages if we don't actually have any.
57
- if ( empty( $autoloads['psr-4'] ) ) {
58
- $scanPsrPackages = false;
59
- }
60
-
61
- if ( empty( $autoloads['classmap'] ) && ! $scanPsrPackages ) {
62
- return null;
63
- }
64
-
65
- $excludedClasses = null;
66
- if ( ! empty( $autoloads['exclude-from-classmap'] ) ) {
67
- $excludedClasses = '{(' . implode( '|', $autoloads['exclude-from-classmap'] ) . ')}';
68
- }
69
-
70
- $processed = array();
71
-
72
- if ( $scanPsrPackages ) {
73
- foreach ( $autoloads['psr-4'] as $namespace => $sources ) {
74
- $namespace = empty( $namespace ) ? null : $namespace;
75
-
76
- foreach ( $sources as $source ) {
77
- $classmap = call_user_func( $this->classmapScanner, $source['path'], $excludedClasses, $namespace );
78
-
79
- foreach ( $classmap as $class => $path ) {
80
- $processed[ $class ] = array(
81
- 'version' => $source['version'],
82
- 'path' => call_user_func( $this->pathCodeTransformer, $path ),
83
- );
84
- }
85
- }
86
- }
87
- }
88
-
89
- /*
90
- * PSR-0 namespaces are converted to classmaps for both optimized and unoptimized autoloaders because any new
91
- * development should use classmap or PSR-4 autoloading.
92
- */
93
- if ( ! empty( $autoloads['psr-0'] ) ) {
94
- foreach ( $autoloads['psr-0'] as $namespace => $sources ) {
95
- $namespace = empty( $namespace ) ? null : $namespace;
96
-
97
- foreach ( $sources as $source ) {
98
- $classmap = call_user_func( $this->classmapScanner, $source['path'], $excludedClasses, $namespace );
99
- foreach ( $classmap as $class => $path ) {
100
- $processed[ $class ] = array(
101
- 'version' => $source['version'],
102
- 'path' => call_user_func( $this->pathCodeTransformer, $path ),
103
- );
104
- }
105
- }
106
- }
107
- }
108
-
109
- if ( ! empty( $autoloads['classmap'] ) ) {
110
- foreach ( $autoloads['classmap'] as $package ) {
111
- $classmap = call_user_func( $this->classmapScanner, $package['path'], $excludedClasses, null );
112
-
113
- foreach ( $classmap as $class => $path ) {
114
- $processed[ $class ] = array(
115
- 'version' => $package['version'],
116
- 'path' => call_user_func( $this->pathCodeTransformer, $path ),
117
- );
118
- }
119
- }
120
- }
121
-
122
- return $processed;
123
- }
124
-
125
- /**
126
- * Processes the PSR-4 autoloads into a relative path format including the version for each file.
127
- *
128
- * @param array $autoloads The autoloads we are processing.
129
- * @param bool $scanPsrPackages Whether or not PSR packages should be converted to a classmap.
130
- *
131
- * @return array $processed
132
- */
133
- public function processPsr4Packages( $autoloads, $scanPsrPackages ) {
134
- if ( $scanPsrPackages || empty( $autoloads['psr-4'] ) ) {
135
- return null;
136
- }
137
-
138
- $processed = array();
139
-
140
- foreach ( $autoloads['psr-4'] as $namespace => $packages ) {
141
- $namespace = empty( $namespace ) ? null : $namespace;
142
- $paths = array();
143
-
144
- foreach ( $packages as $package ) {
145
- $paths[] = call_user_func( $this->pathCodeTransformer, $package['path'] );
146
- }
147
-
148
- $processed[ $namespace ] = array(
149
- 'version' => $package['version'],
150
- 'path' => $paths,
151
- );
152
- }
153
-
154
- return $processed;
155
- }
156
-
157
- /**
158
- * Processes the file autoloads into a relative format including the version for each file.
159
- *
160
- * @param array $autoloads The autoloads we are processing.
161
- *
162
- * @return array|null $processed
163
- */
164
- public function processFiles( $autoloads ) {
165
- if ( empty( $autoloads['files'] ) ) {
166
- return null;
167
- }
168
-
169
- $processed = array();
170
-
171
- foreach ( $autoloads['files'] as $file_id => $package ) {
172
- $processed[ $file_id ] = array(
173
- 'version' => $package['version'],
174
- 'path' => call_user_func( $this->pathCodeTransformer, $package['path'] ),
175
- );
176
- }
177
-
178
- return $processed;
179
- }
180
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php DELETED
@@ -1,198 +0,0 @@
1
- <?php //phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase
2
- /**
3
- * Custom Autoloader Composer Plugin, hooks into composer events to generate the custom autoloader.
4
- *
5
- * @package automattic/jetpack-autoloader
6
- */
7
-
8
- // phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_useFound
9
- // phpcs:disable PHPCompatibility.LanguageConstructs.NewLanguageConstructs.t_ns_separatorFound
10
- // phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_namespaceFound
11
- // phpcs:disable WordPress.Files.FileName.NotHyphenatedLowercase
12
- // phpcs:disable WordPress.Files.FileName.InvalidClassFileName
13
- // phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
14
-
15
- namespace Automattic\Jetpack\Autoloader;
16
-
17
- use Composer\Composer;
18
- use Composer\EventDispatcher\EventSubscriberInterface;
19
- use Composer\IO\IOInterface;
20
- use Composer\Plugin\PluginInterface;
21
- use Composer\Script\Event;
22
- use Composer\Script\ScriptEvents;
23
-
24
- /**
25
- * Class CustomAutoloaderPlugin.
26
- *
27
- * @package automattic/jetpack-autoloader
28
- */
29
- class CustomAutoloaderPlugin implements PluginInterface, EventSubscriberInterface {
30
-
31
- /**
32
- * IO object.
33
- *
34
- * @var IOInterface IO object.
35
- */
36
- private $io;
37
-
38
- /**
39
- * Composer object.
40
- *
41
- * @var Composer Composer object.
42
- */
43
- private $composer;
44
-
45
- /**
46
- * Do nothing.
47
- *
48
- * @param Composer $composer Composer object.
49
- * @param IOInterface $io IO object.
50
- */
51
- public function activate( Composer $composer, IOInterface $io ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
52
- $this->composer = $composer;
53
- $this->io = $io;
54
- }
55
-
56
- /**
57
- * Do nothing.
58
- * phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
59
- *
60
- * @param Composer $composer Composer object.
61
- * @param IOInterface $io IO object.
62
- */
63
- public function deactivate( Composer $composer, IOInterface $io ) {
64
- /*
65
- * Intentionally left empty. This is a PluginInterface method.
66
- * phpcs:enable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
67
- */
68
- }
69
-
70
- /**
71
- * Do nothing.
72
- * phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
73
- *
74
- * @param Composer $composer Composer object.
75
- * @param IOInterface $io IO object.
76
- */
77
- public function uninstall( Composer $composer, IOInterface $io ) {
78
- /*
79
- * Intentionally left empty. This is a PluginInterface method.
80
- * phpcs:enable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
81
- */
82
- }
83
-
84
- /**
85
- * Tell composer to listen for events and do something with them.
86
- *
87
- * @return array List of subscribed events.
88
- */
89
- public static function getSubscribedEvents() {
90
- return array(
91
- ScriptEvents::POST_AUTOLOAD_DUMP => 'postAutoloadDump',
92
- );
93
- }
94
-
95
- /**
96
- * Generate the custom autolaoder.
97
- *
98
- * @param Event $event Script event object.
99
- */
100
- public function postAutoloadDump( Event $event ) {
101
- // When the autoloader is not required by the root package we don't want to execute it.
102
- // This prevents unwanted transitive execution that generates unused autoloaders or
103
- // at worst throws fatal executions.
104
- if ( ! $this->isRequiredByRoot() ) {
105
- return;
106
- }
107
-
108
- $config = $this->composer->getConfig();
109
-
110
- if ( 'vendor' !== $config->raw()['config']['vendor-dir'] ) {
111
- $this->io->writeError( "\n<error>An error occurred while generating the autoloader files:", true );
112
- $this->io->writeError( 'The project\'s composer.json or composer environment set a non-default vendor directory.', true );
113
- $this->io->writeError( 'The default composer vendor directory must be used.</error>', true );
114
- exit();
115
- }
116
-
117
- $installationManager = $this->composer->getInstallationManager();
118
- $repoManager = $this->composer->getRepositoryManager();
119
- $localRepo = $repoManager->getLocalRepository();
120
- $package = $this->composer->getPackage();
121
- $optimize = $event->getFlags()['optimize'];
122
- $suffix = $this->determineSuffix();
123
-
124
- $generator = new AutoloadGenerator( $this->io );
125
- $generator->dump( $this->composer, $config, $localRepo, $package, $installationManager, 'composer', $optimize, $suffix );
126
- $this->generated = true;
127
- }
128
-
129
- /**
130
- * Determine the suffix for the autoloader class.
131
- *
132
- * Reuses an existing suffix from vendor/autoload_packages.php or vendor/autoload.php if possible.
133
- *
134
- * @return string Suffix.
135
- */
136
- private function determineSuffix() {
137
- $config = $this->composer->getConfig();
138
- $vendorPath = $config->get( 'vendor-dir' );
139
-
140
- // Command line.
141
- $suffix = $config->get( 'autoloader-suffix' );
142
- if ( $suffix ) {
143
- return $suffix;
144
- }
145
-
146
- // Reuse our own suffix, if any.
147
- if ( is_readable( $vendorPath . '/autoload_packages.php' ) ) {
148
- // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
149
- $content = file_get_contents( $vendorPath . '/autoload_packages.php' );
150
- if ( preg_match( '/^namespace Automattic\\\\Jetpack\\\\Autoloader\\\\jp([^;\s]+);/m', $content, $match ) ) {
151
- return $match[1];
152
- }
153
- }
154
-
155
- // Reuse Composer's suffix, if any.
156
- if ( is_readable( $vendorPath . '/autoload.php' ) ) {
157
- // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
158
- $content = file_get_contents( $vendorPath . '/autoload.php' );
159
- if ( preg_match( '{ComposerAutoloaderInit([^:\s]+)::}', $content, $match ) ) {
160
- return $match[1];
161
- }
162
- }
163
-
164
- // Generate a random suffix.
165
- return md5( uniqid( '', true ) );
166
- }
167
-
168
- /**
169
- * Checks to see whether or not the root package is the one that required the autoloader.
170
- *
171
- * @return bool
172
- */
173
- private function isRequiredByRoot() {
174
- $package = $this->composer->getPackage();
175
- $requires = $package->getRequires();
176
- if ( ! is_array( $requires ) ) {
177
- $requires = array();
178
- }
179
- $devRequires = $package->getDevRequires();
180
- if ( ! is_array( $devRequires ) ) {
181
- $devRequires = array();
182
- }
183
- $requires = array_merge( $requires, $devRequires );
184
-
185
- if ( empty( $requires ) ) {
186
- $this->io->writeError( "\n<error>The package is not required and this should never happen?</error>", true );
187
- exit();
188
- }
189
-
190
- foreach ( $requires as $require ) {
191
- if ( 'automattic/jetpack-autoloader' === $require->getTarget() ) {
192
- return true;
193
- }
194
- }
195
-
196
- return false;
197
- }
198
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/automattic/jetpack-autoloader/src/ManifestGenerator.php DELETED
@@ -1,121 +0,0 @@
1
- <?php // phpcs:ignore WordPress.Files.FileName
2
- /**
3
- * Manifest Generator.
4
- *
5
- * @package automattic/jetpack-autoloader
6
- */
7
-
8
- // phpcs:disable WordPress.Files.FileName.InvalidClassFileName
9
- // phpcs:disable WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
10
- // phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
11
- // phpcs:disable WordPress.NamingConventions.ValidVariableName.InterpolatedVariableNotSnakeCase
12
- // phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
13
- // phpcs:disable WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase
14
- // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_var_export
15
-
16
- namespace Automattic\Jetpack\Autoloader;
17
-
18
- /**
19
- * Class ManifestGenerator.
20
- */
21
- class ManifestGenerator {
22
-
23
- /**
24
- * Builds a manifest file for the given autoloader type.
25
- *
26
- * @param string $autoloaderType The type of autoloader to build a manifest for.
27
- * @param string $fileName The filename of the manifest.
28
- * @param array $content The manifest content to generate using.
29
- *
30
- * @return string|null $manifestFile
31
- * @throws \InvalidArgumentException When an invalid autoloader type is given.
32
- */
33
- public static function buildManifest( $autoloaderType, $fileName, $content ) {
34
- if ( empty( $content ) ) {
35
- return null;
36
- }
37
-
38
- switch ( $autoloaderType ) {
39
- case 'classmap':
40
- case 'files':
41
- return self::buildStandardManifest( $fileName, $content );
42
- case 'psr-4':
43
- return self::buildPsr4Manifest( $fileName, $content );
44
- }
45
-
46
- throw new \InvalidArgumentException( 'An invalid manifest type of ' . $autoloaderType . ' was passed!' );
47
- }
48
-
49
- /**
50
- * Builds the contents for the standard manifest file.
51
- *
52
- * @param string $fileName The filename we are building.
53
- * @param array $manifestData The formatted data for the manifest.
54
- *
55
- * @return string|null $manifestFile
56
- */
57
- private static function buildStandardManifest( $fileName, $manifestData ) {
58
- $fileContent = PHP_EOL;
59
- foreach ( $manifestData as $key => $data ) {
60
- $key = var_export( $key, true );
61
- $versionCode = var_export( $data['version'], true );
62
- $fileContent .= <<<MANIFEST_CODE
63
- $key => array(
64
- 'version' => $versionCode,
65
- 'path' => {$data['path']}
66
- ),
67
- MANIFEST_CODE;
68
- $fileContent .= PHP_EOL;
69
- }
70
-
71
- return self::buildFile( $fileName, $fileContent );
72
- }
73
-
74
- /**
75
- * Builds the contents for the PSR-4 manifest file.
76
- *
77
- * @param string $fileName The filename we are building.
78
- * @param array $namespaces The formatted PSR-4 data for the manifest.
79
- *
80
- * @return string|null $manifestFile
81
- */
82
- private static function buildPsr4Manifest( $fileName, $namespaces ) {
83
- $fileContent = PHP_EOL;
84
- foreach ( $namespaces as $namespace => $data ) {
85
- $namespaceCode = var_export( $namespace, true );
86
- $versionCode = var_export( $data['version'], true );
87
- $pathCode = 'array( ' . implode( ', ', $data['path'] ) . ' )';
88
- $fileContent .= <<<MANIFEST_CODE
89
- $namespaceCode => array(
90
- 'version' => $versionCode,
91
- 'path' => $pathCode
92
- ),
93
- MANIFEST_CODE;
94
- $fileContent .= PHP_EOL;
95
- }
96
-
97
- return self::buildFile( $fileName, $fileContent );
98
- }
99
-
100
- /**
101
- * Generate the PHP that will be used in the file.
102
- *
103
- * @param string $fileName The filename we are building.
104
- * @param string $content The content to be written into the file.
105
- *
106
- * @return string $fileContent
107
- */
108
- private static function buildFile( $fileName, $content ) {
109
- return <<<INCLUDE_FILE
110
- <?php
111
-
112
- // This file `$fileName` was auto generated by automattic/jetpack-autoloader.
113
-
114
- \$vendorDir = dirname(__DIR__);
115
- \$baseDir = dirname(\$vendorDir);
116
-
117
- return array($content);
118
-
119
- INCLUDE_FILE;
120
- }
121
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/automattic/jetpack-autoloader/src/autoload.php DELETED
@@ -1,5 +0,0 @@
1
- <?php
2
- /* HEADER */ // phpcs:ignore
3
-
4
- require_once __DIR__ . '/jetpack-autoloader/class-autoloader.php';
5
- Autoloader::init();
 
 
 
 
 
vendor/automattic/jetpack-autoloader/src/class-autoloader-handler.php DELETED
@@ -1,139 +0,0 @@
1
- <?php
2
- /* HEADER */ // phpcs:ignore
3
-
4
- use Automattic\Jetpack\Autoloader\AutoloadGenerator;
5
-
6
- /**
7
- * This class selects the package version for the autoloader.
8
- */
9
- class Autoloader_Handler {
10
-
11
- /**
12
- * The PHP_Autoloader instance.
13
- *
14
- * @var PHP_Autoloader
15
- */
16
- private $php_autoloader;
17
-
18
- /**
19
- * The Hook_Manager instance.
20
- *
21
- * @var Hook_Manager
22
- */
23
- private $hook_manager;
24
-
25
- /**
26
- * The Manifest_Reader instance.
27
- *
28
- * @var Manifest_Reader
29
- */
30
- private $manifest_reader;
31
-
32
- /**
33
- * The Version_Selector instance.
34
- *
35
- * @var Version_Selector
36
- */
37
- private $version_selector;
38
-
39
- /**
40
- * The constructor.
41
- *
42
- * @param PHP_Autoloader $php_autoloader The PHP_Autoloader instance.
43
- * @param Hook_Manager $hook_manager The Hook_Manager instance.
44
- * @param Manifest_Reader $manifest_reader The Manifest_Reader instance.
45
- * @param Version_Selector $version_selector The Version_Selector instance.
46
- */
47
- public function __construct( $php_autoloader, $hook_manager, $manifest_reader, $version_selector ) {
48
- $this->php_autoloader = $php_autoloader;
49
- $this->hook_manager = $hook_manager;
50
- $this->manifest_reader = $manifest_reader;
51
- $this->version_selector = $version_selector;
52
- }
53
-
54
- /**
55
- * Checks to see whether or not an autoloader is currently in the process of initializing.
56
- *
57
- * @return bool
58
- */
59
- public function is_initializing() {
60
- // If no version has been set it means that no autoloader has started initializing yet.
61
- global $jetpack_autoloader_latest_version;
62
- if ( ! isset( $jetpack_autoloader_latest_version ) ) {
63
- return false;
64
- }
65
-
66
- // When the version is set but the classmap is not it ALWAYS means that this is the
67
- // latest autoloader and is being included by an older one.
68
- global $jetpack_packages_classmap;
69
- if ( empty( $jetpack_packages_classmap ) ) {
70
- return true;
71
- }
72
-
73
- // Version 2.4.0 added a new global and altered the reset semantics. We need to check
74
- // the other global as well since it may also point at initialization.
75
- // Note: We don't need to check for the class first because every autoloader that
76
- // will set the latest version global requires this class in the classmap.
77
- $replacing_version = $jetpack_packages_classmap[ AutoloadGenerator::class ]['version'];
78
- if ( $this->version_selector->is_dev_version( $replacing_version ) || version_compare( $replacing_version, '2.4.0.0', '>=' ) ) {
79
- global $jetpack_autoloader_loader;
80
- if ( ! isset( $jetpack_autoloader_loader ) ) {
81
- return true;
82
- }
83
- }
84
-
85
- return false;
86
- }
87
-
88
- /**
89
- * Activates an autoloader using the given plugins and activates it.
90
- *
91
- * @param string[] $plugins The plugins to initialize the autoloader for.
92
- */
93
- public function activate_autoloader( $plugins ) {
94
- global $jetpack_packages_psr4;
95
- $jetpack_packages_psr4 = array();
96
- $this->manifest_reader->read_manifests( $plugins, 'vendor/composer/jetpack_autoload_psr4.php', $jetpack_packages_psr4 );
97
-
98
- global $jetpack_packages_classmap;
99
- $jetpack_packages_classmap = array();
100
- $this->manifest_reader->read_manifests( $plugins, 'vendor/composer/jetpack_autoload_classmap.php', $jetpack_packages_classmap );
101
-
102
- global $jetpack_packages_filemap;
103
- $jetpack_packages_filemap = array();
104
- $this->manifest_reader->read_manifests( $plugins, 'vendor/composer/jetpack_autoload_filemap.php', $jetpack_packages_filemap );
105
-
106
- $loader = new Version_Loader(
107
- $this->version_selector,
108
- $jetpack_packages_classmap,
109
- $jetpack_packages_psr4,
110
- $jetpack_packages_filemap
111
- );
112
-
113
- $this->php_autoloader->register_autoloader( $loader );
114
-
115
- // Now that the autoloader is active we can load the filemap.
116
- $loader->load_filemap();
117
- }
118
-
119
- /**
120
- * Resets the active autoloader and all related global state.
121
- */
122
- public function reset_autoloader() {
123
- $this->php_autoloader->unregister_autoloader();
124
- $this->hook_manager->reset();
125
-
126
- // Clear all of the autoloader globals so that older autoloaders don't do anything strange.
127
- global $jetpack_autoloader_latest_version;
128
- $jetpack_autoloader_latest_version = null;
129
-
130
- global $jetpack_packages_classmap;
131
- $jetpack_packages_classmap = array(); // Must be array to avoid exceptions in old autoloaders!
132
-
133
- global $jetpack_packages_psr4;
134
- $jetpack_packages_psr4 = array(); // Must be array to avoid exceptions in old autoloaders!
135
-
136
- global $jetpack_packages_filemap;
137
- $jetpack_packages_filemap = array(); // Must be array to avoid exceptions in old autoloaders!
138
- }
139
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/automattic/jetpack-autoloader/src/class-autoloader-locator.php DELETED
@@ -1,82 +0,0 @@
1
- <?php
2
- /* HEADER */ // phpcs:ignore
3
-
4
- use Automattic\Jetpack\Autoloader\AutoloadGenerator;
5
-
6
- /**
7
- * This class locates autoloaders.
8
- */
9
- class Autoloader_Locator {
10
-
11
- /**
12
- * The object for comparing autoloader versions.
13
- *
14
- * @var Version_Selector
15
- */
16
- private $version_selector;
17
-
18
- /**
19
- * The constructor.
20
- *
21
- * @param Version_Selector $version_selector The version selector object.
22
- */
23
- public function __construct( $version_selector ) {
24
- $this->version_selector = $version_selector;
25
- }
26
-
27
- /**
28
- * Finds the path to the plugin with the latest autoloader.
29
- *
30
- * @param array $plugin_paths An array of plugin paths.
31
- * @param string $latest_version The latest version reference.
32
- *
33
- * @return string|null
34
- */
35
- public function find_latest_autoloader( $plugin_paths, &$latest_version ) {
36
- $latest_plugin = null;
37
-
38
- foreach ( $plugin_paths as $plugin_path ) {
39
- $version = $this->get_autoloader_version( $plugin_path );
40
- if ( ! $this->version_selector->is_version_update_required( $latest_version, $version ) ) {
41
- continue;
42
- }
43
-
44
- $latest_version = $version;
45
- $latest_plugin = $plugin_path;
46
- }
47
-
48
- return $latest_plugin;
49
- }
50
-
51
- /**
52
- * Gets the path to the autoloader.
53
- *
54
- * @param string $plugin_path The path to the plugin.
55
- *
56
- * @return string
57
- */
58
- public function get_autoloader_path( $plugin_path ) {
59
- return trailingslashit( $plugin_path ) . 'vendor/autoload_packages.php';
60
- }
61
-
62
- /**
63
- * Gets the version for the autoloader.
64
- *
65
- * @param string $plugin_path The path to the plugin.
66
- *
67
- * @return string|null
68
- */
69
- public function get_autoloader_version( $plugin_path ) {
70
- $classmap = trailingslashit( $plugin_path ) . 'vendor/composer/jetpack_autoload_classmap.php';
71
- if ( ! file_exists( $classmap ) ) {
72
- return null;
73
- }
74
-
75
- $classmap = require $classmap;
76
- if ( isset( $classmap[ AutoloadGenerator::class ] ) ) {
77
- return $classmap[ AutoloadGenerator::class ]['version'];
78
- }
79
-
80
- return null;
81
- }
82
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/automattic/jetpack-autoloader/src/class-autoloader.php DELETED
@@ -1,82 +0,0 @@
1
- <?php
2
- /* HEADER */ // phpcs:ignore
3
-
4
- /**
5
- * This class handles management of the actual PHP autoloader.
6
- */
7
- class Autoloader {
8
-
9
- /**
10
- * Checks to see whether or not the autoloader should be initialized and then initializes it if so.
11
- *
12
- * @param Container|null $container The container we want to use for autoloader initialization. If none is given
13
- * then a container will be created automatically.
14
- */
15
- public static function init( $container = null ) {
16
- // The container holds and manages the lifecycle of our dependencies
17
- // to make them easier to work with and increase flexibility.
18
- if ( ! isset( $container ) ) {
19
- require_once __DIR__ . '/class-container.php';
20
- $container = new Container();
21
- }
22
-
23
- // phpcs:disable Generic.Commenting.DocComment.MissingShort
24
-
25
- /** @var Autoloader_Handler $autoloader_handler */
26
- $autoloader_handler = $container->get( Autoloader_Handler::class );
27
-
28
- // If the autoloader is already initializing it means that it has included us as the latest.
29
- $was_included_by_autoloader = $autoloader_handler->is_initializing();
30
-
31
- /** @var Plugin_Locator $plugin_locator */
32
- $plugin_locator = $container->get( Plugin_Locator::class );
33
-
34
- /** @var Plugins_Handler $plugins_handler */
35
- $plugins_handler = $container->get( Plugins_Handler::class );
36
-
37
- // The current plugin is the one that we are attempting to initialize here.
38
- $current_plugin = $plugin_locator->find_current_plugin();
39
-
40
- // The active plugins are those that we were able to discover on the site. This list will not
41
- // include mu-plugins, those activated by code, or those who are hidden by filtering. We also
42
- // want to take care to not consider the current plugin unknown if it was included by an
43
- // autoloader. This avoids the case where a plugin will be marked "active" while deactivated
44
- // due to it having the latest autoloader.
45
- $active_plugins = $plugins_handler->get_active_plugins( true, ! $was_included_by_autoloader );
46
-
47
- // The cached plugins are all of those that were active or discovered by the autoloader during a previous request.
48
- // Note that it's possible this list will include plugins that have since been deactivated, but after a request
49
- // the cache should be updated and the deactivated plugins will be removed.
50
- $cached_plugins = $plugins_handler->get_cached_plugins();
51
-
52
- // We combine the active list and cached list to preemptively load classes for plugins that are
53
- // presently unknown but will be loaded during the request. While this may result in us considering packages in
54
- // deactivated plugins there shouldn't be any problems as a result and the eventual consistency is sufficient.
55
- $all_plugins = array_merge( $active_plugins, $cached_plugins );
56
-
57
- // In particular we also include the current plugin to address the case where it is the latest autoloader
58
- // but also unknown (and not cached). We don't want it in the active list because we don't know that it
59
- // is active but we need it in the all plugins list so that it is considered by the autoloader.
60
- $all_plugins[] = $current_plugin;
61
-
62
- // We require uniqueness in the array to avoid processing the same plugin more than once.
63
- $all_plugins = array_values( array_unique( $all_plugins ) );
64
-
65
- /** @var Latest_Autoloader_Guard $guard */
66
- $guard = $container->get( Latest_Autoloader_Guard::class );
67
- if ( $guard->should_stop_init( $current_plugin, $all_plugins, $was_included_by_autoloader ) ) {
68
- return;
69
- }
70
-
71
- // Initialize the autoloader using the handler now that we're ready.
72
- $autoloader_handler->activate_autoloader( $all_plugins );
73
-
74
- /** @var Hook_Manager $hook_manager */
75
- $hook_manager = $container->get( Hook_Manager::class );
76
-
77
- // Register a shutdown handler to clean up the autoloader.
78
- $hook_manager->add_action( 'shutdown', new Shutdown_Handler( $plugins_handler, $cached_plugins, $was_included_by_autoloader ) );
79
-
80
- // phpcs:enable Generic.Commenting.DocComment.MissingShort
81
- }
82
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/automattic/jetpack-autoloader/src/class-container.php DELETED
@@ -1,142 +0,0 @@
1
- <?php
2
- /* HEADER */ // phpcs:ignore
3
-
4
- /**
5
- * This class manages the files and dependencies of the autoloader.
6
- */
7
- class Container {
8
-
9
- /**
10
- * Since each autoloader's class files exist within their own namespace we need a map to
11
- * convert between the local class and a shared key. Note that no version checking is
12
- * performed on these dependencies and the first autoloader to register will be the
13
- * one that is utilized.
14
- */
15
- const SHARED_DEPENDENCY_KEYS = array(
16
- Hook_Manager::class => 'Hook_Manager',
17
- );
18
-
19
- /**
20
- * A map of all the dependencies we've registered with the container and created.
21
- *
22
- * @var array
23
- */
24
- protected $dependencies;
25
-
26
- /**
27
- * The constructor.
28
- */
29
- public function __construct() {
30
- $this->dependencies = array();
31
-
32
- $this->register_shared_dependencies();
33
- $this->register_dependencies();
34
- $this->initialize_globals();
35
- }
36
-
37
- /**
38
- * Gets a dependency out of the container.
39
- *
40
- * @param string $class The class to fetch.
41
- *
42
- * @return mixed
43
- * @throws \InvalidArgumentException When a class that isn't registered with the container is fetched.
44
- */
45
- public function get( $class ) {
46
- if ( ! isset( $this->dependencies[ $class ] ) ) {
47
- throw new \InvalidArgumentException( "Class '$class' is not registered with the container." );
48
- }
49
-
50
- return $this->dependencies[ $class ];
51
- }
52
-
53
- /**
54
- * Registers all of the dependencies that are shared between all instances of the autoloader.
55
- */
56
- private function register_shared_dependencies() {
57
- global $jetpack_autoloader_container_shared;
58
- if ( ! isset( $jetpack_autoloader_container_shared ) ) {
59
- $jetpack_autoloader_container_shared = array();
60
- }
61
-
62
- $key = self::SHARED_DEPENDENCY_KEYS[ Hook_Manager::class ];
63
- if ( ! isset( $jetpack_autoloader_container_shared[ $key ] ) ) {
64
- require_once __DIR__ . '/class-hook-manager.php';
65
- $jetpack_autoloader_container_shared[ $key ] = new Hook_Manager();
66
- }
67
- $this->dependencies[ Hook_Manager::class ] = &$jetpack_autoloader_container_shared[ $key ];
68
- }
69
-
70
- /**
71
- * Registers all of the dependencies with the container.
72
- */
73
- private function register_dependencies() {
74
- require_once __DIR__ . '/class-path-processor.php';
75
- $this->dependencies[ Path_Processor::class ] = new Path_Processor();
76
-
77
- require_once __DIR__ . '/class-plugin-locator.php';
78
- $this->dependencies[ Plugin_Locator::class ] = new Plugin_Locator(
79
- $this->get( Path_Processor::class )
80
- );
81
-
82
- require_once __DIR__ . '/class-version-selector.php';
83
- $this->dependencies[ Version_Selector::class ] = new Version_Selector();
84
-
85
- require_once __DIR__ . '/class-autoloader-locator.php';
86
- $this->dependencies[ Autoloader_Locator::class ] = new Autoloader_Locator(
87
- $this->get( Version_Selector::class )
88
- );
89
-
90
- require_once __DIR__ . '/class-php-autoloader.php';
91
- $this->dependencies[ PHP_Autoloader::class ] = new PHP_Autoloader();
92
-
93
- require_once __DIR__ . '/class-manifest-reader.php';
94
- $this->dependencies[ Manifest_Reader::class ] = new Manifest_Reader(
95
- $this->get( Version_Selector::class )
96
- );
97
-
98
- require_once __DIR__ . '/class-plugins-handler.php';
99
- $this->dependencies[ Plugins_Handler::class ] = new Plugins_Handler(
100
- $this->get( Plugin_Locator::class ),
101
- $this->get( Path_Processor::class )
102
- );
103
-
104
- require_once __DIR__ . '/class-autoloader-handler.php';
105
- $this->dependencies[ Autoloader_Handler::class ] = new Autoloader_Handler(
106
- $this->get( PHP_Autoloader::class ),
107
- $this->get( Hook_Manager::class ),
108
- $this->get( Manifest_Reader::class ),
109
- $this->get( Version_Selector::class )
110
- );
111
-
112
- require_once __DIR__ . '/class-latest-autoloader-guard.php';
113
- $this->dependencies[ Latest_Autoloader_Guard::class ] = new Latest_Autoloader_Guard(
114
- $this->get( Plugins_Handler::class ),
115
- $this->get( Autoloader_Handler::class ),
116
- $this->get( Autoloader_Locator::class )
117
- );
118
-
119
- // Register any classes that we will use elsewhere.
120
- require_once __DIR__ . '/class-version-loader.php';
121
- require_once __DIR__ . '/class-shutdown-handler.php';
122
- }
123
-
124
- /**
125
- * Initializes any of the globals needed by the autoloader.
126
- */
127
- private function initialize_globals() {
128
- /*
129
- * This global was retired in version 2.9. The value is set to 'false' to maintain
130
- * compatibility with older versions of the autoloader.
131
- */
132
- global $jetpack_autoloader_including_latest;
133
- $jetpack_autoloader_including_latest = false;
134
-
135
- // Not all plugins can be found using the locator. In cases where a plugin loads the autoloader
136
- // but was not discoverable, we will record them in this array to track them as "active".
137
- global $jetpack_autoloader_activating_plugins_paths;
138
- if ( ! isset( $jetpack_autoloader_activating_plugins_paths ) ) {
139
- $jetpack_autoloader_activating_plugins_paths = array();
140
- }
141
- }
142
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/automattic/jetpack-autoloader/src/class-hook-manager.php DELETED
@@ -1,68 +0,0 @@
1
- <?php
2
- /* HEADER */ // phpcs:ignore
3
-
4
- /**
5
- * Allows the latest autoloader to register hooks that can be removed when the autoloader is reset.
6
- */
7
- class Hook_Manager {
8
-
9
- /**
10
- * An array containing all of the hooks that we've registered.
11
- *
12
- * @var array
13
- */
14
- private $registered_hooks;
15
-
16
- /**
17
- * The constructor.
18
- */
19
- public function __construct() {
20
- $this->registered_hooks = array();
21
- }
22
-
23
- /**
24
- * Adds an action to WordPress and registers it internally.
25
- *
26
- * @param string $tag The name of the action which is hooked.
27
- * @param callable $callable The function to call.
28
- * @param int $priority Used to specify the priority of the action.
29
- * @param int $accepted_args Used to specify the number of arguments the callable accepts.
30
- */
31
- public function add_action( $tag, $callable, $priority = 10, $accepted_args = 1 ) {
32
- $this->registered_hooks[ $tag ][] = array(
33
- 'priority' => $priority,
34
- 'callable' => $callable,
35
- );
36
-
37
- add_action( $tag, $callable, $priority, $accepted_args );
38
- }
39
-
40
- /**
41
- * Adds a filter to WordPress and registers it internally.
42
- *
43
- * @param string $tag The name of the filter which is hooked.
44
- * @param callable $callable The function to call.
45
- * @param int $priority Used to specify the priority of the filter.
46
- * @param int $accepted_args Used to specify the number of arguments the callable accepts.
47
- */
48
- public function add_filter( $tag, $callable, $priority = 10, $accepted_args = 1 ) {
49
- $this->registered_hooks[ $tag ][] = array(
50
- 'priority' => $priority,
51
- 'callable' => $callable,
52
- );
53
-
54
- add_filter( $tag, $callable, $priority, $accepted_args );
55
- }
56
-
57
- /**
58
- * Removes all of the registered hooks.
59
- */
60
- public function reset() {
61
- foreach ( $this->registered_hooks as $tag => $hooks ) {
62
- foreach ( $hooks as $hook ) {
63
- remove_filter( $tag, $hook['callable'], $hook['priority'] );
64
- }
65
- }
66
- $this->registered_hooks = array();
67
- }
68
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/automattic/jetpack-autoloader/src/class-latest-autoloader-guard.php DELETED
@@ -1,78 +0,0 @@
1
- <?php
2
- /* HEADER */ // phpcs:ignore
3
-
4
- /**
5
- * This class ensures that we're only executing the latest autoloader.
6
- */
7
- class Latest_Autoloader_Guard {
8
-
9
- /**
10
- * The Plugins_Handler instance.
11
- *
12
- * @var Plugins_Handler
13
- */
14
- private $plugins_handler;
15
-
16
- /**
17
- * The Autoloader_Handler instance.
18
- *
19
- * @var Autoloader_Handler
20
- */
21
- private $autoloader_handler;
22
-
23
- /**
24
- * The Autoloader_locator instance.
25
- *
26
- * @var Autoloader_Locator
27
- */
28
- private $autoloader_locator;
29
-
30
- /**
31
- * The constructor.
32
- *
33
- * @param Plugins_Handler $plugins_handler The Plugins_Handler instance.
34
- * @param Autoloader_Handler $autoloader_handler The Autoloader_Handler instance.
35
- * @param Autoloader_Locator $autoloader_locator The Autoloader_Locator instance.
36
- */
37
- public function __construct( $plugins_handler, $autoloader_handler, $autoloader_locator ) {
38
- $this->plugins_handler = $plugins_handler;
39
- $this->autoloader_handler = $autoloader_handler;
40
- $this->autoloader_locator = $autoloader_locator;
41
- }
42
-
43
- /**
44
- * Indicates whether or not the autoloader should be initialized. Note that this function
45
- * has the side-effect of actually loading the latest autoloader in the event that this
46
- * is not it.
47
- *
48
- * @param string $current_plugin The current plugin we're checking.
49
- * @param string[] $plugins The active plugins to check for autoloaders in.
50
- * @param bool $was_included_by_autoloader Indicates whether or not this autoloader was included by another.
51
- *
52
- * @return bool True if we should stop initialization, otherwise false.
53
- */
54
- public function should_stop_init( $current_plugin, $plugins, $was_included_by_autoloader ) {
55
- global $jetpack_autoloader_latest_version;
56
-
57
- // We need to reset the autoloader when the plugins change because
58
- // that means the autoloader was generated with a different list.
59
- if ( $this->plugins_handler->have_plugins_changed( $plugins ) ) {
60
- $this->autoloader_handler->reset_autoloader();
61
- }
62
-
63
- // When the latest autoloader has already been found we don't need to search for it again.
64
- // We should take care however because this will also trigger if the autoloader has been
65
- // included by an older one.
66
- if ( isset( $jetpack_autoloader_latest_version ) && ! $was_included_by_autoloader ) {
67
- return true;
68
- }
69
-
70
- $latest_plugin = $this->autoloader_locator->find_latest_autoloader( $plugins, $jetpack_autoloader_latest_version );
71
- if ( isset( $latest_plugin ) && $latest_plugin !== $current_plugin ) {
72
- require $this->autoloader_locator->get_autoloader_path( $latest_plugin );
73
- return true;
74
- }
75
-
76
- return false;
77
- }
78
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/automattic/jetpack-autoloader/src/class-manifest-reader.php DELETED
@@ -1,91 +0,0 @@
1
- <?php
2
- /* HEADER */ // phpcs:ignore
3
-
4
- /**
5
- * This class reads autoloader manifest files.
6
- */
7
- class Manifest_Reader {
8
-
9
- /**
10
- * The Version_Selector object.
11
- *
12
- * @var Version_Selector
13
- */
14
- private $version_selector;
15
-
16
- /**
17
- * The constructor.
18
- *
19
- * @param Version_Selector $version_selector The Version_Selector object.
20
- */
21
- public function __construct( $version_selector ) {
22
- $this->version_selector = $version_selector;
23
- }
24
-
25
- /**
26
- * Reads all of the manifests in the given plugin paths.
27
- *
28
- * @param array $plugin_paths The paths to the plugins we're loading the manifest in.
29
- * @param string $manifest_path The path that we're loading the manifest from in each plugin.
30
- * @param array $path_map The path map to add the contents of the manifests to.
31
- *
32
- * @return array $path_map The path map we've built using the manifests in each plugin.
33
- */
34
- public function read_manifests( $plugin_paths, $manifest_path, &$path_map ) {
35
- $file_paths = array_map(
36
- function ( $path ) use ( $manifest_path ) {
37
- return trailingslashit( $path ) . $manifest_path;
38
- },
39
- $plugin_paths
40
- );
41
-
42
- foreach ( $file_paths as $path ) {
43
- $this->register_manifest( $path, $path_map );
44
- }
45
-
46
- return $path_map;
47
- }
48
-
49
- /**
50
- * Registers a plugin's manifest file with the path map.
51
- *
52
- * @param string $manifest_path The absolute path to the manifest that we're loading.
53
- * @param array $path_map The path map to add the contents of the manifest to.
54
- */
55
- protected function register_manifest( $manifest_path, &$path_map ) {
56
- if ( ! is_readable( $manifest_path ) ) {
57
- return;
58
- }
59
-
60
- $manifest = require $manifest_path;
61
- if ( ! is_array( $manifest ) ) {
62
- return;
63
- }
64
-
65
- foreach ( $manifest as $key => $data ) {
66
- $this->register_record( $key, $data, $path_map );
67
- }
68
- }
69
-
70
- /**
71
- * Registers an entry from the manifest in the path map.
72
- *
73
- * @param string $key The identifier for the entry we're registering.
74
- * @param array $data The data for the entry we're registering.
75
- * @param array $path_map The path map to add the contents of the manifest to.
76
- */
77
- protected function register_record( $key, $data, &$path_map ) {
78
- if ( isset( $path_map[ $key ]['version'] ) ) {
79
- $selected_version = $path_map[ $key ]['version'];
80
- } else {
81
- $selected_version = null;
82
- }
83
-
84
- if ( $this->version_selector->is_version_update_required( $selected_version, $data['version'] ) ) {
85
- $path_map[ $key ] = array(
86
- 'version' => $data['version'],
87
- 'path' => $data['path'],
88
- );
89
- }
90
- }
91
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/automattic/jetpack-autoloader/src/class-path-processor.php DELETED
@@ -1,186 +0,0 @@
1
- <?php
2
- /* HEADER */ // phpcs:ignore
3
-
4
- /**
5
- * This class handles dealing with paths for the autoloader.
6
- */
7
- class Path_Processor {
8
- /**
9
- * Given a path this will replace any of the path constants with a token to represent it.
10
- *
11
- * @param string $path The path we want to process.
12
- *
13
- * @return string The tokenized path.
14
- */
15
- public function tokenize_path_constants( $path ) {
16
- $path = wp_normalize_path( $path );
17
-
18
- $constants = $this->get_normalized_constants();
19
- foreach ( $constants as $constant => $constant_path ) {
20
- $len = strlen( $constant_path );
21
- if ( substr( $path, 0, $len ) !== $constant_path ) {
22
- continue;
23
- }
24
-
25
- return substr_replace( $path, '{{' . $constant . '}}', 0, $len );
26
- }
27
-
28
- return $path;
29
- }
30
-
31
- /**
32
- * Given a path this will replace any of the path constant tokens with the expanded path.
33
- *
34
- * @param string $tokenized_path The path we want to process.
35
- *
36
- * @return string The expanded path.
37
- */
38
- public function untokenize_path_constants( $tokenized_path ) {
39
- $tokenized_path = wp_normalize_path( $tokenized_path );
40
-
41
- $constants = $this->get_normalized_constants();
42
- foreach ( $constants as $constant => $constant_path ) {
43
- $constant = '{{' . $constant . '}}';
44
-
45
- $len = strlen( $constant );
46
- if ( substr( $tokenized_path, 0, $len ) !== $constant ) {
47
- continue;
48
- }
49
-
50
- return $this->get_real_path( substr_replace( $tokenized_path, $constant_path, 0, $len ) );
51
- }
52
-
53
- return $tokenized_path;
54
- }
55
-
56
- /**
57
- * Given a file and an array of places it might be, this will find the absolute path and return it.
58
- *
59
- * @param string $file The plugin or theme file to resolve.
60
- * @param array $directories_to_check The directories we should check for the file if it isn't an absolute path.
61
- *
62
- * @return string|false Returns the absolute path to the directory, otherwise false.
63
- */
64
- public function find_directory_with_autoloader( $file, $directories_to_check ) {
65
- $file = wp_normalize_path( $file );
66
-
67
- if ( ! $this->is_absolute_path( $file ) ) {
68
- $file = $this->find_absolute_plugin_path( $file, $directories_to_check );
69
- if ( ! isset( $file ) ) {
70
- return false;
71
- }
72
- }
73
-
74
- // We need the real path for consistency with __DIR__ paths.
75
- $file = $this->get_real_path( $file );
76
-
77
- // phpcs:disable WordPress.PHP.NoSilencedErrors.Discouraged
78
- $directory = @is_file( $file ) ? dirname( $file ) : $file;
79
- if ( ! @is_file( $directory . '/vendor/composer/jetpack_autoload_classmap.php' ) ) {
80
- return false;
81
- }
82
- // phpcs:enable WordPress.PHP.NoSilencedErrors.Discouraged
83
-
84
- return $directory;
85
- }
86
-
87
- /**
88
- * Fetches an array of normalized paths keyed by the constant they came from.
89
- *
90
- * @return string[] The normalized paths keyed by the constant.
91
- */
92
- private function get_normalized_constants() {
93
- $raw_constants = array(
94
- // Order the constants from most-specific to least-specific.
95
- 'WP_PLUGIN_DIR',
96
- 'WPMU_PLUGIN_DIR',
97
- 'WP_CONTENT_DIR',
98
- 'ABSPATH',
99
- );
100
-
101
- $constants = array();
102
- foreach ( $raw_constants as $raw ) {
103
- if ( ! defined( $raw ) ) {
104
- continue;
105
- }
106
-
107
- $path = wp_normalize_path( constant( $raw ) );
108
- if ( isset( $path ) ) {
109
- $constants[ $raw ] = $path;
110
- }
111
- }
112
-
113
- return $constants;
114
- }
115
-
116
- /**
117
- * Indicates whether or not a path is absolute.
118
- *
119
- * @param string $path The path to check.
120
- *
121
- * @return bool True if the path is absolute, otherwise false.
122
- */
123
- private function is_absolute_path( $path ) {
124
- if ( 0 === strlen( $path ) || '.' === $path[0] ) {
125
- return false;
126
- }
127
-
128
- // Absolute paths on Windows may begin with a drive letter.
129
- if ( preg_match( '/^[a-zA-Z]:[\/\\\\]/', $path ) ) {
130
- return true;
131
- }
132
-
133
- // A path starting with / or \ is absolute; anything else is relative.
134
- return ( '/' === $path[0] || '\\' === $path[0] );
135
- }
136
-
137
- /**
138
- * Given a file and a list of directories to check, this method will try to figure out
139
- * the absolute path to the file in question.
140
- *
141
- * @param string $normalized_path The normalized path to the plugin or theme file to resolve.
142
- * @param array $directories_to_check The directories we should check for the file if it isn't an absolute path.
143
- *
144
- * @return string|null The absolute path to the plugin file, otherwise null.
145
- */
146
- private function find_absolute_plugin_path( $normalized_path, $directories_to_check ) {
147
- // We're only able to find the absolute path for plugin/theme PHP files.
148
- if ( ! is_string( $normalized_path ) || '.php' !== substr( $normalized_path, -4 ) ) {
149
- return null;
150
- }
151
-
152
- foreach ( $directories_to_check as $directory ) {
153
- $normalized_check = wp_normalize_path( trailingslashit( $directory ) ) . $normalized_path;
154
- // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
155
- if ( @is_file( $normalized_check ) ) {
156
- return $normalized_check;
157
- }
158
- }
159
-
160
- return null;
161
- }
162
-
163
- /**
164
- * Given a path this will figure out the real path that we should be using.
165
- *
166
- * @param string $path The path to resolve.
167
- *
168
- * @return string The resolved path.
169
- */
170
- private function get_real_path( $path ) {
171
- // We want to resolve symbolic links for consistency with __DIR__ paths.
172
- // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
173
- $real_path = @realpath( $path );
174
- if ( false === $real_path ) {
175
- // Let the autoloader deal with paths that don't exist.
176
- $real_path = $path;
177
- }
178
-
179
- // Using realpath will make it platform-specific so we must normalize it after.
180
- if ( $path !== $real_path ) {
181
- $real_path = wp_normalize_path( $real_path );
182
- }
183
-
184
- return $real_path;
185
- }
186
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/automattic/jetpack-autoloader/src/class-php-autoloader.php DELETED
@@ -1,85 +0,0 @@
1
- <?php
2
- /* HEADER */ // phpcs:ignore
3
-
4
- /**
5
- * This class handles management of the actual PHP autoloader.
6
- */
7
- class PHP_Autoloader {
8
-
9
- /**
10
- * Registers the autoloader with PHP so that it can begin autoloading classes.
11
- *
12
- * @param Version_Loader $version_loader The class loader to use in the autoloader.
13
- */
14
- public function register_autoloader( $version_loader ) {
15
- // Make sure no other autoloaders are registered.
16
- $this->unregister_autoloader();
17
-
18
- // Set the global so that it can be used to load classes.
19
- global $jetpack_autoloader_loader;
20
- $jetpack_autoloader_loader = $version_loader;
21
-
22
- // Ensure that the autoloader is first to avoid contention with others.
23
- spl_autoload_register( array( self::class, 'load_class' ), true, true );
24
- }
25
-
26
- /**
27
- * Unregisters the active autoloader so that it will no longer autoload classes.
28
- */
29
- public function unregister_autoloader() {
30
- // Remove any v2 autoloader that we've already registered.
31
- $autoload_chain = spl_autoload_functions();
32
- if ( ! $autoload_chain ) {
33
- return;
34
- }
35
- foreach ( $autoload_chain as $autoloader ) {
36
- // We can identify a v2 autoloader using the namespace.
37
- $namespace_check = null;
38
-
39
- // Functions are recorded as strings.
40
- if ( is_string( $autoloader ) ) {
41
- $namespace_check = $autoloader;
42
- } elseif ( is_array( $autoloader ) && is_string( $autoloader[0] ) ) {
43
- // Static method calls have the class as the first array element.
44
- $namespace_check = $autoloader[0];
45
- } else {
46
- // Since the autoloader has only ever been a function or a static method we don't currently need to check anything else.
47
- continue;
48
- }
49
-
50
- // Check for the namespace without the generated suffix.
51
- if ( 'Automattic\\Jetpack\\Autoloader\\jp' === substr( $namespace_check, 0, 32 ) ) {
52
- spl_autoload_unregister( $autoloader );
53
- }
54
- }
55
-
56
- // Clear the global now that the autoloader has been unregistered.
57
- global $jetpack_autoloader_loader;
58
- $jetpack_autoloader_loader = null;
59
- }
60
-
61
- /**
62
- * Loads a class file if one could be found.
63
- *
64
- * Note: This function is static so that the autoloader can be easily unregistered. If
65
- * it was a class method we would have to unwrap the object to check the namespace.
66
- *
67
- * @param string $class_name The name of the class to autoload.
68
- *
69
- * @return bool Indicates whether or not a class file was loaded.
70
- */
71
- public static function load_class( $class_name ) {
72
- global $jetpack_autoloader_loader;
73
- if ( ! isset( $jetpack_autoloader_loader ) ) {
74
- return;
75
- }
76
-
77
- $file = $jetpack_autoloader_loader->find_class_file( $class_name );
78
- if ( ! isset( $file ) ) {
79
- return false;
80
- }
81
-
82
- require $file;
83
- return true;
84
- }
85
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/automattic/jetpack-autoloader/src/class-plugin-locator.php DELETED
@@ -1,148 +0,0 @@
1
- <?php
2
- /* HEADER */ // phpcs:ignore
3
-
4
- /**
5
- * This class scans the WordPress installation to find active plugins.
6
- */
7
- class Plugin_Locator {
8
-
9
- /**
10
- * The path processor for finding plugin paths.
11
- *
12
- * @var Path_Processor
13
- */
14
- private $path_processor;
15
-
16
- /**
17
- * The constructor.
18
- *
19
- * @param Path_Processor $path_processor The Path_Processor instance.
20
- */
21
- public function __construct( $path_processor ) {
22
- $this->path_processor = $path_processor;
23
- }
24
-
25
- /**
26
- * Finds the path to the current plugin.
27
- *
28
- * @return string $path The path to the current plugin.
29
- *
30
- * @throws \RuntimeException If the current plugin does not have an autoloader.
31
- */
32
- public function find_current_plugin() {
33
- // Escape from `vendor/__DIR__` to root plugin directory.
34
- $plugin_directory = dirname( dirname( __DIR__ ) );
35
-
36
- // Use the path processor to ensure that this is an autoloader we're referencing.
37
- $path = $this->path_processor->find_directory_with_autoloader( $plugin_directory, array() );
38
- if ( false === $path ) {
39
- throw new \RuntimeException( 'Failed to locate plugin ' . $plugin_directory );
40
- }
41
-
42
- return $path;
43
- }
44
-
45
- /**
46
- * Checks a given option for plugin paths.
47
- *
48
- * @param string $option_name The option that we want to check for plugin information.
49
- * @param bool $site_option Indicates whether or not we want to check the site option.
50
- *
51
- * @return array $plugin_paths The list of absolute paths we've found.
52
- */
53
- public function find_using_option( $option_name, $site_option = false ) {
54
- $raw = $site_option ? get_site_option( $option_name ) : get_option( $option_name );
55
- if ( false === $raw ) {
56
- return array();
57
- }
58
-
59
- return $this->convert_plugins_to_paths( $raw );
60
- }
61
-
62
- /**
63
- * Checks for plugins in the `action` request parameter.
64
- *
65
- * @param string[] $allowed_actions The actions that we're allowed to return plugins for.
66
- *
67
- * @return array $plugin_paths The list of absolute paths we've found.
68
- */
69
- public function find_using_request_action( $allowed_actions ) {
70
- // phpcs:disable WordPress.Security.NonceVerification.Recommended
71
-
72
- /**
73
- * Note: we're not actually checking the nonce here because it's too early
74
- * in the execution. The pluggable functions are not yet loaded to give
75
- * plugins a chance to plug their versions. Therefore we're doing the bare
76
- * minimum: checking whether the nonce exists and it's in the right place.
77
- * The request will fail later if the nonce doesn't pass the check.
78
- */
79
- if ( empty( $_REQUEST['_wpnonce'] ) ) {
80
- return array();
81
- }
82
-
83
- // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Validated just below.
84
- $action = isset( $_REQUEST['action'] ) ? wp_unslash( $_REQUEST['action'] ) : false;
85
- if ( ! in_array( $action, $allowed_actions, true ) ) {
86
- return array();
87
- }
88
-
89
- $plugin_slugs = array();
90
- switch ( $action ) {
91
- case 'activate':
92
- case 'deactivate':
93
- if ( empty( $_REQUEST['plugin'] ) ) {
94
- break;
95
- }
96
-
97
- // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Validated by convert_plugins_to_paths.
98
- $plugin_slugs[] = wp_unslash( $_REQUEST['plugin'] );
99
- break;
100
-
101
- case 'activate-selected':
102
- case 'deactivate-selected':
103
- if ( empty( $_REQUEST['checked'] ) ) {
104
- break;
105
- }
106
-
107
- // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Validated by convert_plugins_to_paths.
108
- $plugin_slugs = wp_unslash( $_REQUEST['checked'] );
109
- break;
110
- }
111
-
112
- // phpcs:enable WordPress.Security.NonceVerification.Recommended
113
- return $this->convert_plugins_to_paths( $plugin_slugs );
114
- }
115
-
116
- /**
117
- * Given an array of plugin slugs or paths, this will convert them to absolute paths and filter
118
- * out the plugins that are not directory plugins. Note that array keys will also be included
119
- * if they are plugin paths!
120
- *
121
- * @param string[] $plugins Plugin paths or slugs to filter.
122
- *
123
- * @return string[]
124
- */
125
- private function convert_plugins_to_paths( $plugins ) {
126
- if ( ! is_array( $plugins ) || empty( $plugins ) ) {
127
- return array();
128
- }
129
-
130
- // We're going to look for plugins in the standard directories.
131
- $path_constants = array( WP_PLUGIN_DIR, WPMU_PLUGIN_DIR );
132
-
133
- $plugin_paths = array();
134
- foreach ( $plugins as $key => $value ) {
135
- $path = $this->path_processor->find_directory_with_autoloader( $key, $path_constants );
136
- if ( $path ) {
137
- $plugin_paths[] = $path;
138
- }
139
-
140
- $path = $this->path_processor->find_directory_with_autoloader( $value, $path_constants );
141
- if ( $path ) {
142
- $plugin_paths[] = $path;
143
- }
144
- }
145
-
146
- return $plugin_paths;
147
- }
148
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/automattic/jetpack-autoloader/src/class-plugins-handler.php DELETED
@@ -1,156 +0,0 @@
1
- <?php
2
- /* HEADER */ // phpcs:ignore
3
-
4
- /**
5
- * This class handles locating and caching all of the active plugins.
6
- */
7
- class Plugins_Handler {
8
- /**
9
- * The transient key for plugin paths.
10
- */
11
- const TRANSIENT_KEY = 'jetpack_autoloader_plugin_paths';
12
-
13
- /**
14
- * The locator for finding plugins in different locations.
15
- *
16
- * @var Plugin_Locator
17
- */
18
- private $plugin_locator;
19
-
20
- /**
21
- * The processor for transforming cached paths.
22
- *
23
- * @var Path_Processor
24
- */
25
- private $path_processor;
26
-
27
- /**
28
- * The constructor.
29
- *
30
- * @param Plugin_Locator $plugin_locator The locator for finding active plugins.
31
- * @param Path_Processor $path_processor The processor for transforming cached paths.
32
- */
33
- public function __construct( $plugin_locator, $path_processor ) {
34
- $this->plugin_locator = $plugin_locator;
35
- $this->path_processor = $path_processor;
36
- }
37
-
38
- /**
39
- * Gets all of the active plugins we can find.
40
- *
41
- * @param bool $include_deactivating When true, plugins deactivating this request will be considered active.
42
- * @param bool $record_unknown When true, the current plugin will be marked as active and recorded when unknown.
43
- *
44
- * @return string[]
45
- */
46
- public function get_active_plugins( $include_deactivating, $record_unknown ) {
47
- global $jetpack_autoloader_activating_plugins_paths;
48
-
49
- // We're going to build a unique list of plugins from a few different sources
50
- // to find all of our "active" plugins. While we need to return an integer
51
- // array, we're going to use an associative array internally to reduce
52
- // the amount of time that we're going to spend checking uniqueness
53
- // and merging different arrays together to form the output.
54
- $active_plugins = array();
55
-
56
- // Make sure that plugins which have activated this request are considered as "active" even though
57
- // they probably won't be present in any option.
58
- if ( is_array( $jetpack_autoloader_activating_plugins_paths ) ) {
59
- foreach ( $jetpack_autoloader_activating_plugins_paths as $path ) {
60
- $active_plugins[ $path ] = $path;
61
- }
62
- }
63
-
64
- // This option contains all of the plugins that have been activated.
65
- $plugins = $this->plugin_locator->find_using_option( 'active_plugins' );
66
- foreach ( $plugins as $path ) {
67
- $active_plugins[ $path ] = $path;
68
- }
69
-
70
- // This option contains all of the multisite plugins that have been activated.
71
- if ( is_multisite() ) {
72
- $plugins = $this->plugin_locator->find_using_option( 'active_sitewide_plugins', true );
73
- foreach ( $plugins as $path ) {
74
- $active_plugins[ $path ] = $path;
75
- }
76
- }
77
-
78
- // These actions contain plugins that are being activated/deactivated during this request.
79
- $plugins = $this->plugin_locator->find_using_request_action( array( 'activate', 'activate-selected', 'deactivate', 'deactivate-selected' ) );
80
- foreach ( $plugins as $path ) {
81
- $active_plugins[ $path ] = $path;
82
- }
83
-
84
- // When the current plugin isn't considered "active" there's a problem.
85
- // Since we're here, the plugin is active and currently being loaded.
86
- // We can support this case (mu-plugins and non-standard activation)
87
- // by adding the current plugin to the active list and marking it
88
- // as an unknown (activating) plugin. This also has the benefit
89
- // of causing a reset because the active plugins list has
90
- // been changed since it was saved in the global.
91
- $current_plugin = $this->plugin_locator->find_current_plugin();
92
- if ( $record_unknown && ! in_array( $current_plugin, $active_plugins, true ) ) {
93
- $active_plugins[ $current_plugin ] = $current_plugin;
94
- $jetpack_autoloader_activating_plugins_paths[] = $current_plugin;
95
- }
96
-
97
- // When deactivating plugins aren't desired we should entirely remove them from the active list.
98
- if ( ! $include_deactivating ) {
99
- // These actions contain plugins that are being deactivated during this request.
100
- $plugins = $this->plugin_locator->find_using_request_action( array( 'deactivate', 'deactivate-selected' ) );
101
- foreach ( $plugins as $path ) {
102
- unset( $active_plugins[ $path ] );
103
- }
104
- }
105
-
106
- // Transform the array so that we don't have to worry about the keys interacting with other array types later.
107
- return array_values( $active_plugins );
108
- }
109
-
110
- /**
111
- * Gets all of the cached plugins if there are any.
112
- *
113
- * @return string[]
114
- */
115
- public function get_cached_plugins() {
116
- $cached = get_transient( self::TRANSIENT_KEY );
117
- if ( ! is_array( $cached ) || empty( $cached ) ) {
118
- return array();
119
- }
120
-
121
- // We need to expand the tokens to an absolute path for this webserver.
122
- return array_map( array( $this->path_processor, 'untokenize_path_constants' ), $cached );
123
- }
124
-
125
- /**
126
- * Saves the plugin list to the cache.
127
- *
128
- * @param array $plugins The plugin list to save to the cache.
129
- */
130
- public function cache_plugins( $plugins ) {
131
- // We store the paths in a tokenized form so that that webservers with different absolute paths don't break.
132
- $plugins = array_map( array( $this->path_processor, 'tokenize_path_constants' ), $plugins );
133
-
134
- set_transient( self::TRANSIENT_KEY, $plugins );
135
- }
136
-
137
- /**
138
- * Checks to see whether or not the plugin list given has changed when compared to the
139
- * shared `$jetpack_autoloader_cached_plugin_paths` global. This allows us to deal
140
- * with cases where the active list may change due to filtering..
141
- *
142
- * @param string[] $plugins The plugins list to check against the global cache.
143
- *
144
- * @return bool True if the plugins have changed, otherwise false.
145
- */
146
- public function have_plugins_changed( $plugins ) {
147
- global $jetpack_autoloader_cached_plugin_paths;
148
-
149
- if ( $jetpack_autoloader_cached_plugin_paths !== $plugins ) {
150
- $jetpack_autoloader_cached_plugin_paths = $plugins;
151
- return true;
152
- }
153
-
154
- return false;
155
- }
156
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/automattic/jetpack-autoloader/src/class-shutdown-handler.php DELETED
@@ -1,84 +0,0 @@
1
- <?php
2
- /* HEADER */ // phpcs:ignore
3
-
4
- /**
5
- * This class handles the shutdown of the autoloader.
6
- */
7
- class Shutdown_Handler {
8
-
9
- /**
10
- * The Plugins_Handler instance.
11
- *
12
- * @var Plugins_Handler
13
- */
14
- private $plugins_handler;
15
-
16
- /**
17
- * The plugins cached by this autoloader.
18
- *
19
- * @var string[]
20
- */
21
- private $cached_plugins;
22
-
23
- /**
24
- * Indicates whether or not this autoloader was included by another.
25
- *
26
- * @var bool
27
- */
28
- private $was_included_by_autoloader;
29
-
30
- /**
31
- * Constructor.
32
- *
33
- * @param Plugins_Handler $plugins_handler The Plugins_Handler instance to use.
34
- * @param string[] $cached_plugins The plugins cached by the autoloaer.
35
- * @param bool $was_included_by_autoloader Indicates whether or not the autoloader was included by another.
36
- */
37
- public function __construct( $plugins_handler, $cached_plugins, $was_included_by_autoloader ) {
38
- $this->plugins_handler = $plugins_handler;
39
- $this->cached_plugins = $cached_plugins;
40
- $this->was_included_by_autoloader = $was_included_by_autoloader;
41
- }
42
-
43
- /**
44
- * Handles the shutdown of the autoloader.
45
- */
46
- public function __invoke() {
47
- // Don't save a broken cache if an error happens during some plugin's initialization.
48
- if ( ! did_action( 'plugins_loaded' ) ) {
49
- // Ensure that the cache is emptied to prevent consecutive failures if the cache is to blame.
50
- if ( ! empty( $this->cached_plugins ) ) {
51
- $this->plugins_handler->cache_plugins( array() );
52
- }
53
-
54
- return;
55
- }
56
-
57
- // Load the active plugins fresh since the list we pulled earlier might not contain
58
- // plugins that were activated but did not reset the autoloader. This happens
59
- // when a plugin is in the cache but not "active" when the autoloader loads.
60
- // We also want to make sure that plugins which are deactivating are not
61
- // considered "active" so that they will be removed from the cache now.
62
- try {
63
- $active_plugins = $this->plugins_handler->get_active_plugins( false, ! $this->was_included_by_autoloader );
64
- } catch ( \Exception $ex ) {
65
- // When the package is deleted before shutdown it will throw an exception.
66
- // In the event this happens we should erase the cache.
67
- if ( ! empty( $this->cached_plugins ) ) {
68
- $this->plugins_handler->cache_plugins( array() );
69
- }
70
- return;
71
- }
72
-
73
- // The paths should be sorted for easy comparisons with those loaded from the cache.
74
- // Note we don't need to sort the cached entries because they're already sorted.
75
- sort( $active_plugins );
76
-
77
- // We don't want to waste time saving a cache that hasn't changed.
78
- if ( $this->cached_plugins === $active_plugins ) {
79
- return;
80
- }
81
-
82
- $this->plugins_handler->cache_plugins( $active_plugins );
83
- }
84
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/automattic/jetpack-autoloader/src/class-version-loader.php DELETED
@@ -1,156 +0,0 @@
1
- <?php
2
- /* HEADER */ // phpcs:ignore
3
-
4
- /**
5
- * This class loads other classes based on given parameters.
6
- */
7
- class Version_Loader {
8
-
9
- /**
10
- * The Version_Selector object.
11
- *
12
- * @var Version_Selector
13
- */
14
- private $version_selector;
15
-
16
- /**
17
- * A map of available classes and their version and file path.
18
- *
19
- * @var array
20
- */
21
- private $classmap;
22
-
23
- /**
24
- * A map of PSR-4 namespaces and their version and directory path.
25
- *
26
- * @var array
27
- */
28
- private $psr4_map;
29
-
30
- /**
31
- * A map of all the files that we should load.
32
- *
33
- * @var array
34
- */
35
- private $filemap;
36
-
37
- /**
38
- * The constructor.
39
- *
40
- * @param Version_Selector $version_selector The Version_Selector object.
41
- * @param array $classmap The verioned classmap to load using.
42
- * @param array $psr4_map The versioned PSR-4 map to load using.
43
- * @param array $filemap The versioned filemap to load.
44
- */
45
- public function __construct( $version_selector, $classmap, $psr4_map, $filemap ) {
46
- $this->version_selector = $version_selector;
47
- $this->classmap = $classmap;
48
- $this->psr4_map = $psr4_map;
49
- $this->filemap = $filemap;
50
- }
51
-
52
- /**
53
- * Finds the file path for the given class.
54
- *
55
- * @param string $class_name The class to find.
56
- *
57
- * @return string|null $file_path The path to the file if found, null if no class was found.
58
- */
59
- public function find_class_file( $class_name ) {
60
- $data = $this->select_newest_file(
61
- isset( $this->classmap[ $class_name ] ) ? $this->classmap[ $class_name ] : null,
62
- $this->find_psr4_file( $class_name )
63
- );
64
- if ( ! isset( $data ) ) {
65
- return null;
66
- }
67
-
68
- return $data['path'];
69
- }
70
-
71
- /**
72
- * Load all of the files in the filemap.
73
- */
74
- public function load_filemap() {
75
- if ( empty( $this->filemap ) ) {
76
- return;
77
- }
78
-
79
- foreach ( $this->filemap as $file_identifier => $file_data ) {
80
- if ( empty( $GLOBALS['__composer_autoload_files'][ $file_identifier ] ) ) {
81
- require_once $file_data['path'];
82
-
83
- $GLOBALS['__composer_autoload_files'][ $file_identifier ] = true;
84
- }
85
- }
86
- }
87
-
88
- /**
89
- * Compares different class sources and returns the newest.
90
- *
91
- * @param array|null $classmap_data The classmap class data.
92
- * @param array|null $psr4_data The PSR-4 class data.
93
- *
94
- * @return array|null $data
95
- */
96
- private function select_newest_file( $classmap_data, $psr4_data ) {
97
- if ( ! isset( $classmap_data ) ) {
98
- return $psr4_data;
99
- } elseif ( ! isset( $psr4_data ) ) {
100
- return $classmap_data;
101
- }
102
-
103
- if ( $this->version_selector->is_version_update_required( $classmap_data['version'], $psr4_data['version'] ) ) {
104
- return $psr4_data;
105
- }
106
-
107
- return $classmap_data;
108
- }
109
-
110
- /**
111
- * Finds the file for a given class in a PSR-4 namespace.
112
- *
113
- * @param string $class_name The class to find.
114
- *
115
- * @return array|null $data The version and path path to the file if found, null otherwise.
116
- */
117
- private function find_psr4_file( $class_name ) {
118
- if ( ! isset( $this->psr4_map ) ) {
119
- return null;
120
- }
121
-
122
- // Don't bother with classes that have no namespace.
123
- $class_index = strrpos( $class_name, '\\' );
124
- if ( ! $class_index ) {
125
- return null;
126
- }
127
- $class_for_path = str_replace( '\\', '/', $class_name );
128
-
129
- // Search for the namespace by iteratively cutting off the last segment until
130
- // we find a match. This allows us to check the most-specific namespaces
131
- // first as well as minimize the amount of time spent looking.
132
- for (
133
- $class_namespace = substr( $class_name, 0, $class_index );
134
- ! empty( $class_namespace );
135
- $class_namespace = substr( $class_namespace, 0, strrpos( $class_namespace, '\\' ) )
136
- ) {
137
- $namespace = $class_namespace . '\\';
138
- if ( ! isset( $this->psr4_map[ $namespace ] ) ) {
139
- continue;
140
- }
141
- $data = $this->psr4_map[ $namespace ];
142
-
143
- foreach ( $data['path'] as $path ) {
144
- $path .= '/' . substr( $class_for_path, strlen( $namespace ) ) . '.php';
145
- if ( file_exists( $path ) ) {
146
- return array(
147
- 'version' => $data['version'],
148
- 'path' => $path,
149
- );
150
- }
151
- }
152
- }
153
-
154
- return null;
155
- }
156
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/automattic/jetpack-autoloader/src/class-version-selector.php DELETED
@@ -1,61 +0,0 @@
1
- <?php
2
- /* HEADER */ // phpcs:ignore
3
-
4
- /**
5
- * Used to select package versions.
6
- */
7
- class Version_Selector {
8
-
9
- /**
10
- * Checks whether the selected package version should be updated. Composer development
11
- * package versions ('9999999-dev' or versions that start with 'dev-') are favored
12
- * when the JETPACK_AUTOLOAD_DEV constant is set to true.
13
- *
14
- * @param String $selected_version The currently selected package version.
15
- * @param String $compare_version The package version that is being evaluated to
16
- * determine if the version needs to be updated.
17
- *
18
- * @return bool Returns true if the selected package version should be updated,
19
- * else false.
20
- */
21
- public function is_version_update_required( $selected_version, $compare_version ) {
22
- $use_dev_versions = defined( 'JETPACK_AUTOLOAD_DEV' ) && JETPACK_AUTOLOAD_DEV;
23
-
24
- if ( $selected_version === null ) {
25
- return true;
26
- }
27
-
28
- if ( $use_dev_versions && $this->is_dev_version( $selected_version ) ) {
29
- return false;
30
- }
31
-
32
- if ( $this->is_dev_version( $compare_version ) ) {
33
- if ( $use_dev_versions ) {
34
- return true;
35
- } else {
36
- return false;
37
- }
38
- }
39
-
40
- if ( version_compare( $selected_version, $compare_version, '<' ) ) {
41
- return true;
42
- }
43
-
44
- return false;
45
- }
46
-
47
- /**
48
- * Checks whether the given package version is a development version.
49
- *
50
- * @param String $version The package version.
51
- *
52
- * @return bool True if the version is a dev version, else false.
53
- */
54
- public function is_dev_version( $version ) {
55
- if ( 'dev-' === substr( $version, 0, 4 ) || '9999999-dev' === $version ) {
56
- return true;
57
- }
58
-
59
- return false;
60
- }
61
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/InstalledVersions.php CHANGED
@@ -28,7 +28,7 @@ class InstalledVersions
28
  {
29
  /**
30
  * @var mixed[]|null
31
- * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
32
  */
33
  private static $installed;
34
 
@@ -39,7 +39,7 @@ class InstalledVersions
39
 
40
  /**
41
  * @var array[]
42
- * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
43
  */
44
  private static $installedByVendor = array();
45
 
@@ -243,7 +243,7 @@ class InstalledVersions
243
 
244
  /**
245
  * @return array
246
- * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
247
  */
248
  public static function getRootPackage()
249
  {
@@ -257,7 +257,7 @@ class InstalledVersions
257
  *
258
  * @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.
259
  * @return array[]
260
- * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
261
  */
262
  public static function getRawData()
263
  {
@@ -280,7 +280,7 @@ class InstalledVersions
280
  * Returns the raw data of all installed.php which are currently loaded for custom implementations
281
  *
282
  * @return array[]
283
- * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
284
  */
285
  public static function getAllRawData()
286
  {
@@ -303,7 +303,7 @@ class InstalledVersions
303
  * @param array[] $data A vendor/composer/installed.php data set
304
  * @return void
305
  *
306
- * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
307
  */
308
  public static function reload($data)
309
  {
@@ -313,7 +313,7 @@ class InstalledVersions
313
 
314
  /**
315
  * @return array[]
316
- * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
317
  */
318
  private static function getInstalled()
319
  {
28
  {
29
  /**
30
  * @var mixed[]|null
31
+ * @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
32
  */
33
  private static $installed;
34
 
39
 
40
  /**
41
  * @var array[]
42
+ * @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}>}>
43
  */
44
  private static $installedByVendor = array();
45
 
243
 
244
  /**
245
  * @return array
246
+ * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
247
  */
248
  public static function getRootPackage()
249
  {
257
  *
258
  * @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.
259
  * @return array[]
260
+ * @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}>}
261
  */
262
  public static function getRawData()
263
  {
280
  * Returns the raw data of all installed.php which are currently loaded for custom implementations
281
  *
282
  * @return array[]
283
+ * @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}>}>
284
  */
285
  public static function getAllRawData()
286
  {
303
  * @param array[] $data A vendor/composer/installed.php data set
304
  * @return void
305
  *
306
+ * @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
307
  */
308
  public static function reload($data)
309
  {
313
 
314
  /**
315
  * @return array[]
316
+ * @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}>}>
317
  */
318
  private static function getInstalled()
319
  {
vendor/composer/autoload_classmap.php CHANGED
@@ -6,11 +6,6 @@ $vendorDir = dirname(__DIR__);
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
9
- 'Automattic\\Jetpack\\Autoloader\\AutoloadFileWriter' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadFileWriter.php',
10
- 'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php',
11
- 'Automattic\\Jetpack\\Autoloader\\AutoloadProcessor' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadProcessor.php',
12
- 'Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin' => $vendorDir . '/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php',
13
- 'Automattic\\Jetpack\\Autoloader\\ManifestGenerator' => $vendorDir . '/automattic/jetpack-autoloader/src/ManifestGenerator.php',
14
  'Automattic\\WooCommerce\\ActionSchedulerJobFramework\\AbstractChainedJob' => $vendorDir . '/woocommerce/action-scheduler-job-framework/src/AbstractChainedJob.php',
15
  'Automattic\\WooCommerce\\ActionSchedulerJobFramework\\AbstractJob' => $vendorDir . '/woocommerce/action-scheduler-job-framework/src/AbstractJob.php',
16
  'Automattic\\WooCommerce\\ActionSchedulerJobFramework\\ChainedJobInterface' => $vendorDir . '/woocommerce/action-scheduler-job-framework/src/ChainedJobInterface.php',
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
 
 
 
 
 
9
  'Automattic\\WooCommerce\\ActionSchedulerJobFramework\\AbstractChainedJob' => $vendorDir . '/woocommerce/action-scheduler-job-framework/src/AbstractChainedJob.php',
10
  'Automattic\\WooCommerce\\ActionSchedulerJobFramework\\AbstractJob' => $vendorDir . '/woocommerce/action-scheduler-job-framework/src/AbstractJob.php',
11
  'Automattic\\WooCommerce\\ActionSchedulerJobFramework\\ChainedJobInterface' => $vendorDir . '/woocommerce/action-scheduler-job-framework/src/ChainedJobInterface.php',
vendor/composer/autoload_psr4.php CHANGED
@@ -9,5 +9,4 @@ return array(
9
  'SkyVerge\\WooCommerce\\Facebook\\' => array($baseDir . '/includes'),
10
  'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src/Composer/Installers'),
11
  'Automattic\\WooCommerce\\ActionSchedulerJobFramework\\' => array($vendorDir . '/woocommerce/action-scheduler-job-framework/src'),
12
- 'Automattic\\Jetpack\\Autoloader\\' => array($vendorDir . '/automattic/jetpack-autoloader/src'),
13
  );
9
  'SkyVerge\\WooCommerce\\Facebook\\' => array($baseDir . '/includes'),
10
  'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src/Composer/Installers'),
11
  'Automattic\\WooCommerce\\ActionSchedulerJobFramework\\' => array($vendorDir . '/woocommerce/action-scheduler-job-framework/src'),
 
12
  );
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit7a4ce98532f7554f89341184a808a021
6
  {
7
  private static $loader;
8
 
@@ -24,12 +24,12 @@ class ComposerAutoloaderInit7a4ce98532f7554f89341184a808a021
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
- spl_autoload_register(array('ComposerAutoloaderInit7a4ce98532f7554f89341184a808a021', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
29
- spl_autoload_unregister(array('ComposerAutoloaderInit7a4ce98532f7554f89341184a808a021', 'loadClassLoader'));
30
 
31
  require __DIR__ . '/autoload_static.php';
32
- call_user_func(\Composer\Autoload\ComposerStaticInit7a4ce98532f7554f89341184a808a021::getInitializer($loader));
33
 
34
  $loader->register(true);
35
 
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitf1679011dcec7e6e85162030bf6d35f9
6
  {
7
  private static $loader;
8
 
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
+ spl_autoload_register(array('ComposerAutoloaderInitf1679011dcec7e6e85162030bf6d35f9', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
29
+ spl_autoload_unregister(array('ComposerAutoloaderInitf1679011dcec7e6e85162030bf6d35f9', 'loadClassLoader'));
30
 
31
  require __DIR__ . '/autoload_static.php';
32
+ call_user_func(\Composer\Autoload\ComposerStaticInitf1679011dcec7e6e85162030bf6d35f9::getInitializer($loader));
33
 
34
  $loader->register(true);
35
 
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit7a4ce98532f7554f89341184a808a021
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'S' =>
@@ -18,7 +18,6 @@ class ComposerStaticInit7a4ce98532f7554f89341184a808a021
18
  'A' =>
19
  array (
20
  'Automattic\\WooCommerce\\ActionSchedulerJobFramework\\' => 51,
21
- 'Automattic\\Jetpack\\Autoloader\\' => 30,
22
  ),
23
  );
24
 
@@ -35,18 +34,9 @@ class ComposerStaticInit7a4ce98532f7554f89341184a808a021
35
  array (
36
  0 => __DIR__ . '/..' . '/woocommerce/action-scheduler-job-framework/src',
37
  ),
38
- 'Automattic\\Jetpack\\Autoloader\\' =>
39
- array (
40
- 0 => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src',
41
- ),
42
  );
43
 
44
  public static $classMap = array (
45
- 'Automattic\\Jetpack\\Autoloader\\AutoloadFileWriter' => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src/AutoloadFileWriter.php',
46
- 'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php',
47
- 'Automattic\\Jetpack\\Autoloader\\AutoloadProcessor' => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src/AutoloadProcessor.php',
48
- 'Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin' => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php',
49
- 'Automattic\\Jetpack\\Autoloader\\ManifestGenerator' => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src/ManifestGenerator.php',
50
  'Automattic\\WooCommerce\\ActionSchedulerJobFramework\\AbstractChainedJob' => __DIR__ . '/..' . '/woocommerce/action-scheduler-job-framework/src/AbstractChainedJob.php',
51
  'Automattic\\WooCommerce\\ActionSchedulerJobFramework\\AbstractJob' => __DIR__ . '/..' . '/woocommerce/action-scheduler-job-framework/src/AbstractJob.php',
52
  'Automattic\\WooCommerce\\ActionSchedulerJobFramework\\ChainedJobInterface' => __DIR__ . '/..' . '/woocommerce/action-scheduler-job-framework/src/ChainedJobInterface.php',
@@ -253,9 +243,9 @@ class ComposerStaticInit7a4ce98532f7554f89341184a808a021
253
  public static function getInitializer(ClassLoader $loader)
254
  {
255
  return \Closure::bind(function () use ($loader) {
256
- $loader->prefixLengthsPsr4 = ComposerStaticInit7a4ce98532f7554f89341184a808a021::$prefixLengthsPsr4;
257
- $loader->prefixDirsPsr4 = ComposerStaticInit7a4ce98532f7554f89341184a808a021::$prefixDirsPsr4;
258
- $loader->classMap = ComposerStaticInit7a4ce98532f7554f89341184a808a021::$classMap;
259
 
260
  }, null, ClassLoader::class);
261
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitf1679011dcec7e6e85162030bf6d35f9
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'S' =>
18
  'A' =>
19
  array (
20
  'Automattic\\WooCommerce\\ActionSchedulerJobFramework\\' => 51,
 
21
  ),
22
  );
23
 
34
  array (
35
  0 => __DIR__ . '/..' . '/woocommerce/action-scheduler-job-framework/src',
36
  ),
 
 
 
 
37
  );
38
 
39
  public static $classMap = array (
 
 
 
 
 
40
  'Automattic\\WooCommerce\\ActionSchedulerJobFramework\\AbstractChainedJob' => __DIR__ . '/..' . '/woocommerce/action-scheduler-job-framework/src/AbstractChainedJob.php',
41
  'Automattic\\WooCommerce\\ActionSchedulerJobFramework\\AbstractJob' => __DIR__ . '/..' . '/woocommerce/action-scheduler-job-framework/src/AbstractJob.php',
42
  'Automattic\\WooCommerce\\ActionSchedulerJobFramework\\ChainedJobInterface' => __DIR__ . '/..' . '/woocommerce/action-scheduler-job-framework/src/ChainedJobInterface.php',
243
  public static function getInitializer(ClassLoader $loader)
244
  {
245
  return \Closure::bind(function () use ($loader) {
246
+ $loader->prefixLengthsPsr4 = ComposerStaticInitf1679011dcec7e6e85162030bf6d35f9::$prefixLengthsPsr4;
247
+ $loader->prefixDirsPsr4 = ComposerStaticInitf1679011dcec7e6e85162030bf6d35f9::$prefixDirsPsr4;
248
+ $loader->classMap = ComposerStaticInitf1679011dcec7e6e85162030bf6d35f9::$classMap;
249
 
250
  }, null, ClassLoader::class);
251
  }
vendor/composer/installed.json CHANGED
@@ -1,59 +1,5 @@
1
  {
2
  "packages": [
3
- {
4
- "name": "automattic/jetpack-autoloader",
5
- "version": "v2.11.10",
6
- "version_normalized": "2.11.10.0",
7
- "source": {
8
- "type": "git",
9
- "url": "https://github.com/Automattic/jetpack-autoloader.git",
10
- "reference": "0d0835f25c67a814f6f64e0538d8cfa46d7aad70"
11
- },
12
- "dist": {
13
- "type": "zip",
14
- "url": "https://api.github.com/repos/Automattic/jetpack-autoloader/zipball/0d0835f25c67a814f6f64e0538d8cfa46d7aad70",
15
- "reference": "0d0835f25c67a814f6f64e0538d8cfa46d7aad70",
16
- "shasum": ""
17
- },
18
- "require": {
19
- "composer-plugin-api": "^1.1 || ^2.0"
20
- },
21
- "require-dev": {
22
- "automattic/jetpack-changelogger": "^3.2",
23
- "yoast/phpunit-polyfills": "1.0.3"
24
- },
25
- "time": "2022-10-05T17:57:35+00:00",
26
- "type": "composer-plugin",
27
- "extra": {
28
- "autotagger": true,
29
- "class": "Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin",
30
- "mirror-repo": "Automattic/jetpack-autoloader",
31
- "changelogger": {
32
- "link-template": "https://github.com/Automattic/jetpack-autoloader/compare/v${old}...v${new}"
33
- },
34
- "branch-alias": {
35
- "dev-trunk": "2.11.x-dev"
36
- }
37
- },
38
- "installation-source": "dist",
39
- "autoload": {
40
- "psr-4": {
41
- "Automattic\\Jetpack\\Autoloader\\": "src"
42
- },
43
- "classmap": [
44
- "src/AutoloadGenerator.php"
45
- ]
46
- },
47
- "notification-url": "https://packagist.org/downloads/",
48
- "license": [
49
- "GPL-2.0-or-later"
50
- ],
51
- "description": "Creates a custom autoloader for a plugin or theme.",
52
- "support": {
53
- "source": "https://github.com/Automattic/jetpack-autoloader/tree/v2.11.10"
54
- },
55
- "install-path": "../automattic/jetpack-autoloader"
56
- },
57
  {
58
  "name": "composer/installers",
59
  "version": "v1.12.0",
1
  {
2
  "packages": [
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  {
4
  "name": "composer/installers",
5
  "version": "v1.12.0",
vendor/composer/installed.php CHANGED
@@ -1,40 +1,31 @@
1
  <?php return array(
2
  'root' => array(
3
- 'name' => 'facebookincubator/facebook-for-woocommerce',
4
- 'pretty_version' => 'dev-develop',
5
- 'version' => 'dev-develop',
6
- 'reference' => '6889961f4795fb1a368ce38af329a4d7e181edf6',
7
  'type' => 'wordpress-plugin',
8
  'install_path' => __DIR__ . '/../../',
9
  'aliases' => array(),
 
 
10
  'dev' => false,
11
  ),
12
  'versions' => array(
13
- 'automattic/jetpack-autoloader' => array(
14
- 'pretty_version' => 'v2.11.10',
15
- 'version' => '2.11.10.0',
16
- 'reference' => '0d0835f25c67a814f6f64e0538d8cfa46d7aad70',
17
- 'type' => 'composer-plugin',
18
- 'install_path' => __DIR__ . '/../automattic/jetpack-autoloader',
19
- 'aliases' => array(),
20
- 'dev_requirement' => false,
21
- ),
22
  'composer/installers' => array(
23
  'pretty_version' => 'v1.12.0',
24
  'version' => '1.12.0.0',
25
- 'reference' => 'd20a64ed3c94748397ff5973488761b22f6d3f19',
26
  'type' => 'composer-plugin',
27
  'install_path' => __DIR__ . '/./installers',
28
  'aliases' => array(),
 
29
  'dev_requirement' => false,
30
  ),
31
  'facebookincubator/facebook-for-woocommerce' => array(
32
- 'pretty_version' => 'dev-develop',
33
- 'version' => 'dev-develop',
34
- 'reference' => '6889961f4795fb1a368ce38af329a4d7e181edf6',
35
  'type' => 'wordpress-plugin',
36
  'install_path' => __DIR__ . '/../../',
37
  'aliases' => array(),
 
38
  'dev_requirement' => false,
39
  ),
40
  'roundcube/plugin-installer' => array(
@@ -52,19 +43,19 @@
52
  'skyverge/wc-plugin-framework' => array(
53
  'pretty_version' => '5.10.0',
54
  'version' => '5.10.0.0',
55
- 'reference' => 'e230d7c40286854e49c0cafeec3398cbf2427a64',
56
  'type' => 'library',
57
  'install_path' => __DIR__ . '/../skyverge/wc-plugin-framework',
58
  'aliases' => array(),
 
59
  'dev_requirement' => false,
60
  ),
61
  'woocommerce/action-scheduler-job-framework' => array(
62
  'pretty_version' => '2.0.0',
63
  'version' => '2.0.0.0',
64
- 'reference' => 'b0b21b9cc87e476ba7f8817050b39274ea7d6732',
65
  'type' => 'library',
66
  'install_path' => __DIR__ . '/../woocommerce/action-scheduler-job-framework',
67
  'aliases' => array(),
 
68
  'dev_requirement' => false,
69
  ),
70
  ),
1
  <?php return array(
2
  'root' => array(
3
+ 'pretty_version' => 'dev-release/2.6.27',
4
+ 'version' => 'dev-release/2.6.27',
 
 
5
  'type' => 'wordpress-plugin',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
+ 'reference' => '7d3e892d3c9d829e2ce696eec562030370667110',
9
+ 'name' => 'facebookincubator/facebook-for-woocommerce',
10
  'dev' => false,
11
  ),
12
  'versions' => array(
 
 
 
 
 
 
 
 
 
13
  'composer/installers' => array(
14
  'pretty_version' => 'v1.12.0',
15
  'version' => '1.12.0.0',
 
16
  'type' => 'composer-plugin',
17
  'install_path' => __DIR__ . '/./installers',
18
  'aliases' => array(),
19
+ 'reference' => 'd20a64ed3c94748397ff5973488761b22f6d3f19',
20
  'dev_requirement' => false,
21
  ),
22
  'facebookincubator/facebook-for-woocommerce' => array(
23
+ 'pretty_version' => 'dev-release/2.6.27',
24
+ 'version' => 'dev-release/2.6.27',
 
25
  'type' => 'wordpress-plugin',
26
  'install_path' => __DIR__ . '/../../',
27
  'aliases' => array(),
28
+ 'reference' => '7d3e892d3c9d829e2ce696eec562030370667110',
29
  'dev_requirement' => false,
30
  ),
31
  'roundcube/plugin-installer' => array(
43
  'skyverge/wc-plugin-framework' => array(
44
  'pretty_version' => '5.10.0',
45
  'version' => '5.10.0.0',
 
46
  'type' => 'library',
47
  'install_path' => __DIR__ . '/../skyverge/wc-plugin-framework',
48
  'aliases' => array(),
49
+ 'reference' => 'e230d7c40286854e49c0cafeec3398cbf2427a64',
50
  'dev_requirement' => false,
51
  ),
52
  'woocommerce/action-scheduler-job-framework' => array(
53
  'pretty_version' => '2.0.0',
54
  'version' => '2.0.0.0',
 
55
  'type' => 'library',
56
  'install_path' => __DIR__ . '/../woocommerce/action-scheduler-job-framework',
57
  'aliases' => array(),
58
+ 'reference' => 'b0b21b9cc87e476ba7f8817050b39274ea7d6732',
59
  'dev_requirement' => false,
60
  ),
61
  ),
vendor/composer/jetpack_autoload_classmap.php DELETED
@@ -1,933 +0,0 @@
1
- <?php
2
-
3
- // This file `jetpack_autoload_classmap.php` was auto generated by automattic/jetpack-autoloader.
4
-
5
- $vendorDir = dirname(__DIR__);
6
- $baseDir = dirname($vendorDir);
7
-
8
- return array(
9
- 'WC_Facebook_Product' => array(
10
- 'version' => 'dev-develop',
11
- 'path' => $baseDir . '/includes/fbproduct.php'
12
- ),
13
- 'SkyVerge\\WooCommerce\\Facebook\\Commerce\\Orders' => array(
14
- 'version' => 'dev-develop',
15
- 'path' => $baseDir . '/includes/Commerce/Orders.php'
16
- ),
17
- 'FB_WPML_Language_Status' => array(
18
- 'version' => 'dev-develop',
19
- 'path' => $baseDir . '/includes/fbwpml.php'
20
- ),
21
- 'WC_Facebook_WPML_Injector' => array(
22
- 'version' => 'dev-develop',
23
- 'path' => $baseDir . '/includes/fbwpml.php'
24
- ),
25
- 'WC_Facebookcommerce_Graph_API' => array(
26
- 'version' => 'dev-develop',
27
- 'path' => $baseDir . '/includes/fbgraph.php'
28
- ),
29
- 'SkyVerge\\WooCommerce\\Facebook\\Products\\Feed' => array(
30
- 'version' => 'dev-develop',
31
- 'path' => $baseDir . '/includes/Products/Feed.php'
32
- ),
33
- 'SkyVerge\\WooCommerce\\Facebook\\Products\\Stock' => array(
34
- 'version' => 'dev-develop',
35
- 'path' => $baseDir . '/includes/Products/Stock.php'
36
- ),
37
- 'SkyVerge\\WooCommerce\\Facebook\\Products\\GoogleProductTaxonomy' => array(
38
- 'version' => 'dev-develop',
39
- 'path' => $baseDir . '/includes/Products/GoogleProductTaxonomy.php'
40
- ),
41
- 'SkyVerge\\WooCommerce\\Facebook\\Products\\Sync' => array(
42
- 'version' => 'dev-develop',
43
- 'path' => $baseDir . '/includes/Products/Sync.php'
44
- ),
45
- 'SkyVerge\\WooCommerce\\Facebook\\Products\\Sync\\Background' => array(
46
- 'version' => 'dev-develop',
47
- 'path' => $baseDir . '/includes/Products/Sync/Background.php'
48
- ),
49
- 'SkyVerge\\WooCommerce\\Facebook\\Products\\FBCategories' => array(
50
- 'version' => 'dev-develop',
51
- 'path' => $baseDir . '/includes/Products/FBCategories.php'
52
- ),
53
- 'WC_Facebook_Integration_Test' => array(
54
- 'version' => 'dev-develop',
55
- 'path' => $baseDir . '/includes/test/facebook-integration-test.php'
56
- ),
57
- 'WC_Facebook_Product_Feed_Test_Mock' => array(
58
- 'version' => 'dev-develop',
59
- 'path' => $baseDir . '/includes/test/fbproductfeed-test.php'
60
- ),
61
- 'SkyVerge\\WooCommerce\\Facebook\\AJAX' => array(
62
- 'version' => 'dev-develop',
63
- 'path' => $baseDir . '/includes/AJAX.php'
64
- ),
65
- 'WC_Facebook_Product_Feed' => array(
66
- 'version' => 'dev-develop',
67
- 'path' => $baseDir . '/includes/fbproductfeed.php'
68
- ),
69
- 'WC_Facebookcommerce_Info_Banner' => array(
70
- 'version' => 'dev-develop',
71
- 'path' => $baseDir . '/includes/fbinfobanner.php'
72
- ),
73
- 'SkyVerge\\WooCommerce\\Facebook\\Product_Categories' => array(
74
- 'version' => 'dev-develop',
75
- 'path' => $baseDir . '/includes/Product_Categories.php'
76
- ),
77
- 'WC_Facebookcommerce_Background_Process' => array(
78
- 'version' => 'dev-develop',
79
- 'path' => $baseDir . '/includes/fbbackground.php'
80
- ),
81
- 'SkyVerge\\WooCommerce\\Facebook\\Admin\\Product_Sync_Meta_Box' => array(
82
- 'version' => 'dev-develop',
83
- 'path' => $baseDir . '/includes/Admin/Product_Sync_Meta_Box.php'
84
- ),
85
- 'SkyVerge\\WooCommerce\\Facebook\\Admin\\Settings' => array(
86
- 'version' => 'dev-develop',
87
- 'path' => $baseDir . '/includes/Admin/Settings.php'
88
- ),
89
- 'SkyVerge\\WooCommerce\\Facebook\\Admin\\Google_Product_Category_Field' => array(
90
- 'version' => 'dev-develop',
91
- 'path' => $baseDir . '/includes/Admin/Google_Product_Category_Field.php'
92
- ),
93
- 'SkyVerge\\WooCommerce\\Facebook\\Admin\\Product_Categories' => array(
94
- 'version' => 'dev-develop',
95
- 'path' => $baseDir . '/includes/Admin/Product_Categories.php'
96
- ),
97
- 'SkyVerge\\WooCommerce\\Facebook\\Admin\\Enhanced_Catalog_Attribute_Fields' => array(
98
- 'version' => 'dev-develop',
99
- 'path' => $baseDir . '/includes/Admin/Enhanced_Catalog_Attribute_Fields.php'
100
- ),
101
- 'SkyVerge\\WooCommerce\\Facebook\\Admin\\Abstract_Settings_Screen' => array(
102
- 'version' => 'dev-develop',
103
- 'path' => $baseDir . '/includes/Admin/Abstract_Settings_Screen.php'
104
- ),
105
- 'SkyVerge\\WooCommerce\\Facebook\\Admin\\Settings_Screens\\Connection' => array(
106
- 'version' => 'dev-develop',
107
- 'path' => $baseDir . '/includes/Admin/Settings_Screens/Connection.php'
108
- ),
109
- 'SkyVerge\\WooCommerce\\Facebook\\Admin\\Settings_Screens\\Advertise' => array(
110
- 'version' => 'dev-develop',
111
- 'path' => $baseDir . '/includes/Admin/Settings_Screens/Advertise.php'
112
- ),
113
- 'SkyVerge\\WooCommerce\\Facebook\\Admin\\Settings_Screens\\Product_Sync' => array(
114
- 'version' => 'dev-develop',
115
- 'path' => $baseDir . '/includes/Admin/Settings_Screens/Product_Sync.php'
116
- ),
117
- 'SkyVerge\\WooCommerce\\Facebook\\Admin\\Settings_Screens\\Messenger' => array(
118
- 'version' => 'dev-develop',
119
- 'path' => $baseDir . '/includes/Admin/Settings_Screens/Messenger.php'
120
- ),
121
- 'SkyVerge\\WooCommerce\\Facebook\\Admin\\Settings_Screens\\Product_Sets' => array(
122
- 'version' => 'dev-develop',
123
- 'path' => $baseDir . '/includes/Admin/Settings_Screens/Product_Sets.php'
124
- ),
125
- 'SkyVerge\\WooCommerce\\Facebook\\Admin\\Products' => array(
126
- 'version' => 'dev-develop',
127
- 'path' => $baseDir . '/includes/Admin/Products.php'
128
- ),
129
- 'SkyVerge\\WooCommerce\\Facebook\\Admin\\Product_Sets' => array(
130
- 'version' => 'dev-develop',
131
- 'path' => $baseDir . '/includes/Admin/Product_Sets.php'
132
- ),
133
- 'WC_Facebookcommerce_Utils' => array(
134
- 'version' => 'dev-develop',
135
- 'path' => $baseDir . '/includes/fbutils.php'
136
- ),
137
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Exceptions\\Connect_WC_API_Exception' => array(
138
- 'version' => 'dev-develop',
139
- 'path' => $baseDir . '/includes/Exceptions/ConnectWCAPIException.php'
140
- ),
141
- 'SkyVerge\\WooCommerce\\Facebook\\Lifecycle' => array(
142
- 'version' => 'dev-develop',
143
- 'path' => $baseDir . '/includes/Lifecycle.php'
144
- ),
145
- 'SkyVerge\\WooCommerce\\Facebook\\Integrations\\Bookings' => array(
146
- 'version' => 'dev-develop',
147
- 'path' => $baseDir . '/includes/Integrations/Bookings.php'
148
- ),
149
- 'SkyVerge\\WooCommerce\\Facebook\\Utilities\\Shipment' => array(
150
- 'version' => 'dev-develop',
151
- 'path' => $baseDir . '/includes/Utilities/Shipment.php'
152
- ),
153
- 'SkyVerge\\WooCommerce\\Facebook\\Utilities\\Background_Handle_Virtual_Products_Variations' => array(
154
- 'version' => 'dev-develop',
155
- 'path' => $baseDir . '/includes/Utilities/Background_Handle_Virtual_Products_Variations.php'
156
- ),
157
- 'SkyVerge\\WooCommerce\\Facebook\\Utilities\\Background_Remove_Duplicate_Visibility_Meta' => array(
158
- 'version' => 'dev-develop',
159
- 'path' => $baseDir . '/includes/Utilities/Background_Remove_Duplicate_Visibility_Meta.php'
160
- ),
161
- 'SkyVerge\\WooCommerce\\Facebook\\Utilities\\Heartbeat' => array(
162
- 'version' => 'dev-develop',
163
- 'path' => $baseDir . '/includes/Utilities/Heartbeat.php'
164
- ),
165
- 'SkyVerge\\WooCommerce\\Facebook\\Utilities\\Tracker' => array(
166
- 'version' => 'dev-develop',
167
- 'path' => $baseDir . '/includes/Utilities/Tracker.php'
168
- ),
169
- 'SkyVerge\\WooCommerce\\Facebook\\Feed\\FeedConfigurationDetection' => array(
170
- 'version' => 'dev-develop',
171
- 'path' => $baseDir . '/includes/Feed/FeedConfigurationDetection.php'
172
- ),
173
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Traits\\Idempotent_Request' => array(
174
- 'version' => 'dev-develop',
175
- 'path' => $baseDir . '/includes/API/Traits/Idempotent_Request.php'
176
- ),
177
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Traits\\Rate_Limited_API' => array(
178
- 'version' => 'dev-develop',
179
- 'path' => $baseDir . '/includes/API/Traits/Rate_Limited_API.php'
180
- ),
181
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Traits\\Rate_Limited_Request' => array(
182
- 'version' => 'dev-develop',
183
- 'path' => $baseDir . '/includes/API/Traits/Rate_Limited_Request.php'
184
- ),
185
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Traits\\Rate_Limited_Response' => array(
186
- 'version' => 'dev-develop',
187
- 'path' => $baseDir . '/includes/API/Traits/Rate_Limited_Response.php'
188
- ),
189
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Traits\\Paginated_Response' => array(
190
- 'version' => 'dev-develop',
191
- 'path' => $baseDir . '/includes/API/Traits/Paginated_Response.php'
192
- ),
193
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Response' => array(
194
- 'version' => 'dev-develop',
195
- 'path' => $baseDir . '/includes/API/Response.php'
196
- ),
197
- 'SkyVerge\\WooCommerce\\Facebook\\API\\FBE\\Configuration\\Update\\Request' => array(
198
- 'version' => 'dev-develop',
199
- 'path' => $baseDir . '/includes/API/FBE/Configuration/Update/Request.php'
200
- ),
201
- 'SkyVerge\\WooCommerce\\Facebook\\API\\FBE\\Configuration\\Read\\Response' => array(
202
- 'version' => 'dev-develop',
203
- 'path' => $baseDir . '/includes/API/FBE/Configuration/Read/Response.php'
204
- ),
205
- 'SkyVerge\\WooCommerce\\Facebook\\API\\FBE\\Configuration\\Request' => array(
206
- 'version' => 'dev-develop',
207
- 'path' => $baseDir . '/includes/API/FBE/Configuration/Request.php'
208
- ),
209
- 'SkyVerge\\WooCommerce\\Facebook\\API\\FBE\\Configuration\\Messenger' => array(
210
- 'version' => 'dev-develop',
211
- 'path' => $baseDir . '/includes/API/FBE/Configuration/Messenger.php'
212
- ),
213
- 'SkyVerge\\WooCommerce\\Facebook\\API\\FBE\\Installation\\Read\\Response' => array(
214
- 'version' => 'dev-develop',
215
- 'path' => $baseDir . '/includes/API/FBE/Installation/Read/Response.php'
216
- ),
217
- 'SkyVerge\\WooCommerce\\Facebook\\API\\FBE\\Installation\\Read\\Request' => array(
218
- 'version' => 'dev-develop',
219
- 'path' => $baseDir . '/includes/API/FBE/Installation/Read/Request.php'
220
- ),
221
- 'SkyVerge\\WooCommerce\\Facebook\\API\\FBE\\Installation\\Request' => array(
222
- 'version' => 'dev-develop',
223
- 'path' => $baseDir . '/includes/API/FBE/Installation/Request.php'
224
- ),
225
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Catalog\\Response' => array(
226
- 'version' => 'dev-develop',
227
- 'path' => $baseDir . '/includes/API/Catalog/Response.php'
228
- ),
229
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Catalog\\Request' => array(
230
- 'version' => 'dev-develop',
231
- 'path' => $baseDir . '/includes/API/Catalog/Request.php'
232
- ),
233
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Catalog\\Product_Item\\Response' => array(
234
- 'version' => 'dev-develop',
235
- 'path' => $baseDir . '/includes/API/Catalog/Product_Item/Response.php'
236
- ),
237
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Catalog\\Product_Item\\Find\\Request' => array(
238
- 'version' => 'dev-develop',
239
- 'path' => $baseDir . '/includes/API/Catalog/Product_Item/Find/Request.php'
240
- ),
241
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Catalog\\Send_Item_Updates\\Response' => array(
242
- 'version' => 'dev-develop',
243
- 'path' => $baseDir . '/includes/API/Catalog/Send_Item_Updates/Response.php'
244
- ),
245
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Catalog\\Send_Item_Updates\\Request' => array(
246
- 'version' => 'dev-develop',
247
- 'path' => $baseDir . '/includes/API/Catalog/Send_Item_Updates/Request.php'
248
- ),
249
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Catalog\\Product_Group\\Products\\Read\\Response' => array(
250
- 'version' => 'dev-develop',
251
- 'path' => $baseDir . '/includes/API/Catalog/Product_Group/Products/Read/Response.php'
252
- ),
253
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Catalog\\Product_Group\\Products\\Read\\Request' => array(
254
- 'version' => 'dev-develop',
255
- 'path' => $baseDir . '/includes/API/Catalog/Product_Group/Products/Read/Request.php'
256
- ),
257
- 'SkyVerge\\WooCommerce\\Facebook\\API\\User\\Response' => array(
258
- 'version' => 'dev-develop',
259
- 'path' => $baseDir . '/includes/API/User/Response.php'
260
- ),
261
- 'SkyVerge\\WooCommerce\\Facebook\\API\\User\\Permissions\\Delete\\Request' => array(
262
- 'version' => 'dev-develop',
263
- 'path' => $baseDir . '/includes/API/User/Permissions/Delete/Request.php'
264
- ),
265
- 'SkyVerge\\WooCommerce\\Facebook\\API\\User\\Request' => array(
266
- 'version' => 'dev-develop',
267
- 'path' => $baseDir . '/includes/API/User/Request.php'
268
- ),
269
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Exceptions\\Request_Limit_Reached' => array(
270
- 'version' => 'dev-develop',
271
- 'path' => $baseDir . '/includes/API/Exceptions/Request_Limit_Reached.php'
272
- ),
273
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Pixel\\Events\\Request' => array(
274
- 'version' => 'dev-develop',
275
- 'path' => $baseDir . '/includes/API/Pixel/Events/Request.php'
276
- ),
277
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Request' => array(
278
- 'version' => 'dev-develop',
279
- 'path' => $baseDir . '/includes/API/Request.php'
280
- ),
281
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Orders\\Cancel\\Request' => array(
282
- 'version' => 'dev-develop',
283
- 'path' => $baseDir . '/includes/API/Orders/Cancel/Request.php'
284
- ),
285
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Orders\\Order' => array(
286
- 'version' => 'dev-develop',
287
- 'path' => $baseDir . '/includes/API/Orders/Order.php'
288
- ),
289
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Orders\\Response' => array(
290
- 'version' => 'dev-develop',
291
- 'path' => $baseDir . '/includes/API/Orders/Response.php'
292
- ),
293
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Orders\\Read\\Response' => array(
294
- 'version' => 'dev-develop',
295
- 'path' => $baseDir . '/includes/API/Orders/Read/Response.php'
296
- ),
297
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Orders\\Read\\Request' => array(
298
- 'version' => 'dev-develop',
299
- 'path' => $baseDir . '/includes/API/Orders/Read/Request.php'
300
- ),
301
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Orders\\Acknowledge\\Request' => array(
302
- 'version' => 'dev-develop',
303
- 'path' => $baseDir . '/includes/API/Orders/Acknowledge/Request.php'
304
- ),
305
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Orders\\Fulfillment\\Request' => array(
306
- 'version' => 'dev-develop',
307
- 'path' => $baseDir . '/includes/API/Orders/Fulfillment/Request.php'
308
- ),
309
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Orders\\Abstract_Request' => array(
310
- 'version' => 'dev-develop',
311
- 'path' => $baseDir . '/includes/API/Orders/Abstract_Request.php'
312
- ),
313
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Orders\\Request' => array(
314
- 'version' => 'dev-develop',
315
- 'path' => $baseDir . '/includes/API/Orders/Request.php'
316
- ),
317
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Orders\\Refund\\Request' => array(
318
- 'version' => 'dev-develop',
319
- 'path' => $baseDir . '/includes/API/Orders/Refund/Request.php'
320
- ),
321
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Pages\\Read\\Response' => array(
322
- 'version' => 'dev-develop',
323
- 'path' => $baseDir . '/includes/API/Pages/Read/Response.php'
324
- ),
325
- 'SkyVerge\\WooCommerce\\Facebook\\API\\Pages\\Read\\Request' => array(
326
- 'version' => 'dev-develop',
327
- 'path' => $baseDir . '/includes/API/Pages/Read/Request.php'
328
- ),
329
- 'SkyVerge\\WooCommerce\\Facebook\\ProductSync\\ProductInvalidException' => array(
330
- 'version' => 'dev-develop',
331
- 'path' => $baseDir . '/includes/ProductSync/ProductInvalidException.php'
332
- ),
333
- 'SkyVerge\\WooCommerce\\Facebook\\ProductSync\\ProductExcludedException' => array(
334
- 'version' => 'dev-develop',
335
- 'path' => $baseDir . '/includes/ProductSync/ProductExcludedException.php'
336
- ),
337
- 'SkyVerge\\WooCommerce\\Facebook\\ProductSync\\ProductValidator' => array(
338
- 'version' => 'dev-develop',
339
- 'path' => $baseDir . '/includes/ProductSync/ProductValidator.php'
340
- ),
341
- 'SkyVerge\\WooCommerce\\Facebook\\Products' => array(
342
- 'version' => 'dev-develop',
343
- 'path' => $baseDir . '/includes/Products.php'
344
- ),
345
- 'SkyVerge\\WooCommerce\\Facebook\\ProductSets\\Sync' => array(
346
- 'version' => 'dev-develop',
347
- 'path' => $baseDir . '/includes/ProductSets/Sync.php'
348
- ),
349
- 'SkyVerge\\WooCommerce\\Facebook\\API' => array(
350
- 'version' => 'dev-develop',
351
- 'path' => $baseDir . '/includes/API.php'
352
- ),
353
- 'SkyVerge\\WooCommerce\\Facebook\\Jobs\\CleanupSkyvergeFrameworkJobOptions' => array(
354
- 'version' => 'dev-develop',
355
- 'path' => $baseDir . '/includes/Jobs/CleanupSkyvergeFrameworkJobOptions.php'
356
- ),
357
- 'SkyVerge\\WooCommerce\\Facebook\\Jobs\\AbstractChainedJob' => array(
358
- 'version' => 'dev-develop',
359
- 'path' => $baseDir . '/includes/Jobs/AbstractChainedJob.php'
360
- ),
361
- 'SkyVerge\\WooCommerce\\Facebook\\Jobs\\JobManager' => array(
362
- 'version' => 'dev-develop',
363
- 'path' => $baseDir . '/includes/Jobs/JobManager.php'
364
- ),
365
- 'SkyVerge\\WooCommerce\\Facebook\\Jobs\\GenerateProductFeed' => array(
366
- 'version' => 'dev-develop',
367
- 'path' => $baseDir . '/includes/Jobs/GenerateProductFeed.php'
368
- ),
369
- 'SkyVerge\\WooCommerce\\Facebook\\Jobs\\LoggingTrait' => array(
370
- 'version' => 'dev-develop',
371
- 'path' => $baseDir . '/includes/Jobs/LoggingTrait.php'
372
- ),
373
- 'SkyVerge\\WooCommerce\\Facebook\\Events\\Event' => array(
374
- 'version' => 'dev-develop',
375
- 'path' => $baseDir . '/includes/Events/Event.php'
376
- ),
377
- 'SkyVerge\\WooCommerce\\Facebook\\Events\\Normalizer' => array(
378
- 'version' => 'dev-develop',
379
- 'path' => $baseDir . '/includes/Events/Normalizer.php'
380
- ),
381
- 'SkyVerge\\WooCommerce\\Facebook\\Events\\AAMSettings' => array(
382
- 'version' => 'dev-develop',
383
- 'path' => $baseDir . '/includes/Events/AAMSettings.php'
384
- ),
385
- 'SkyVerge\\WooCommerce\\Facebook\\Admin' => array(
386
- 'version' => 'dev-develop',
387
- 'path' => $baseDir . '/includes/Admin.php'
388
- ),
389
- 'SkyVerge\\WooCommerce\\Facebook\\Handlers\\Connection' => array(
390
- 'version' => 'dev-develop',
391
- 'path' => $baseDir . '/includes/Handlers/Connection.php'
392
- ),
393
- 'SkyVerge\\WooCommerce\\Facebook\\Handlers\\WebHook' => array(
394
- 'version' => 'dev-develop',
395
- 'path' => $baseDir . '/includes/Handlers/WebHook.php'
396
- ),
397
- 'SkyVerge\\WooCommerce\\Facebook\\Locale' => array(
398
- 'version' => 'dev-develop',
399
- 'path' => $baseDir . '/includes/Locale.php'
400
- ),
401
- 'SkyVerge\\WooCommerce\\Facebook\\Commerce' => array(
402
- 'version' => 'dev-develop',
403
- 'path' => $baseDir . '/includes/Commerce.php'
404
- ),
405
- 'WC_Facebookcommerce_Async_Request' => array(
406
- 'version' => 'dev-develop',
407
- 'path' => $baseDir . '/includes/fbasync.php'
408
- ),
409
- 'SkyVerge\\WooCommerce\\Facebook\\Debug\\ProfilingLoggerProcess' => array(
410
- 'version' => 'dev-develop',
411
- 'path' => $baseDir . '/includes/Debug/ProfilingLoggerProcess.php'
412
- ),
413
- 'SkyVerge\\WooCommerce\\Facebook\\Debug\\ProfilingLogger' => array(
414
- 'version' => 'dev-develop',
415
- 'path' => $baseDir . '/includes/Debug/ProfilingLogger.php'
416
- ),
417
- 'Composer\\Installers\\GravInstaller' => array(
418
- 'version' => '1.12.0.0',
419
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/GravInstaller.php'
420
- ),
421
- 'Composer\\Installers\\AttogramInstaller' => array(
422
- 'version' => '1.12.0.0',
423
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/AttogramInstaller.php'
424
- ),
425
- 'Composer\\Installers\\DrupalInstaller' => array(
426
- 'version' => '1.12.0.0',
427
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/DrupalInstaller.php'
428
- ),
429
- 'Composer\\Installers\\CraftInstaller' => array(
430
- 'version' => '1.12.0.0',
431
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/CraftInstaller.php'
432
- ),
433
- 'Composer\\Installers\\CiviCrmInstaller' => array(
434
- 'version' => '1.12.0.0',
435
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/CiviCrmInstaller.php'
436
- ),
437
- 'Composer\\Installers\\ItopInstaller' => array(
438
- 'version' => '1.12.0.0',
439
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/ItopInstaller.php'
440
- ),
441
- 'Composer\\Installers\\ReIndexInstaller' => array(
442
- 'version' => '1.12.0.0',
443
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/ReIndexInstaller.php'
444
- ),
445
- 'Composer\\Installers\\TheliaInstaller' => array(
446
- 'version' => '1.12.0.0',
447
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/TheliaInstaller.php'
448
- ),
449
- 'Composer\\Installers\\SilverStripeInstaller' => array(
450
- 'version' => '1.12.0.0',
451
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/SilverStripeInstaller.php'
452
- ),
453
- 'Composer\\Installers\\ShopwareInstaller' => array(
454
- 'version' => '1.12.0.0',
455
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/ShopwareInstaller.php'
456
- ),
457
- 'Composer\\Installers\\DokuWikiInstaller' => array(
458
- 'version' => '1.12.0.0',
459
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/DokuWikiInstaller.php'
460
- ),
461
- 'Composer\\Installers\\StarbugInstaller' => array(
462
- 'version' => '1.12.0.0',
463
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/StarbugInstaller.php'
464
- ),
465
- 'Composer\\Installers\\ProcessWireInstaller' => array(
466
- 'version' => '1.12.0.0',
467
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/ProcessWireInstaller.php'
468
- ),
469
- 'Composer\\Installers\\SyliusInstaller' => array(
470
- 'version' => '1.12.0.0',
471
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/SyliusInstaller.php'
472
- ),
473
- 'Composer\\Installers\\PPIInstaller' => array(
474
- 'version' => '1.12.0.0',
475
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/PPIInstaller.php'
476
- ),
477
- 'Composer\\Installers\\KirbyInstaller' => array(
478
- 'version' => '1.12.0.0',
479
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/KirbyInstaller.php'
480
- ),
481
- 'Composer\\Installers\\LaravelInstaller' => array(
482
- 'version' => '1.12.0.0',
483
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/LaravelInstaller.php'
484
- ),
485
- 'Composer\\Installers\\ElggInstaller' => array(
486
- 'version' => '1.12.0.0',
487
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/ElggInstaller.php'
488
- ),
489
- 'Composer\\Installers\\VanillaInstaller' => array(
490
- 'version' => '1.12.0.0',
491
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/VanillaInstaller.php'
492
- ),
493
- 'Composer\\Installers\\YawikInstaller' => array(
494
- 'version' => '1.12.0.0',
495
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/YawikInstaller.php'
496
- ),
497
- 'Composer\\Installers\\RoundcubeInstaller' => array(
498
- 'version' => '1.12.0.0',
499
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/RoundcubeInstaller.php'
500
- ),
501
- 'Composer\\Installers\\VgmcpInstaller' => array(
502
- 'version' => '1.12.0.0',
503
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/VgmcpInstaller.php'
504
- ),
505
- 'Composer\\Installers\\UserFrostingInstaller' => array(
506
- 'version' => '1.12.0.0',
507
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/UserFrostingInstaller.php'
508
- ),
509
- 'Composer\\Installers\\RadPHPInstaller' => array(
510
- 'version' => '1.12.0.0',
511
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/RadPHPInstaller.php'
512
- ),
513
- 'Composer\\Installers\\KnownInstaller' => array(
514
- 'version' => '1.12.0.0',
515
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/KnownInstaller.php'
516
- ),
517
- 'Composer\\Installers\\SMFInstaller' => array(
518
- 'version' => '1.12.0.0',
519
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/SMFInstaller.php'
520
- ),
521
- 'Composer\\Installers\\PhiftyInstaller' => array(
522
- 'version' => '1.12.0.0',
523
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/PhiftyInstaller.php'
524
- ),
525
- 'Composer\\Installers\\MakoInstaller' => array(
526
- 'version' => '1.12.0.0',
527
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/MakoInstaller.php'
528
- ),
529
- 'Composer\\Installers\\TYPO3CmsInstaller' => array(
530
- 'version' => '1.12.0.0',
531
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php'
532
- ),
533
- 'Composer\\Installers\\CockpitInstaller' => array(
534
- 'version' => '1.12.0.0',
535
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/CockpitInstaller.php'
536
- ),
537
- 'Composer\\Installers\\CodeIgniterInstaller' => array(
538
- 'version' => '1.12.0.0',
539
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php'
540
- ),
541
- 'Composer\\Installers\\TaoInstaller' => array(
542
- 'version' => '1.12.0.0',
543
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/TaoInstaller.php'
544
- ),
545
- 'Composer\\Installers\\AimeosInstaller' => array(
546
- 'version' => '1.12.0.0',
547
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/AimeosInstaller.php'
548
- ),
549
- 'Composer\\Installers\\KohanaInstaller' => array(
550
- 'version' => '1.12.0.0',
551
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/KohanaInstaller.php'
552
- ),
553
- 'Composer\\Installers\\Plugin' => array(
554
- 'version' => '1.12.0.0',
555
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/Plugin.php'
556
- ),
557
- 'Composer\\Installers\\ExpressionEngineInstaller' => array(
558
- 'version' => '1.12.0.0',
559
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php'
560
- ),
561
- 'Composer\\Installers\\OctoberInstaller' => array(
562
- 'version' => '1.12.0.0',
563
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/OctoberInstaller.php'
564
- ),
565
- 'Composer\\Installers\\WolfCMSInstaller' => array(
566
- 'version' => '1.12.0.0',
567
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/WolfCMSInstaller.php'
568
- ),
569
- 'Composer\\Installers\\LithiumInstaller' => array(
570
- 'version' => '1.12.0.0',
571
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/LithiumInstaller.php'
572
- ),
573
- 'Composer\\Installers\\ZendInstaller' => array(
574
- 'version' => '1.12.0.0',
575
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/ZendInstaller.php'
576
- ),
577
- 'Composer\\Installers\\Symfony1Installer' => array(
578
- 'version' => '1.12.0.0',
579
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/Symfony1Installer.php'
580
- ),
581
- 'Composer\\Installers\\LavaLiteInstaller' => array(
582
- 'version' => '1.12.0.0',
583
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/LavaLiteInstaller.php'
584
- ),
585
- 'Composer\\Installers\\MoodleInstaller' => array(
586
- 'version' => '1.12.0.0',
587
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/MoodleInstaller.php'
588
- ),
589
- 'Composer\\Installers\\HuradInstaller' => array(
590
- 'version' => '1.12.0.0',
591
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/HuradInstaller.php'
592
- ),
593
- 'Composer\\Installers\\BaseInstaller' => array(
594
- 'version' => '1.12.0.0',
595
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/BaseInstaller.php'
596
- ),
597
- 'Composer\\Installers\\CakePHPInstaller' => array(
598
- 'version' => '1.12.0.0',
599
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/CakePHPInstaller.php'
600
- ),
601
- 'Composer\\Installers\\RedaxoInstaller' => array(
602
- 'version' => '1.12.0.0',
603
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/RedaxoInstaller.php'
604
- ),
605
- 'Composer\\Installers\\ModxInstaller' => array(
606
- 'version' => '1.12.0.0',
607
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/ModxInstaller.php'
608
- ),
609
- 'Composer\\Installers\\MauticInstaller' => array(
610
- 'version' => '1.12.0.0',
611
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/MauticInstaller.php'
612
- ),
613
- 'Composer\\Installers\\MagentoInstaller' => array(
614
- 'version' => '1.12.0.0',
615
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/MagentoInstaller.php'
616
- ),
617
- 'Composer\\Installers\\Concrete5Installer' => array(
618
- 'version' => '1.12.0.0',
619
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/Concrete5Installer.php'
620
- ),
621
- 'Composer\\Installers\\FuelphpInstaller' => array(
622
- 'version' => '1.12.0.0',
623
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelphpInstaller.php'
624
- ),
625
- 'Composer\\Installers\\FuelInstaller' => array(
626
- 'version' => '1.12.0.0',
627
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelInstaller.php'
628
- ),
629
- 'Composer\\Installers\\TastyIgniterInstaller' => array(
630
- 'version' => '1.12.0.0',
631
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/TastyIgniterInstaller.php'
632
- ),
633
- 'Composer\\Installers\\PrestashopInstaller' => array(
634
- 'version' => '1.12.0.0',
635
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/PrestashopInstaller.php'
636
- ),
637
- 'Composer\\Installers\\OxidInstaller' => array(
638
- 'version' => '1.12.0.0',
639
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/OxidInstaller.php'
640
- ),
641
- 'Composer\\Installers\\TuskInstaller' => array(
642
- 'version' => '1.12.0.0',
643
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/TuskInstaller.php'
644
- ),
645
- 'Composer\\Installers\\TYPO3FlowInstaller' => array(
646
- 'version' => '1.12.0.0',
647
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php'
648
- ),
649
- 'Composer\\Installers\\PiwikInstaller' => array(
650
- 'version' => '1.12.0.0',
651
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/PiwikInstaller.php'
652
- ),
653
- 'Composer\\Installers\\PuppetInstaller' => array(
654
- 'version' => '1.12.0.0',
655
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/PuppetInstaller.php'
656
- ),
657
- 'Composer\\Installers\\AglInstaller' => array(
658
- 'version' => '1.12.0.0',
659
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/AglInstaller.php'
660
- ),
661
- 'Composer\\Installers\\PimcoreInstaller' => array(
662
- 'version' => '1.12.0.0',
663
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/PimcoreInstaller.php'
664
- ),
665
- 'Composer\\Installers\\EliasisInstaller' => array(
666
- 'version' => '1.12.0.0',
667
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/EliasisInstaller.php'
668
- ),
669
- 'Composer\\Installers\\Redaxo5Installer' => array(
670
- 'version' => '1.12.0.0',
671
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/Redaxo5Installer.php'
672
- ),
673
- 'Composer\\Installers\\BitrixInstaller' => array(
674
- 'version' => '1.12.0.0',
675
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/BitrixInstaller.php'
676
- ),
677
- 'Composer\\Installers\\AsgardInstaller' => array(
678
- 'version' => '1.12.0.0',
679
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/AsgardInstaller.php'
680
- ),
681
- 'Composer\\Installers\\WHMCSInstaller' => array(
682
- 'version' => '1.12.0.0',
683
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/WHMCSInstaller.php'
684
- ),
685
- 'Composer\\Installers\\KanboardInstaller' => array(
686
- 'version' => '1.12.0.0',
687
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/KanboardInstaller.php'
688
- ),
689
- 'Composer\\Installers\\WordPressInstaller' => array(
690
- 'version' => '1.12.0.0',
691
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/WordPressInstaller.php'
692
- ),
693
- 'Composer\\Installers\\MajimaInstaller' => array(
694
- 'version' => '1.12.0.0',
695
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/MajimaInstaller.php'
696
- ),
697
- 'Composer\\Installers\\DframeInstaller' => array(
698
- 'version' => '1.12.0.0',
699
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/DframeInstaller.php'
700
- ),
701
- 'Composer\\Installers\\PlentymarketsInstaller' => array(
702
- 'version' => '1.12.0.0',
703
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php'
704
- ),
705
- 'Composer\\Installers\\MiaoxingInstaller' => array(
706
- 'version' => '1.12.0.0',
707
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/MiaoxingInstaller.php'
708
- ),
709
- 'Composer\\Installers\\EzPlatformInstaller' => array(
710
- 'version' => '1.12.0.0',
711
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/EzPlatformInstaller.php'
712
- ),
713
- 'Composer\\Installers\\MODXEvoInstaller' => array(
714
- 'version' => '1.12.0.0',
715
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/MODXEvoInstaller.php'
716
- ),
717
- 'Composer\\Installers\\OntoWikiInstaller' => array(
718
- 'version' => '1.12.0.0',
719
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/OntoWikiInstaller.php'
720
- ),
721
- 'Composer\\Installers\\AnnotateCmsInstaller' => array(
722
- 'version' => '1.12.0.0',
723
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php'
724
- ),
725
- 'Composer\\Installers\\MODULEWorkInstaller' => array(
726
- 'version' => '1.12.0.0',
727
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php'
728
- ),
729
- 'Composer\\Installers\\OsclassInstaller' => array(
730
- 'version' => '1.12.0.0',
731
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/OsclassInstaller.php'
732
- ),
733
- 'Composer\\Installers\\ChefInstaller' => array(
734
- 'version' => '1.12.0.0',
735
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/ChefInstaller.php'
736
- ),
737
- 'Composer\\Installers\\JoomlaInstaller' => array(
738
- 'version' => '1.12.0.0',
739
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/JoomlaInstaller.php'
740
- ),
741
- 'Composer\\Installers\\Installer' => array(
742
- 'version' => '1.12.0.0',
743
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/Installer.php'
744
- ),
745
- 'Composer\\Installers\\KodiCMSInstaller' => array(
746
- 'version' => '1.12.0.0',
747
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php'
748
- ),
749
- 'Composer\\Installers\\PhpBBInstaller' => array(
750
- 'version' => '1.12.0.0',
751
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/PhpBBInstaller.php'
752
- ),
753
- 'Composer\\Installers\\MediaWikiInstaller' => array(
754
- 'version' => '1.12.0.0',
755
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/MediaWikiInstaller.php'
756
- ),
757
- 'Composer\\Installers\\PantheonInstaller' => array(
758
- 'version' => '1.12.0.0',
759
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/PantheonInstaller.php'
760
- ),
761
- 'Composer\\Installers\\ImageCMSInstaller' => array(
762
- 'version' => '1.12.0.0',
763
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/ImageCMSInstaller.php'
764
- ),
765
- 'Composer\\Installers\\PortoInstaller' => array(
766
- 'version' => '1.12.0.0',
767
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/PortoInstaller.php'
768
- ),
769
- 'Composer\\Installers\\DolibarrInstaller' => array(
770
- 'version' => '1.12.0.0',
771
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/DolibarrInstaller.php'
772
- ),
773
- 'Composer\\Installers\\BonefishInstaller' => array(
774
- 'version' => '1.12.0.0',
775
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/BonefishInstaller.php'
776
- ),
777
- 'Composer\\Installers\\MayaInstaller' => array(
778
- 'version' => '1.12.0.0',
779
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/MayaInstaller.php'
780
- ),
781
- 'Composer\\Installers\\CroogoInstaller' => array(
782
- 'version' => '1.12.0.0',
783
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/CroogoInstaller.php'
784
- ),
785
- 'Composer\\Installers\\PxcmsInstaller' => array(
786
- 'version' => '1.12.0.0',
787
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/PxcmsInstaller.php'
788
- ),
789
- 'Composer\\Installers\\DecibelInstaller' => array(
790
- 'version' => '1.12.0.0',
791
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/DecibelInstaller.php'
792
- ),
793
- 'Composer\\Installers\\SyDESInstaller' => array(
794
- 'version' => '1.12.0.0',
795
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/SyDESInstaller.php'
796
- ),
797
- 'Composer\\Installers\\LanManagementSystemInstaller' => array(
798
- 'version' => '1.12.0.0',
799
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php'
800
- ),
801
- 'Composer\\Installers\\ClanCatsFrameworkInstaller' => array(
802
- 'version' => '1.12.0.0',
803
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php'
804
- ),
805
- 'Composer\\Installers\\ZikulaInstaller' => array(
806
- 'version' => '1.12.0.0',
807
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/ZikulaInstaller.php'
808
- ),
809
- 'Composer\\Installers\\MantisBTInstaller' => array(
810
- 'version' => '1.12.0.0',
811
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/MantisBTInstaller.php'
812
- ),
813
- 'Composer\\Installers\\SiteDirectInstaller' => array(
814
- 'version' => '1.12.0.0',
815
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/SiteDirectInstaller.php'
816
- ),
817
- 'Composer\\Installers\\WinterInstaller' => array(
818
- 'version' => '1.12.0.0',
819
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/WinterInstaller.php'
820
- ),
821
- 'Composer\\Installers\\MicroweberInstaller' => array(
822
- 'version' => '1.12.0.0',
823
- 'path' => $vendorDir . '/composer/installers/src/Composer/Installers/MicroweberInstaller.php'
824
- ),
825
- 'Automattic\\WooCommerce\\ActionSchedulerJobFramework\\AbstractChainedJob' => array(
826
- 'version' => '2.0.0.0',
827
- 'path' => $vendorDir . '/woocommerce/action-scheduler-job-framework/src/AbstractChainedJob.php'
828
- ),
829
- 'Automattic\\WooCommerce\\ActionSchedulerJobFramework\\JobInterface' => array(
830
- 'version' => '2.0.0.0',
831
- 'path' => $vendorDir . '/woocommerce/action-scheduler-job-framework/src/JobInterface.php'
832
- ),
833
- 'Automattic\\WooCommerce\\ActionSchedulerJobFramework\\AbstractJob' => array(
834
- 'version' => '2.0.0.0',
835
- 'path' => $vendorDir . '/woocommerce/action-scheduler-job-framework/src/AbstractJob.php'
836
- ),
837
- 'Automattic\\WooCommerce\\ActionSchedulerJobFramework\\Utilities\\BatchQueryOffset' => array(
838
- 'version' => '2.0.0.0',
839
- 'path' => $vendorDir . '/woocommerce/action-scheduler-job-framework/src/Utilities/BatchQueryOffset.php'
840
- ),
841
- 'Automattic\\WooCommerce\\ActionSchedulerJobFramework\\Utilities\\BatchSize' => array(
842
- 'version' => '2.0.0.0',
843
- 'path' => $vendorDir . '/woocommerce/action-scheduler-job-framework/src/Utilities/BatchSize.php'
844
- ),
845
- 'Automattic\\WooCommerce\\ActionSchedulerJobFramework\\ChainedJobInterface' => array(
846
- 'version' => '2.0.0.0',
847
- 'path' => $vendorDir . '/woocommerce/action-scheduler-job-framework/src/ChainedJobInterface.php'
848
- ),
849
- 'Automattic\\WooCommerce\\ActionSchedulerJobFramework\\Proxies\\ActionScheduler' => array(
850
- 'version' => '2.0.0.0',
851
- 'path' => $vendorDir . '/woocommerce/action-scheduler-job-framework/src/Proxies/ActionScheduler.php'
852
- ),
853
- 'Automattic\\WooCommerce\\ActionSchedulerJobFramework\\Proxies\\ActionSchedulerInterface' => array(
854
- 'version' => '2.0.0.0',
855
- 'path' => $vendorDir . '/woocommerce/action-scheduler-job-framework/src/Proxies/ActionSchedulerInterface.php'
856
- ),
857
- 'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => array(
858
- 'version' => '2.11.10.0',
859
- 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php'
860
- ),
861
- 'Container' => array(
862
- 'version' => '2.11.10.0',
863
- 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-container.php'
864
- ),
865
- 'Autoloader_Locator' => array(
866
- 'version' => '2.11.10.0',
867
- 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-autoloader-locator.php'
868
- ),
869
- 'Latest_Autoloader_Guard' => array(
870
- 'version' => '2.11.10.0',
871
- 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-latest-autoloader-guard.php'
872
- ),
873
- 'PHP_Autoloader' => array(
874
- 'version' => '2.11.10.0',
875
- 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-php-autoloader.php'
876
- ),
877
- 'Automattic\\Jetpack\\Autoloader\\AutoloadProcessor' => array(
878
- 'version' => '2.11.10.0',
879
- 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadProcessor.php'
880
- ),
881
- 'Autoloader_Handler' => array(
882
- 'version' => '2.11.10.0',
883
- 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-autoloader-handler.php'
884
- ),
885
- 'Automattic\\Jetpack\\Autoloader\\AutoloadFileWriter' => array(
886
- 'version' => '2.11.10.0',
887
- 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadFileWriter.php'
888
- ),
889
- 'Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin' => array(
890
- 'version' => '2.11.10.0',
891
- 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php'
892
- ),
893
- 'Version_Selector' => array(
894
- 'version' => '2.11.10.0',
895
- 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-version-selector.php'
896
- ),
897
- 'Path_Processor' => array(
898
- 'version' => '2.11.10.0',
899
- 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-path-processor.php'
900
- ),
901
- 'Hook_Manager' => array(
902
- 'version' => '2.11.10.0',
903
- 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-hook-manager.php'
904
- ),
905
- 'Manifest_Reader' => array(
906
- 'version' => '2.11.10.0',
907
- 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-manifest-reader.php'
908
- ),
909
- 'Plugin_Locator' => array(
910
- 'version' => '2.11.10.0',
911
- 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-plugin-locator.php'
912
- ),
913
- 'Plugins_Handler' => array(
914
- 'version' => '2.11.10.0',
915
- 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-plugins-handler.php'
916
- ),
917
- 'Autoloader' => array(
918
- 'version' => '2.11.10.0',
919
- 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-autoloader.php'
920
- ),
921
- 'Automattic\\Jetpack\\Autoloader\\ManifestGenerator' => array(
922
- 'version' => '2.11.10.0',
923
- 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/ManifestGenerator.php'
924
- ),
925
- 'Shutdown_Handler' => array(
926
- 'version' => '2.11.10.0',
927
- 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-shutdown-handler.php'
928
- ),
929
- 'Version_Loader' => array(
930
- 'version' => '2.11.10.0',
931
- 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-version-loader.php'
932
- ),
933
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/jetpack-autoloader/class-autoloader-handler.php DELETED
@@ -1,147 +0,0 @@
1
- <?php
2
- /**
3
- * This file was automatically generated by automattic/jetpack-autoloader.
4
- *
5
- * @package automattic/jetpack-autoloader
6
- */
7
-
8
- namespace Automattic\Jetpack\Autoloader\jp7a4ce98532f7554f89341184a808a021;
9
-
10
- // phpcs:ignore
11
-
12
- use Automattic\Jetpack\Autoloader\AutoloadGenerator;
13
-
14
- /**
15
- * This class selects the package version for the autoloader.
16
- */
17
- class Autoloader_Handler {
18
-
19
- /**
20
- * The PHP_Autoloader instance.
21
- *
22
- * @var PHP_Autoloader
23
- */
24
- private $php_autoloader;
25
-
26
- /**
27
- * The Hook_Manager instance.
28
- *
29
- * @var Hook_Manager
30
- */
31
- private $hook_manager;
32
-
33
- /**
34
- * The Manifest_Reader instance.
35
- *
36
- * @var Manifest_Reader
37
- */
38
- private $manifest_reader;
39
-
40
- /**
41
- * The Version_Selector instance.
42
- *
43
- * @var Version_Selector
44
- */
45
- private $version_selector;
46
-
47
- /**
48
- * The constructor.
49
- *
50
- * @param PHP_Autoloader $php_autoloader The PHP_Autoloader instance.
51
- * @param Hook_Manager $hook_manager The Hook_Manager instance.
52
- * @param Manifest_Reader $manifest_reader The Manifest_Reader instance.
53
- * @param Version_Selector $version_selector The Version_Selector instance.
54
- */
55
- public function __construct( $php_autoloader, $hook_manager, $manifest_reader, $version_selector ) {
56
- $this->php_autoloader = $php_autoloader;
57
- $this->hook_manager = $hook_manager;
58
- $this->manifest_reader = $manifest_reader;
59
- $this->version_selector = $version_selector;
60
- }
61
-
62
- /**
63
- * Checks to see whether or not an autoloader is currently in the process of initializing.
64
- *
65
- * @return bool
66
- */
67
- public function is_initializing() {
68
- // If no version has been set it means that no autoloader has started initializing yet.
69
- global $jetpack_autoloader_latest_version;
70
- if ( ! isset( $jetpack_autoloader_latest_version ) ) {
71
- return false;
72
- }
73
-
74
- // When the version is set but the classmap is not it ALWAYS means that this is the
75
- // latest autoloader and is being included by an older one.
76
- global $jetpack_packages_classmap;
77
- if ( empty( $jetpack_packages_classmap ) ) {
78
- return true;
79
- }
80
-
81
- // Version 2.4.0 added a new global and altered the reset semantics. We need to check
82
- // the other global as well since it may also point at initialization.
83
- // Note: We don't need to check for the class first because every autoloader that
84
- // will set the latest version global requires this class in the classmap.
85
- $replacing_version = $jetpack_packages_classmap[ AutoloadGenerator::class ]['version'];
86
- if ( $this->version_selector->is_dev_version( $replacing_version ) || version_compare( $replacing_version, '2.4.0.0', '>=' ) ) {
87
- global $jetpack_autoloader_loader;
88
- if ( ! isset( $jetpack_autoloader_loader ) ) {
89
- return true;
90
- }
91
- }
92
-
93
- return false;
94
- }
95
-
96
- /**
97
- * Activates an autoloader using the given plugins and activates it.
98
- *
99
- * @param string[] $plugins The plugins to initialize the autoloader for.
100
- */
101
- public function activate_autoloader( $plugins ) {
102
- global $jetpack_packages_psr4;
103
- $jetpack_packages_psr4 = array();
104
- $this->manifest_reader->read_manifests( $plugins, 'vendor/composer/jetpack_autoload_psr4.php', $jetpack_packages_psr4 );
105
-
106
- global $jetpack_packages_classmap;
107
- $jetpack_packages_classmap = array();
108
- $this->manifest_reader->read_manifests( $plugins, 'vendor/composer/jetpack_autoload_classmap.php', $jetpack_packages_classmap );
109
-
110
- global $jetpack_packages_filemap;
111
- $jetpack_packages_filemap = array();
112
- $this->manifest_reader->read_manifests( $plugins, 'vendor/composer/jetpack_autoload_filemap.php', $jetpack_packages_filemap );
113
-
114
- $loader = new Version_Loader(
115
- $this->version_selector,
116
- $jetpack_packages_classmap,
117
- $jetpack_packages_psr4,
118
- $jetpack_packages_filemap
119
- );
120
-
121
- $this->php_autoloader->register_autoloader( $loader );
122
-
123
- // Now that the autoloader is active we can load the filemap.
124
- $loader->load_filemap();
125
- }
126
-
127
- /**
128
- * Resets the active autoloader and all related global state.
129
- */
130
- public function reset_autoloader() {
131
- $this->php_autoloader->unregister_autoloader();
132
- $this->hook_manager->reset();
133
-
134
- // Clear all of the autoloader globals so that older autoloaders don't do anything strange.
135
- global $jetpack_autoloader_latest_version;
136
- $jetpack_autoloader_latest_version = null;
137
-
138
- global $jetpack_packages_classmap;
139
- $jetpack_packages_classmap = array(); // Must be array to avoid exceptions in old autoloaders!
140
-
141
- global $jetpack_packages_psr4;
142
- $jetpack_packages_psr4 = array(); // Must be array to avoid exceptions in old autoloaders!
143
-
144
- global $jetpack_packages_filemap;
145
- $jetpack_packages_filemap = array(); // Must be array to avoid exceptions in old autoloaders!
146
- }
147
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/jetpack-autoloader/class-autoloader-locator.php DELETED
@@ -1,90 +0,0 @@
1
- <?php
2
- /**
3
- * This file was automatically generated by automattic/jetpack-autoloader.
4
- *
5
- * @package automattic/jetpack-autoloader
6
- */
7
-
8
- namespace Automattic\Jetpack\Autoloader\jp7a4ce98532f7554f89341184a808a021;
9
-
10
- // phpcs:ignore
11
-
12
- use Automattic\Jetpack\Autoloader\AutoloadGenerator;
13
-
14
- /**
15
- * This class locates autoloaders.
16
- */
17
- class Autoloader_Locator {
18
-
19
- /**
20
- * The object for comparing autoloader versions.
21
- *
22
- * @var Version_Selector
23
- */
24
- private $version_selector;
25
-
26
- /**
27
- * The constructor.
28
- *
29
- * @param Version_Selector $version_selector The version selector object.
30
- */
31
- public function __construct( $version_selector ) {
32
- $this->version_selector = $version_selector;
33
- }
34
-
35
- /**
36
- * Finds the path to the plugin with the latest autoloader.
37
- *
38
- * @param array $plugin_paths An array of plugin paths.
39
- * @param string $latest_version The latest version reference.
40
- *
41
- * @return string|null
42
- */
43
- public function find_latest_autoloader( $plugin_paths, &$latest_version ) {
44
- $latest_plugin = null;
45
-
46
- foreach ( $plugin_paths as $plugin_path ) {
47
- $version = $this->get_autoloader_version( $plugin_path );
48
- if ( ! $this->version_selector->is_version_update_required( $latest_version, $version ) ) {
49
- continue;
50
- }
51
-
52
- $latest_version = $version;
53
- $latest_plugin = $plugin_path;
54
- }
55
-
56
- return $latest_plugin;
57
- }
58
-
59
- /**
60
- * Gets the path to the autoloader.
61
- *
62
- * @param string $plugin_path The path to the plugin.
63
- *
64
- * @return string
65
- */
66
- public function get_autoloader_path( $plugin_path ) {
67
- return trailingslashit( $plugin_path ) . 'vendor/autoload_packages.php';
68
- }
69
-
70
- /**
71
- * Gets the version for the autoloader.
72
- *
73
- * @param string $plugin_path The path to the plugin.
74
- *
75
- * @return string|null
76
- */
77
- public function get_autoloader_version( $plugin_path ) {
78
- $classmap = trailingslashit( $plugin_path ) . 'vendor/composer/jetpack_autoload_classmap.php';
79
- if ( ! file_exists( $classmap ) ) {
80
- return null;
81
- }
82
-
83
- $classmap = require $classmap;
84
- if ( isset( $classmap[ AutoloadGenerator::class ] ) ) {
85
- return $classmap[ AutoloadGenerator::class ]['version'];
86
- }
87
-
88
- return null;
89
- }
90
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/jetpack-autoloader/class-autoloader.php DELETED
@@ -1,90 +0,0 @@
1
- <?php
2
- /**
3
- * This file was automatically generated by automattic/jetpack-autoloader.
4
- *
5
- * @package automattic/jetpack-autoloader
6
- */
7
-
8
- namespace Automattic\Jetpack\Autoloader\jp7a4ce98532f7554f89341184a808a021;
9
-
10
- // phpcs:ignore
11
-
12
- /**
13
- * This class handles management of the actual PHP autoloader.
14
- */
15
- class Autoloader {
16
-
17
- /**
18
- * Checks to see whether or not the autoloader should be initialized and then initializes it if so.
19
- *
20
- * @param Container|null $container The container we want to use for autoloader initialization. If none is given
21
- * then a container will be created automatically.
22
- */
23
- public static function init( $container = null ) {
24
- // The container holds and manages the lifecycle of our dependencies
25
- // to make them easier to work with and increase flexibility.
26
- if ( ! isset( $container ) ) {
27
- require_once __DIR__ . '/class-container.php';
28
- $container = new Container();
29
- }
30
-
31
- // phpcs:disable Generic.Commenting.DocComment.MissingShort
32
-
33
- /** @var Autoloader_Handler $autoloader_handler */
34
- $autoloader_handler = $container->get( Autoloader_Handler::class );
35
-
36
- // If the autoloader is already initializing it means that it has included us as the latest.
37
- $was_included_by_autoloader = $autoloader_handler->is_initializing();
38
-
39
- /** @var Plugin_Locator $plugin_locator */
40
- $plugin_locator = $container->get( Plugin_Locator::class );
41
-
42
- /** @var Plugins_Handler $plugins_handler */
43
- $plugins_handler = $container->get( Plugins_Handler::class );
44
-
45
- // The current plugin is the one that we are attempting to initialize here.
46
- $current_plugin = $plugin_locator->find_current_plugin();
47
-
48
- // The active plugins are those that we were able to discover on the site. This list will not
49
- // include mu-plugins, those activated by code, or those who are hidden by filtering. We also
50
- // want to take care to not consider the current plugin unknown if it was included by an
51
- // autoloader. This avoids the case where a plugin will be marked "active" while deactivated
52
- // due to it having the latest autoloader.
53
- $active_plugins = $plugins_handler->get_active_plugins( true, ! $was_included_by_autoloader );
54
-
55
- // The cached plugins are all of those that were active or discovered by the autoloader during a previous request.
56
- // Note that it's possible this list will include plugins that have since been deactivated, but after a request
57
- // the cache should be updated and the deactivated plugins will be removed.
58
- $cached_plugins = $plugins_handler->get_cached_plugins();
59
-
60
- // We combine the active list and cached list to preemptively load classes for plugins that are
61
- // presently unknown but will be loaded during the request. While this may result in us considering packages in
62
- // deactivated plugins there shouldn't be any problems as a result and the eventual consistency is sufficient.
63
- $all_plugins = array_merge( $active_plugins, $cached_plugins );
64
-
65
- // In particular we also include the current plugin to address the case where it is the latest autoloader
66
- // but also unknown (and not cached). We don't want it in the active list because we don't know that it
67
- // is active but we need it in the all plugins list so that it is considered by the autoloader.
68
- $all_plugins[] = $current_plugin;
69
-
70
- // We require uniqueness in the array to avoid processing the same plugin more than once.
71
- $all_plugins = array_values( array_unique( $all_plugins ) );
72
-
73
- /** @var Latest_Autoloader_Guard $guard */
74
- $guard = $container->get( Latest_Autoloader_Guard::class );
75
- if ( $guard->should_stop_init( $current_plugin, $all_plugins, $was_included_by_autoloader ) ) {
76
- return;
77
- }
78
-
79
- // Initialize the autoloader using the handler now that we're ready.
80
- $autoloader_handler->activate_autoloader( $all_plugins );
81
-
82
- /** @var Hook_Manager $hook_manager */
83
- $hook_manager = $container->get( Hook_Manager::class );
84
-
85
- // Register a shutdown handler to clean up the autoloader.
86
- $hook_manager->add_action( 'shutdown', new Shutdown_Handler( $plugins_handler, $cached_plugins, $was_included_by_autoloader ) );
87
-
88
- // phpcs:enable Generic.Commenting.DocComment.MissingShort
89
- }
90
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/jetpack-autoloader/class-container.php DELETED
@@ -1,150 +0,0 @@
1
- <?php
2
- /**
3
- * This file was automatically generated by automattic/jetpack-autoloader.
4
- *
5
- * @package automattic/jetpack-autoloader
6
- */
7
-
8
- namespace Automattic\Jetpack\Autoloader\jp7a4ce98532f7554f89341184a808a021;
9
-
10
- // phpcs:ignore
11
-
12
- /**
13
- * This class manages the files and dependencies of the autoloader.
14
- */
15
- class Container {
16
-
17
- /**
18
- * Since each autoloader's class files exist within their own namespace we need a map to
19
- * convert between the local class and a shared key. Note that no version checking is
20
- * performed on these dependencies and the first autoloader to register will be the
21
- * one that is utilized.
22
- */
23
- const SHARED_DEPENDENCY_KEYS = array(
24
- Hook_Manager::class => 'Hook_Manager',
25
- );
26
-
27
- /**
28
- * A map of all the dependencies we've registered with the container and created.
29
- *
30
- * @var array
31
- */
32
- protected $dependencies;
33
-
34
- /**
35
- * The constructor.
36
- */
37
- public function __construct() {
38
- $this->dependencies = array();
39
-
40
- $this->register_shared_dependencies();
41
- $this->register_dependencies();
42
- $this->initialize_globals();
43
- }
44
-
45
- /**
46
- * Gets a dependency out of the container.
47
- *
48
- * @param string $class The class to fetch.
49
- *
50
- * @return mixed
51
- * @throws \InvalidArgumentException When a class that isn't registered with the container is fetched.
52
- */
53
- public function get( $class ) {
54
- if ( ! isset( $this->dependencies[ $class ] ) ) {
55
- throw new \InvalidArgumentException( "Class '$class' is not registered with the container." );
56
- }
57
-
58
- return $this->dependencies[ $class ];
59
- }
60
-
61
- /**
62
- * Registers all of the dependencies that are shared between all instances of the autoloader.
63
- */
64
- private function register_shared_dependencies() {
65
- global $jetpack_autoloader_container_shared;
66
- if ( ! isset( $jetpack_autoloader_container_shared ) ) {
67
- $jetpack_autoloader_container_shared = array();
68
- }
69
-
70
- $key = self::SHARED_DEPENDENCY_KEYS[ Hook_Manager::class ];
71
- if ( ! isset( $jetpack_autoloader_container_shared[ $key ] ) ) {
72
- require_once __DIR__ . '/class-hook-manager.php';
73
- $jetpack_autoloader_container_shared[ $key ] = new Hook_Manager();
74
- }
75
- $this->dependencies[ Hook_Manager::class ] = &$jetpack_autoloader_container_shared[ $key ];
76
- }
77
-
78
- /**
79
- * Registers all of the dependencies with the container.
80
- */
81
- private function register_dependencies() {
82
- require_once __DIR__ . '/class-path-processor.php';
83
- $this->dependencies[ Path_Processor::class ] = new Path_Processor();
84
-
85
- require_once __DIR__ . '/class-plugin-locator.php';
86
- $this->dependencies[ Plugin_Locator::class ] = new Plugin_Locator(
87
- $this->get( Path_Processor::class )
88
- );
89
-
90
- require_once __DIR__ . '/class-version-selector.php';
91
- $this->dependencies[ Version_Selector::class ] = new Version_Selector();
92
-
93
- require_once __DIR__ . '/class-autoloader-locator.php';
94
- $this->dependencies[ Autoloader_Locator::class ] = new Autoloader_Locator(
95
- $this->get( Version_Selector::class )
96
- );
97
-
98
- require_once __DIR__ . '/class-php-autoloader.php';
99
- $this->dependencies[ PHP_Autoloader::class ] = new PHP_Autoloader();
100
-
101
- require_once __DIR__ . '/class-manifest-reader.php';
102
- $this->dependencies[ Manifest_Reader::class ] = new Manifest_Reader(
103
- $this->get( Version_Selector::class )
104
- );
105
-
106
- require_once __DIR__ . '/class-plugins-handler.php';
107
- $this->dependencies[ Plugins_Handler::class ] = new Plugins_Handler(
108
- $this->get( Plugin_Locator::class ),
109
- $this->get( Path_Processor::class )
110
- );
111
-
112
- require_once __DIR__ . '/class-autoloader-handler.php';
113
- $this->dependencies[ Autoloader_Handler::class ] = new Autoloader_Handler(
114
- $this->get( PHP_Autoloader::class ),
115
- $this->get( Hook_Manager::class ),
116
- $this->get( Manifest_Reader::class ),
117
- $this->get( Version_Selector::class )
118
- );
119
-
120
- require_once __DIR__ . '/class-latest-autoloader-guard.php';
121
- $this->dependencies[ Latest_Autoloader_Guard::class ] = new Latest_Autoloader_Guard(
122
- $this->get( Plugins_Handler::class ),
123
- $this->get( Autoloader_Handler::class ),
124
- $this->get( Autoloader_Locator::class )
125
- );
126
-
127
- // Register any classes that we will use elsewhere.
128
- require_once __DIR__ . '/class-version-loader.php';
129
- require_once __DIR__ . '/class-shutdown-handler.php';
130
- }
131
-
132
- /**
133
- * Initializes any of the globals needed by the autoloader.
134
- */
135
- private function initialize_globals() {
136
- /*
137
- * This global was retired in version 2.9. The value is set to 'false' to maintain
138
- * compatibility with older versions of the autoloader.
139
- */
140
- global $jetpack_autoloader_including_latest;
141
- $jetpack_autoloader_including_latest = false;
142
-
143
- // Not all plugins can be found using the locator. In cases where a plugin loads the autoloader
144
- // but was not discoverable, we will record them in this array to track them as "active".
145
- global $jetpack_autoloader_activating_plugins_paths;
146
- if ( ! isset( $jetpack_autoloader_activating_plugins_paths ) ) {
147
- $jetpack_autoloader_activating_plugins_paths = array();
148
- }
149
- }
150
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/jetpack-autoloader/class-hook-manager.php DELETED
@@ -1,76 +0,0 @@
1
- <?php
2
- /**
3
- * This file was automatically generated by automattic/jetpack-autoloader.
4
- *
5
- * @package automattic/jetpack-autoloader
6
- */
7
-
8
- namespace Automattic\Jetpack\Autoloader\jp7a4ce98532f7554f89341184a808a021;
9
-
10
- // phpcs:ignore
11
-
12
- /**
13
- * Allows the latest autoloader to register hooks that can be removed when the autoloader is reset.
14
- */
15
- class Hook_Manager {
16
-
17
- /**
18
- * An array containing all of the hooks that we've registered.
19
- *
20
- * @var array
21
- */
22
- private $registered_hooks;
23
-
24
- /**
25
- * The constructor.
26
- */
27
- public function __construct() {
28
- $this->registered_hooks = array();
29
- }
30
-
31
- /**
32
- * Adds an action to WordPress and registers it internally.
33
- *
34
- * @param string $tag The name of the action which is hooked.
35
- * @param callable $callable The function to call.
36
- * @param int $priority Used to specify the priority of the action.
37
- * @param int $accepted_args Used to specify the number of arguments the callable accepts.
38
- */
39
- public function add_action( $tag, $callable, $priority = 10, $accepted_args = 1 ) {
40
- $this->registered_hooks[ $tag ][] = array(
41
- 'priority' => $priority,
42
- 'callable' => $callable,
43
- );
44
-
45
- add_action( $tag, $callable, $priority, $accepted_args );
46
- }
47
-
48
- /**
49
- * Adds a filter to WordPress and registers it internally.
50
- *
51
- * @param string $tag The name of the filter which is hooked.
52
- * @param callable $callable The function to call.
53
- * @param int $priority Used to specify the priority of the filter.
54
- * @param int $accepted_args Used to specify the number of arguments the callable accepts.
55
- */
56
- public function add_filter( $tag, $callable, $priority = 10, $accepted_args = 1 ) {
57
- $this->registered_hooks[ $tag ][] = array(
58
- 'priority' => $priority,
59
- 'callable' => $callable,
60
- );
61
-
62
- add_filter( $tag, $callable, $priority, $accepted_args );
63
- }
64
-
65
- /**
66
- * Removes all of the registered hooks.
67
- */
68
- public function reset() {
69
- foreach ( $this->registered_hooks as $tag => $hooks ) {
70
- foreach ( $hooks as $hook ) {
71
- remove_filter( $tag, $hook['callable'], $hook['priority'] );
72
- }
73
- }
74
- $this->registered_hooks = array();
75
- }
76
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/jetpack-autoloader/class-latest-autoloader-guard.php DELETED
@@ -1,86 +0,0 @@
1
- <?php
2
- /**
3
- * This file was automatically generated by automattic/jetpack-autoloader.
4
- *
5
- * @package automattic/jetpack-autoloader
6
- */
7
-
8
- namespace Automattic\Jetpack\Autoloader\jp7a4ce98532f7554f89341184a808a021;
9
-
10
- // phpcs:ignore
11
-
12
- /**
13
- * This class ensures that we're only executing the latest autoloader.
14
- */
15
- class Latest_Autoloader_Guard {
16
-
17
- /**
18
- * The Plugins_Handler instance.
19
- *
20
- * @var Plugins_Handler
21
- */
22
- private $plugins_handler;
23
-
24
- /**
25
- * The Autoloader_Handler instance.
26
- *
27
- * @var Autoloader_Handler
28
- */
29
- private $autoloader_handler;
30
-
31
- /**
32
- * The Autoloader_locator instance.
33
- *
34
- * @var Autoloader_Locator
35
- */
36
- private $autoloader_locator;
37
-
38
- /**
39
- * The constructor.
40
- *
41
- * @param Plugins_Handler $plugins_handler The Plugins_Handler instance.
42
- * @param Autoloader_Handler $autoloader_handler The Autoloader_Handler instance.
43
- * @param Autoloader_Locator $autoloader_locator The Autoloader_Locator instance.
44
- */
45
- public function __construct( $plugins_handler, $autoloader_handler, $autoloader_locator ) {
46
- $this->plugins_handler = $plugins_handler;
47
- $this->autoloader_handler = $autoloader_handler;
48
- $this->autoloader_locator = $autoloader_locator;
49
- }
50
-
51
- /**
52
- * Indicates whether or not the autoloader should be initialized. Note that this function
53
- * has the side-effect of actually loading the latest autoloader in the event that this
54
- * is not it.
55
- *
56
- * @param string $current_plugin The current plugin we're checking.
57
- * @param string[] $plugins The active plugins to check for autoloaders in.
58
- * @param bool $was_included_by_autoloader Indicates whether or not this autoloader was included by another.
59
- *
60
- * @return bool True if we should stop initialization, otherwise false.
61
- */
62
- public function should_stop_init( $current_plugin, $plugins, $was_included_by_autoloader ) {
63
- global $jetpack_autoloader_latest_version;
64
-
65
- // We need to reset the autoloader when the plugins change because
66
- // that means the autoloader was generated with a different list.
67
- if ( $this->plugins_handler->have_plugins_changed( $plugins ) ) {
68
- $this->autoloader_handler->reset_autoloader();
69
- }
70
-
71
- // When the latest autoloader has already been found we don't need to search for it again.
72
- // We should take care however because this will also trigger if the autoloader has been
73
- // included by an older one.
74
- if ( isset( $jetpack_autoloader_latest_version ) && ! $was_included_by_autoloader ) {
75
- return true;
76
- }
77
-
78
- $latest_plugin = $this->autoloader_locator->find_latest_autoloader( $plugins, $jetpack_autoloader_latest_version );
79
- if ( isset( $latest_plugin ) && $latest_plugin !== $current_plugin ) {
80
- require $this->autoloader_locator->get_autoloader_path( $latest_plugin );
81
- return true;
82
- }
83
-
84
- return false;
85
- }
86
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/jetpack-autoloader/class-manifest-reader.php DELETED
@@ -1,99 +0,0 @@
1
- <?php
2
- /**
3
- * This file was automatically generated by automattic/jetpack-autoloader.
4
- *
5
- * @package automattic/jetpack-autoloader
6
- */
7
-
8
- namespace Automattic\Jetpack\Autoloader\jp7a4ce98532f7554f89341184a808a021;
9
-
10
- // phpcs:ignore
11
-
12
- /**
13
- * This class reads autoloader manifest files.
14
- */
15
- class Manifest_Reader {
16
-
17
- /**
18
- * The Version_Selector object.
19
- *
20
- * @var Version_Selector
21
- */
22
- private $version_selector;
23
-
24
- /**
25
- * The constructor.
26
- *
27
- * @param Version_Selector $version_selector The Version_Selector object.
28
- */
29
- public function __construct( $version_selector ) {
30
- $this->version_selector = $version_selector;
31
- }
32
-
33
- /**
34
- * Reads all of the manifests in the given plugin paths.
35
- *
36
- * @param array $plugin_paths The paths to the plugins we're loading the manifest in.
37
- * @param string $manifest_path The path that we're loading the manifest from in each plugin.
38
- * @param array $path_map The path map to add the contents of the manifests to.
39
- *
40
- * @return array $path_map The path map we've built using the manifests in each plugin.
41
- */
42
- public function read_manifests( $plugin_paths, $manifest_path, &$path_map ) {
43
- $file_paths = array_map(
44
- function ( $path ) use ( $manifest_path ) {
45
- return trailingslashit( $path ) . $manifest_path;
46
- },
47
- $plugin_paths
48
- );
49
-
50
- foreach ( $file_paths as $path ) {
51
- $this->register_manifest( $path, $path_map );
52
- }
53
-
54
- return $path_map;
55
- }
56
-
57
- /**
58
- * Registers a plugin's manifest file with the path map.
59
- *
60
- * @param string $manifest_path The absolute path to the manifest that we're loading.
61
- * @param array $path_map The path map to add the contents of the manifest to.
62
- */
63
- protected function register_manifest( $manifest_path, &$path_map ) {
64
- if ( ! is_readable( $manifest_path ) ) {
65
- return;
66
- }
67
-
68
- $manifest = require $manifest_path;
69
- if ( ! is_array( $manifest ) ) {
70
- return;
71
- }
72
-
73
- foreach ( $manifest as $key => $data ) {
74
- $this->register_record( $key, $data, $path_map );
75
- }
76
- }
77
-
78
- /**
79
- * Registers an entry from the manifest in the path map.
80
- *
81
- * @param string $key The identifier for the entry we're registering.
82
- * @param array $data The data for the entry we're registering.
83
- * @param array $path_map The path map to add the contents of the manifest to.
84
- */
85
- protected function register_record( $key, $data, &$path_map ) {
86
- if ( isset( $path_map[ $key ]['version'] ) ) {
87
- $selected_version = $path_map[ $key ]['version'];
88
- } else {
89
- $selected_version = null;
90
- }
91
-
92
- if ( $this->version_selector->is_version_update_required( $selected_version, $data['version'] ) ) {
93
- $path_map[ $key ] = array(
94
- 'version' => $data['version'],
95
- 'path' => $data['path'],
96
- );
97
- }
98
- }
99
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/jetpack-autoloader/class-path-processor.php DELETED
@@ -1,194 +0,0 @@
1
- <?php
2
- /**
3
- * This file was automatically generated by automattic/jetpack-autoloader.
4
- *
5
- * @package automattic/jetpack-autoloader
6
- */
7
-
8
- namespace Automattic\Jetpack\Autoloader\jp7a4ce98532f7554f89341184a808a021;
9
-
10
- // phpcs:ignore
11
-
12
- /**
13
- * This class handles dealing with paths for the autoloader.
14
- */
15
- class Path_Processor {
16
- /**
17
- * Given a path this will replace any of the path constants with a token to represent it.
18
- *
19
- * @param string $path The path we want to process.
20
- *
21
- * @return string The tokenized path.
22
- */
23
- public function tokenize_path_constants( $path ) {
24
- $path = wp_normalize_path( $path );
25
-
26
- $constants = $this->get_normalized_constants();
27
- foreach ( $constants as $constant => $constant_path ) {
28
- $len = strlen( $constant_path );
29
- if ( substr( $path, 0, $len ) !== $constant_path ) {
30
- continue;
31
- }
32
-
33
- return substr_replace( $path, '{{' . $constant . '}}', 0, $len );
34
- }
35
-
36
- return $path;
37
- }
38
-
39
- /**
40
- * Given a path this will replace any of the path constant tokens with the expanded path.
41
- *
42
- * @param string $tokenized_path The path we want to process.
43
- *
44
- * @return string The expanded path.
45
- */
46
- public function untokenize_path_constants( $tokenized_path ) {
47
- $tokenized_path = wp_normalize_path( $tokenized_path );
48
-
49
- $constants = $this->get_normalized_constants();
50
- foreach ( $constants as $constant => $constant_path ) {
51
- $constant = '{{' . $constant . '}}';
52
-
53
- $len = strlen( $constant );
54
- if ( substr( $tokenized_path, 0, $len ) !== $constant ) {
55
- continue;
56
- }
57
-
58
- return $this->get_real_path( substr_replace( $tokenized_path, $constant_path, 0, $len ) );
59
- }
60
-
61
- return $tokenized_path;
62
- }
63
-
64
- /**
65
- * Given a file and an array of places it might be, this will find the absolute path and return it.
66
- *
67
- * @param string $file The plugin or theme file to resolve.
68
- * @param array $directories_to_check The directories we should check for the file if it isn't an absolute path.
69
- *
70
- * @return string|false Returns the absolute path to the directory, otherwise false.
71
- */
72
- public function find_directory_with_autoloader( $file, $directories_to_check ) {
73
- $file = wp_normalize_path( $file );
74
-
75
- if ( ! $this->is_absolute_path( $file ) ) {
76
- $file = $this->find_absolute_plugin_path( $file, $directories_to_check );
77
- if ( ! isset( $file ) ) {
78
- return false;
79
- }
80
- }
81
-
82
- // We need the real path for consistency with __DIR__ paths.
83
- $file = $this->get_real_path( $file );
84
-
85
- // phpcs:disable WordPress.PHP.NoSilencedErrors.Discouraged
86
- $directory = @is_file( $file ) ? dirname( $file ) : $file;
87
- if ( ! @is_file( $directory . '/vendor/composer/jetpack_autoload_classmap.php' ) ) {
88
- return false;
89
- }
90
- // phpcs:enable WordPress.PHP.NoSilencedErrors.Discouraged
91
-
92
- return $directory;
93
- }
94
-
95
- /**
96
- * Fetches an array of normalized paths keyed by the constant they came from.
97
- *
98
- * @return string[] The normalized paths keyed by the constant.
99
- */
100
- private function get_normalized_constants() {
101
- $raw_constants = array(
102
- // Order the constants from most-specific to least-specific.
103
- 'WP_PLUGIN_DIR',
104
- 'WPMU_PLUGIN_DIR',
105
- 'WP_CONTENT_DIR',
106
- 'ABSPATH',
107
- );
108
-
109
- $constants = array();
110
- foreach ( $raw_constants as $raw ) {
111
- if ( ! defined( $raw ) ) {
112
- continue;
113
- }
114
-
115
- $path = wp_normalize_path( constant( $raw ) );
116
- if ( isset( $path ) ) {
117
- $constants[ $raw ] = $path;
118
- }
119
- }
120
-
121
- return $constants;
122
- }
123
-
124
- /**
125
- * Indicates whether or not a path is absolute.
126
- *
127
- * @param string $path The path to check.
128
- *
129
- * @return bool True if the path is absolute, otherwise false.
130
- */
131
- private function is_absolute_path( $path ) {
132
- if ( 0 === strlen( $path ) || '.' === $path[0] ) {
133
- return false;
134
- }
135
-
136
- // Absolute paths on Windows may begin with a drive letter.
137
- if ( preg_match( '/^[a-zA-Z]:[\/\\\\]/', $path ) ) {
138
- return true;
139
- }
140
-
141
- // A path starting with / or \ is absolute; anything else is relative.
142
- return ( '/' === $path[0] || '\\' === $path[0] );
143
- }
144
-
145
- /**
146
- * Given a file and a list of directories to check, this method will try to figure out
147
- * the absolute path to the file in question.
148
- *
149
- * @param string $normalized_path The normalized path to the plugin or theme file to resolve.
150
- * @param array $directories_to_check The directories we should check for the file if it isn't an absolute path.
151
- *
152
- * @return string|null The absolute path to the plugin file, otherwise null.
153
- */
154
- private function find_absolute_plugin_path( $normalized_path, $directories_to_check ) {
155
- // We're only able to find the absolute path for plugin/theme PHP files.
156
- if ( ! is_string( $normalized_path ) || '.php' !== substr( $normalized_path, -4 ) ) {
157
- return null;
158
- }
159
-
160
- foreach ( $directories_to_check as $directory ) {
161
- $normalized_check = wp_normalize_path( trailingslashit( $directory ) ) . $normalized_path;
162
- // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
163
- if ( @is_file( $normalized_check ) ) {
164
- return $normalized_check;
165
- }
166
- }
167
-
168
- return null;
169
- }
170
-
171
- /**
172
- * Given a path this will figure out the real path that we should be using.
173
- *
174
- * @param string $path The path to resolve.
175
- *
176
- * @return string The resolved path.
177
- */
178
- private function get_real_path( $path ) {
179
- // We want to resolve symbolic links for consistency with __DIR__ paths.
180
- // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
181
- $real_path = @realpath( $path );
182
- if ( false === $real_path ) {
183
- // Let the autoloader deal with paths that don't exist.
184
- $real_path = $path;
185
- }
186
-
187
- // Using realpath will make it platform-specific so we must normalize it after.
188
- if ( $path !== $real_path ) {
189
- $real_path = wp_normalize_path( $real_path );
190
- }
191
-
192
- return $real_path;
193
- }
194
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/jetpack-autoloader/class-php-autoloader.php DELETED
@@ -1,93 +0,0 @@
1
- <?php
2
- /**
3
- * This file was automatically generated by automattic/jetpack-autoloader.
4
- *
5
- * @package automattic/jetpack-autoloader
6
- */
7
-
8
- namespace Automattic\Jetpack\Autoloader\jp7a4ce98532f7554f89341184a808a021;
9
-
10
- // phpcs:ignore
11
-
12
- /**
13
- * This class handles management of the actual PHP autoloader.
14
- */
15
- class PHP_Autoloader {
16
-
17
- /**
18
- * Registers the autoloader with PHP so that it can begin autoloading classes.
19
- *
20
- * @param Version_Loader $version_loader The class loader to use in the autoloader.
21
- */
22
- public function register_autoloader( $version_loader ) {
23
- // Make sure no other autoloaders are registered.
24
- $this->unregister_autoloader();
25
-
26
- // Set the global so that it can be used to load classes.
27
- global $jetpack_autoloader_loader;
28
- $jetpack_autoloader_loader = $version_loader;
29
-
30
- // Ensure that the autoloader is first to avoid contention with others.
31
- spl_autoload_register( array( self::class, 'load_class' ), true, true );
32
- }
33
-
34
- /**
35
- * Unregisters the active autoloader so that it will no longer autoload classes.
36
- */
37
- public function unregister_autoloader() {
38
- // Remove any v2 autoloader that we've already registered.
39
- $autoload_chain = spl_autoload_functions();
40
- if ( ! $autoload_chain ) {
41
- return;
42
- }
43
- foreach ( $autoload_chain as $autoloader ) {
44
- // We can identify a v2 autoloader using the namespace.
45
- $namespace_check = null;
46
-
47
- // Functions are recorded as strings.
48
- if ( is_string( $autoloader ) ) {
49
- $namespace_check = $autoloader;
50
- } elseif ( is_array( $autoloader ) && is_string( $autoloader[0] ) ) {
51
- // Static method calls have the class as the first array element.
52
- $namespace_check = $autoloader[0];
53
- } else {
54
- // Since the autoloader has only ever been a function or a static method we don't currently need to check anything else.
55
- continue;
56
- }
57
-
58
- // Check for the namespace without the generated suffix.
59
- if ( 'Automattic\\Jetpack\\Autoloader\\jp' === substr( $namespace_check, 0, 32 ) ) {
60
- spl_autoload_unregister( $autoloader );
61
- }
62
- }
63
-
64
- // Clear the global now that the autoloader has been unregistered.
65
- global $jetpack_autoloader_loader;
66
- $jetpack_autoloader_loader = null;
67
- }
68
-
69
- /**
70
- * Loads a class file if one could be found.
71
- *
72
- * Note: This function is static so that the autoloader can be easily unregistered. If
73
- * it was a class method we would have to unwrap the object to check the namespace.
74
- *
75
- * @param string $class_name The name of the class to autoload.
76
- *
77
- * @return bool Indicates whether or not a class file was loaded.
78
- */
79
- public static function load_class( $class_name ) {
80
- global $jetpack_autoloader_loader;
81
- if ( ! isset( $jetpack_autoloader_loader ) ) {
82
- return;
83
- }
84
-
85
- $file = $jetpack_autoloader_loader->find_class_file( $class_name );
86
- if ( ! isset( $file ) ) {
87
- return false;
88
- }
89
-
90
- require $file;
91
- return true;
92
- }
93
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/jetpack-autoloader/class-plugin-locator.php DELETED
@@ -1,156 +0,0 @@
1
- <?php
2
- /**
3
- * This file was automatically generated by automattic/jetpack-autoloader.
4
- *
5
- * @package automattic/jetpack-autoloader
6
- */
7
-
8
- namespace Automattic\Jetpack\Autoloader\jp7a4ce98532f7554f89341184a808a021;
9
-
10
- // phpcs:ignore
11
-
12
- /**
13
- * This class scans the WordPress installation to find active plugins.
14
- */
15
- class Plugin_Locator {
16
-
17
- /**
18
- * The path processor for finding plugin paths.
19
- *
20
- * @var Path_Processor
21
- */
22
- private $path_processor;
23
-
24
- /**
25
- * The constructor.
26
- *
27
- * @param Path_Processor $path_processor The Path_Processor instance.
28
- */
29
- public function __construct( $path_processor ) {
30
- $this->path_processor = $path_processor;
31
- }
32
-
33
- /**
34
- * Finds the path to the current plugin.
35
- *
36
- * @return string $path The path to the current plugin.
37
- *
38
- * @throws \RuntimeException If the current plugin does not have an autoloader.
39
- */
40
- public function find_current_plugin() {
41
- // Escape from `vendor/__DIR__` to root plugin directory.
42
- $plugin_directory = dirname( dirname( __DIR__ ) );
43
-
44
- // Use the path processor to ensure that this is an autoloader we're referencing.
45
- $path = $this->path_processor->find_directory_with_autoloader( $plugin_directory, array() );
46
- if ( false === $path ) {
47
- throw new \RuntimeException( 'Failed to locate plugin ' . $plugin_directory );
48
- }
49
-
50
- return $path;
51
- }
52
-
53
- /**
54
- * Checks a given option for plugin paths.
55
- *
56
- * @param string $option_name The option that we want to check for plugin information.
57
- * @param bool $site_option Indicates whether or not we want to check the site option.
58
- *
59
- * @return array $plugin_paths The list of absolute paths we've found.
60
- */
61
- public function find_using_option( $option_name, $site_option = false ) {
62
- $raw = $site_option ? get_site_option( $option_name ) : get_option( $option_name );
63
- if ( false === $raw ) {
64
- return array();
65
- }
66
-
67
- return $this->convert_plugins_to_paths( $raw );
68
- }
69
-
70
- /**
71
- * Checks for plugins in the `action` request parameter.
72
- *
73
- * @param string[] $allowed_actions The actions that we're allowed to return plugins for.
74
- *
75
- * @return array $plugin_paths The list of absolute paths we've found.
76
- */
77
- public function find_using_request_action( $allowed_actions ) {
78
- // phpcs:disable WordPress.Security.NonceVerification.Recommended
79
-
80
- /**
81
- * Note: we're not actually checking the nonce here because it's too early
82
- * in the execution. The pluggable functions are not yet loaded to give
83
- * plugins a chance to plug their versions. Therefore we're doing the bare
84
- * minimum: checking whether the nonce exists and it's in the right place.
85
- * The request will fail later if the nonce doesn't pass the check.
86
- */
87
- if ( empty( $_REQUEST['_wpnonce'] ) ) {
88
- return array();
89
- }
90
-
91
- // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Validated just below.
92
- $action = isset( $_REQUEST['action'] ) ? wp_unslash( $_REQUEST['action'] ) : false;
93
- if ( ! in_array( $action, $allowed_actions, true ) ) {
94
- return array();
95
- }
96
-
97
- $plugin_slugs = array();
98
- switch ( $action ) {
99
- case 'activate':
100
- case 'deactivate':
101
- if ( empty( $_REQUEST['plugin'] ) ) {
102
- break;
103
- }
104
-
105
- // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Validated by convert_plugins_to_paths.
106
- $plugin_slugs[] = wp_unslash( $_REQUEST['plugin'] );
107
- break;
108
-
109
- case 'activate-selected':
110
- case 'deactivate-selected':
111
- if ( empty( $_REQUEST['checked'] ) ) {
112
- break;
113
- }
114
-
115
- // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Validated by convert_plugins_to_paths.
116
- $plugin_slugs = wp_unslash( $_REQUEST['checked'] );
117
- break;
118
- }
119
-
120
- // phpcs:enable WordPress.Security.NonceVerification.Recommended
121
- return $this->convert_plugins_to_paths( $plugin_slugs );
122
- }
123
-
124
- /**
125
- * Given an array of plugin slugs or paths, this will convert them to absolute paths and filter
126
- * out the plugins that are not directory plugins. Note that array keys will also be included
127
- * if they are plugin paths!
128
- *
129
- * @param string[] $plugins Plugin paths or slugs to filter.
130
- *
131
- * @return string[]
132
- */
133
- private function convert_plugins_to_paths( $plugins ) {
134
- if ( ! is_array( $plugins ) || empty( $plugins ) ) {
135
- return array();
136
- }
137
-
138
- // We're going to look for plugins in the standard directories.
139
- $path_constants = array( WP_PLUGIN_DIR, WPMU_PLUGIN_DIR );
140
-
141
- $plugin_paths = array();
142
- foreach ( $plugins as $key => $value ) {
143
- $path = $this->path_processor->find_directory_with_autoloader( $key, $path_constants );
144
- if ( $path ) {
145
- $plugin_paths[] = $path;
146
- }
147
-
148
- $path = $this->path_processor->find_directory_with_autoloader( $value, $path_constants );
149
- if ( $path ) {
150
- $plugin_paths[] = $path;
151
- }
152
- }
153
-
154
- return $plugin_paths;
155
- }
156
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/jetpack-autoloader/class-plugins-handler.php DELETED
@@ -1,164 +0,0 @@
1
- <?php
2
- /**
3
- * This file was automatically generated by automattic/jetpack-autoloader.
4
- *
5
- * @package automattic/jetpack-autoloader
6
- */
7
-
8
- namespace Automattic\Jetpack\Autoloader\jp7a4ce98532f7554f89341184a808a021;
9
-
10
- // phpcs:ignore
11
-
12
- /**
13
- * This class handles locating and caching all of the active plugins.
14
- */
15
- class Plugins_Handler {
16
- /**
17
- * The transient key for plugin paths.
18
- */
19
- const TRANSIENT_KEY = 'jetpack_autoloader_plugin_paths';
20
-
21
- /**
22
- * The locator for finding plugins in different locations.
23
- *
24
- * @var Plugin_Locator
25
- */
26
- private $plugin_locator;
27
-
28
- /**
29
- * The processor for transforming cached paths.
30
- *
31
- * @var Path_Processor
32
- */
33
- private $path_processor;
34
-
35
- /**
36
- * The constructor.
37
- *
38
- * @param Plugin_Locator $plugin_locator The locator for finding active plugins.
39
- * @param Path_Processor $path_processor The processor for transforming cached paths.
40
- */
41
- public function __construct( $plugin_locator, $path_processor ) {
42
- $this->plugin_locator = $plugin_locator;
43
- $this->path_processor = $path_processor;
44
- }
45
-
46
- /**
47
- * Gets all of the active plugins we can find.
48
- *
49
- * @param bool $include_deactivating When true, plugins deactivating this request will be considered active.
50
- * @param bool $record_unknown When true, the current plugin will be marked as active and recorded when unknown.
51
- *
52
- * @return string[]
53
- */
54
- public function get_active_plugins( $include_deactivating, $record_unknown ) {
55
- global $jetpack_autoloader_activating_plugins_paths;
56
-
57
- // We're going to build a unique list of plugins from a few different sources
58
- // to find all of our "active" plugins. While we need to return an integer
59
- // array, we're going to use an associative array internally to reduce
60
- // the amount of time that we're going to spend checking uniqueness
61
- // and merging different arrays together to form the output.
62
- $active_plugins = array();
63
-
64
- // Make sure that plugins which have activated this request are considered as "active" even though
65
- // they probably won't be present in any option.
66
- if ( is_array( $jetpack_autoloader_activating_plugins_paths ) ) {
67
- foreach ( $jetpack_autoloader_activating_plugins_paths as $path ) {
68
- $active_plugins[ $path ] = $path;
69
- }
70
- }
71
-
72
- // This option contains all of the plugins that have been activated.
73
- $plugins = $this->plugin_locator->find_using_option( 'active_plugins' );
74
- foreach ( $plugins as $path ) {
75
- $active_plugins[ $path ] = $path;
76
- }
77
-
78
- // This option contains all of the multisite plugins that have been activated.
79
- if ( is_multisite() ) {
80
- $plugins = $this->plugin_locator->find_using_option( 'active_sitewide_plugins', true );
81
- foreach ( $plugins as $path ) {
82
- $active_plugins[ $path ] = $path;
83
- }
84
- }
85
-
86
- // These actions contain plugins that are being activated/deactivated during this request.
87
- $plugins = $this->plugin_locator->find_using_request_action( array( 'activate', 'activate-selected', 'deactivate', 'deactivate-selected' ) );
88
- foreach ( $plugins as $path ) {
89
- $active_plugins[ $path ] = $path;
90
- }
91
-
92
- // When the current plugin isn't considered "active" there's a problem.
93
- // Since we're here, the plugin is active and currently being loaded.
94
- // We can support this case (mu-plugins and non-standard activation)
95
- // by adding the current plugin to the active list and marking it
96
- // as an unknown (activating) plugin. This also has the benefit
97
- // of causing a reset because the active plugins list has
98
- // been changed since it was saved in the global.
99
- $current_plugin = $this->plugin_locator->find_current_plugin();
100
- if ( $record_unknown && ! in_array( $current_plugin, $active_plugins, true ) ) {
101
- $active_plugins[ $current_plugin ] = $current_plugin;
102
- $jetpack_autoloader_activating_plugins_paths[] = $current_plugin;
103
- }
104
-
105
- // When deactivating plugins aren't desired we should entirely remove them from the active list.
106
- if ( ! $include_deactivating ) {
107
- // These actions contain plugins that are being deactivated during this request.
108
- $plugins = $this->plugin_locator->find_using_request_action( array( 'deactivate', 'deactivate-selected' ) );
109
- foreach ( $plugins as $path ) {
110
- unset( $active_plugins[ $path ] );
111
- }
112
- }
113
-
114
- // Transform the array so that we don't have to worry about the keys interacting with other array types later.
115
- return array_values( $active_plugins );
116
- }
117
-
118
- /**
119
- * Gets all of the cached plugins if there are any.
120
- *
121
- * @return string[]
122
- */
123
- public function get_cached_plugins() {
124
- $cached = get_transient( self::TRANSIENT_KEY );
125
- if ( ! is_array( $cached ) || empty( $cached ) ) {
126
- return array();
127
- }
128
-
129
- // We need to expand the tokens to an absolute path for this webserver.
130
- return array_map( array( $this->path_processor, 'untokenize_path_constants' ), $cached );
131
- }
132
-
133
- /**
134
- * Saves the plugin list to the cache.
135
- *
136
- * @param array $plugins The plugin list to save to the cache.
137
- */
138
- public function cache_plugins( $plugins ) {
139
- // We store the paths in a tokenized form so that that webservers with different absolute paths don't break.
140
- $plugins = array_map( array( $this->path_processor, 'tokenize_path_constants' ), $plugins );
141
-
142
- set_transient( self::TRANSIENT_KEY, $plugins );
143
- }
144
-
145
- /**
146
- * Checks to see whether or not the plugin list given has changed when compared to the
147
- * shared `$jetpack_autoloader_cached_plugin_paths` global. This allows us to deal
148
- * with cases where the active list may change due to filtering..
149
- *
150
- * @param string[] $plugins The plugins list to check against the global cache.
151
- *
152
- * @return bool True if the plugins have changed, otherwise false.
153
- */
154
- public function have_plugins_changed( $plugins ) {
155
- global $jetpack_autoloader_cached_plugin_paths;
156
-
157
- if ( $jetpack_autoloader_cached_plugin_paths !== $plugins ) {
158
- $jetpack_autoloader_cached_plugin_paths = $plugins;
159
- return true;
160
- }
161
-
162
- return false;
163
- }
164
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/jetpack-autoloader/class-shutdown-handler.php DELETED
@@ -1,92 +0,0 @@
1
- <?php
2
- /**
3
- * This file was automatically generated by automattic/jetpack-autoloader.
4
- *
5
- * @package automattic/jetpack-autoloader
6
- */
7
-
8
- namespace Automattic\Jetpack\Autoloader\jp7a4ce98532f7554f89341184a808a021;
9
-
10
- // phpcs:ignore
11
-
12
- /**
13
- * This class handles the shutdown of the autoloader.
14
- */
15
- class Shutdown_Handler {
16
-
17
- /**
18
- * The Plugins_Handler instance.
19
- *
20
- * @var Plugins_Handler
21
- */
22
- private $plugins_handler;
23
-
24
- /**
25
- * The plugins cached by this autoloader.
26
- *
27
- * @var string[]
28
- */
29
- private $cached_plugins;
30
-
31
- /**
32
- * Indicates whether or not this autoloader was included by another.
33
- *
34
- * @var bool
35
- */
36
- private $was_included_by_autoloader;
37
-
38
- /**
39
- * Constructor.
40
- *
41
- * @param Plugins_Handler $plugins_handler The Plugins_Handler instance to use.
42
- * @param string[] $cached_plugins The plugins cached by the autoloaer.
43
- * @param bool $was_included_by_autoloader Indicates whether or not the autoloader was included by another.
44
- */
45
- public function __construct( $plugins_handler, $cached_plugins, $was_included_by_autoloader ) {
46
- $this->plugins_handler = $plugins_handler;
47
- $this->cached_plugins = $cached_plugins;
48
- $this->was_included_by_autoloader = $was_included_by_autoloader;
49
- }
50
-
51
- /**
52
- * Handles the shutdown of the autoloader.
53
- */
54
- public function __invoke() {
55
- // Don't save a broken cache if an error happens during some plugin's initialization.
56
- if ( ! did_action( 'plugins_loaded' ) ) {
57
- // Ensure that the cache is emptied to prevent consecutive failures if the cache is to blame.
58
- if ( ! empty( $this->cached_plugins ) ) {
59
- $this->plugins_handler->cache_plugins( array() );
60
- }
61
-
62
- return;
63
- }
64
-
65
- // Load the active plugins fresh since the list we pulled earlier might not contain
66
- // plugins that were activated but did not reset the autoloader. This happens
67
- // when a plugin is in the cache but not "active" when the autoloader loads.
68
- // We also want to make sure that plugins which are deactivating are not
69
- // considered "active" so that they will be removed from the cache now.
70
- try {
71
- $active_plugins = $this->plugins_handler->get_active_plugins( false, ! $this->was_included_by_autoloader );
72
- } catch ( \Exception $ex ) {
73
- // When the package is deleted before shutdown it will throw an exception.
74
- // In the event this happens we should erase the cache.
75
- if ( ! empty( $this->cached_plugins ) ) {
76
- $this->plugins_handler->cache_plugins( array() );
77
- }
78
- return;
79
- }
80
-
81
- // The paths should be sorted for easy comparisons with those loaded from the cache.
82
- // Note we don't need to sort the cached entries because they're already sorted.
83
- sort( $active_plugins );
84
-
85
- // We don't want to waste time saving a cache that hasn't changed.
86
- if ( $this->cached_plugins === $active_plugins ) {
87
- return;
88
- }
89
-
90
- $this->plugins_handler->cache_plugins( $active_plugins );
91
- }
92
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/jetpack-autoloader/class-version-loader.php DELETED
@@ -1,164 +0,0 @@
1
- <?php
2
- /**
3
- * This file was automatically generated by automattic/jetpack-autoloader.
4
- *
5
- * @package automattic/jetpack-autoloader
6
- */
7
-
8
- namespace Automattic\Jetpack\Autoloader\jp7a4ce98532f7554f89341184a808a021;
9
-
10
- // phpcs:ignore
11
-
12
- /**
13
- * This class loads other classes based on given parameters.
14
- */
15
- class Version_Loader {
16
-
17
- /**
18
- * The Version_Selector object.
19
- *
20
- * @var Version_Selector
21
- */
22
- private $version_selector;
23
-
24
- /**
25
- * A map of available classes and their version and file path.
26
- *
27
- * @var array
28
- */
29
- private $classmap;
30
-
31
- /**
32
- * A map of PSR-4 namespaces and their version and directory path.
33
- *
34
- * @var array
35
- */
36
- private $psr4_map;
37
-
38
- /**
39
- * A map of all the files that we should load.
40
- *
41
- * @var array
42
- */
43
- private $filemap;
44
-
45
- /**
46
- * The constructor.
47
- *
48
- * @param Version_Selector $version_selector The Version_Selector object.
49
- * @param array $classmap The verioned classmap to load using.
50
- * @param array $psr4_map The versioned PSR-4 map to load using.
51
- * @param array $filemap The versioned filemap to load.
52
- */
53
- public function __construct( $version_selector, $classmap, $psr4_map, $filemap ) {
54
- $this->version_selector = $version_selector;
55
- $this->classmap = $classmap;
56
- $this->psr4_map = $psr4_map;
57
- $this->filemap = $filemap;
58
- }
59
-
60
- /**
61
- * Finds the file path for the given class.
62
- *
63
- * @param string $class_name The class to find.
64
- *
65
- * @return string|null $file_path The path to the file if found, null if no class was found.
66
- */
67
- public function find_class_file( $class_name ) {
68
- $data = $this->select_newest_file(
69
- isset( $this->classmap[ $class_name ] ) ? $this->classmap[ $class_name ] : null,
70
- $this->find_psr4_file( $class_name )
71
- );
72
- if ( ! isset( $data ) ) {
73
- return null;
74
- }
75
-
76
- return $data['path'];
77
- }
78
-
79
- /**
80
- * Load all of the files in the filemap.
81
- */
82
- public function load_filemap() {
83
- if ( empty( $this->filemap ) ) {
84
- return;
85
- }
86
-
87
- foreach ( $this->filemap as $file_identifier => $file_data ) {
88
- if ( empty( $GLOBALS['__composer_autoload_files'][ $file_identifier ] ) ) {
89
- require_once $file_data['path'];
90
-
91
- $GLOBALS['__composer_autoload_files'][ $file_identifier ] = true;
92
- }
93
- }
94
- }
95
-
96
- /**
97
- * Compares different class sources and returns the newest.
98
- *
99
- * @param array|null $classmap_data The classmap class data.
100
- * @param array|null $psr4_data The PSR-4 class data.
101
- *
102
- * @return array|null $data
103
- */
104
- private function select_newest_file( $classmap_data, $psr4_data ) {
105
- if ( ! isset( $classmap_data ) ) {
106
- return $psr4_data;
107
- } elseif ( ! isset( $psr4_data ) ) {
108
- return $classmap_data;
109
- }
110
-
111
- if ( $this->version_selector->is_version_update_required( $classmap_data['version'], $psr4_data['version'] ) ) {
112
- return $psr4_data;
113
- }
114
-
115
- return $classmap_data;
116
- }
117
-
118
- /**
119
- * Finds the file for a given class in a PSR-4 namespace.
120
- *
121
- * @param string $class_name The class to find.
122
- *
123
- * @return array|null $data The version and path path to the file if found, null otherwise.
124
- */
125
- private function find_psr4_file( $class_name ) {
126
- if ( ! isset( $this->psr4_map ) ) {
127
- return null;
128
- }
129
-
130
- // Don't bother with classes that have no namespace.
131
- $class_index = strrpos( $class_name, '\\' );
132
- if ( ! $class_index ) {
133
- return null;
134
- }
135
- $class_for_path = str_replace( '\\', '/', $class_name );
136
-
137
- // Search for the namespace by iteratively cutting off the last segment until
138
- // we find a match. This allows us to check the most-specific namespaces
139
- // first as well as minimize the amount of time spent looking.
140
- for (
141
- $class_namespace = substr( $class_name, 0, $class_index );
142
- ! empty( $class_namespace );
143
- $class_namespace = substr( $class_namespace, 0, strrpos( $class_namespace, '\\' ) )
144
- ) {
145
- $namespace = $class_namespace . '\\';
146
- if ( ! isset( $this->psr4_map[ $namespace ] ) ) {
147
- continue;
148
- }
149
- $data = $this->psr4_map[ $namespace ];
150
-
151
- foreach ( $data['path'] as $path ) {
152
- $path .= '/' . substr( $class_for_path, strlen( $namespace ) ) . '.php';
153
- if ( file_exists( $path ) ) {
154
- return array(
155
- 'version' => $data['version'],
156
- 'path' => $path,
157
- );
158
- }
159
- }
160
- }
161
-
162
- return null;
163
- }
164
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/jetpack-autoloader/class-version-selector.php DELETED
@@ -1,69 +0,0 @@
1
- <?php
2
- /**
3
- * This file was automatically generated by automattic/jetpack-autoloader.
4
- *
5
- * @package automattic/jetpack-autoloader
6
- */
7
-
8
- namespace Automattic\Jetpack\Autoloader\jp7a4ce98532f7554f89341184a808a021;
9
-
10
- // phpcs:ignore
11
-
12
- /**
13
- * Used to select package versions.
14
- */
15
- class Version_Selector {
16
-
17
- /**
18
- * Checks whether the selected package version should be updated. Composer development
19
- * package versions ('9999999-dev' or versions that start with 'dev-') are favored
20
- * when the JETPACK_AUTOLOAD_DEV constant is set to true.
21
- *
22
- * @param String $selected_version The currently selected package version.
23
- * @param String $compare_version The package version that is being evaluated to
24
- * determine if the version needs to be updated.
25
- *
26
- * @return bool Returns true if the selected package version should be updated,
27
- * else false.
28
- */
29
- public function is_version_update_required( $selected_version, $compare_version ) {
30
- $use_dev_versions = defined( 'JETPACK_AUTOLOAD_DEV' ) && JETPACK_AUTOLOAD_DEV;
31
-
32
- if ( $selected_version === null ) {
33
- return true;
34
- }
35
-
36
- if ( $use_dev_versions && $this->is_dev_version( $selected_version ) ) {
37
- return false;
38
- }
39
-
40
- if ( $this->is_dev_version( $compare_version ) ) {
41
- if ( $use_dev_versions ) {
42
- return true;
43
- } else {
44
- return false;
45
- }
46
- }
47
-
48
- if ( version_compare( $selected_version, $compare_version, '<' ) ) {
49
- return true;
50
- }
51
-
52
- return false;
53
- }
54
-
55
- /**
56
- * Checks whether the given package version is a development version.
57
- *
58
- * @param String $version The package version.
59
- *
60
- * @return bool True if the version is a dev version, else false.
61
- */
62
- public function is_dev_version( $version ) {
63
- if ( 'dev-' === substr( $version, 0, 4 ) || '9999999-dev' === $version ) {
64
- return true;
65
- }
66
-
67
- return false;
68
- }
69
- }