WP Security Audit Log - Version 4.4.2.1

Version Description

(2022-07-06) =

  • Bug fixes
    • Fixed: Fatal error when a WooCommerce file download is triggered.
    • Fixed: Only users with administrator role shown as logged in on a multisite network.
    • Fixed: Event IDs 5010 - 5018 wrongly enabled by default.
    • Fixed: A number of upgrade errors caused because of possibly outdated files.
    • Fixed: Disabled event IDs disabled at multisite network level were activated back when accessing child sites.
    • Fixed: Upgrade notice shown on a multisite network even when it is a new install.
    • Fixed: Fatal error triggered due to incorrectly named files (wrong capilitazion).
    • Fixed: Error in Alert formatter triggered during the upgrade process.
Download this release

Release Info

Developer WPWhiteSecurity
Plugin Icon 128x128 WP Security Audit Log
Version 4.4.2.1
Comparing to
See all releases

Code changes from version 4.4.2 to 4.4.2.1

Files changed (45) hide show
  1. classes/AbstractSensor.php +1 -1
  2. classes/Adapters/MySQL/MetaAdapter.php +2 -2
  3. classes/AlertFormatter.php +2 -2
  4. classes/AlertManager.php +2 -2
  5. classes/Connector/ConnectorFactory.php +2 -2
  6. classes/Entities/class-abstract-entity.php +11 -11
  7. classes/Entities/class-metadata-entity.php +1 -1
  8. classes/Entities/class-occurrences-entity.php +1 -1
  9. classes/Entities/class-options-entity.php +2 -2
  10. classes/Helpers/class-classes-helper.php +6 -6
  11. classes/Helpers/class-php-helper.php +1 -1
  12. classes/Helpers/class-validator.php +4 -4
  13. classes/Helpers/class-wp-helper.php +18 -18
  14. classes/Migration/class-abstract-migration.php +27 -7
  15. classes/Migration/class-metadata-migration-440.php +1 -1
  16. classes/Migration/class-migration.php +83 -8
  17. classes/Models/Occurrence.php +1 -1
  18. classes/SensorManager.php +1 -1
  19. classes/Sensors/Content.php +5 -5
  20. classes/Sensors/PluginsThemes.php +1 -1
  21. classes/Settings.php +19 -0
  22. classes/Upgrade/Upgrade_43000_To_44400.php +0 -207
  23. languages/wp-security-audit-log.pot +2 -2
  24. readme.txt +15 -3
  25. third-party/freemius/wordpress-sdk/includes/sdk/LICENSE.txt +0 -340
  26. third-party/vendor/autoload.php +6 -1
  27. third-party/vendor/composer/ClassLoader.php +141 -14
  28. third-party/vendor/composer/InstalledVersions.php +352 -0
  29. third-party/vendor/composer/autoload_classmap.php +2 -1
  30. third-party/vendor/composer/autoload_namespaces.php +1 -1
  31. third-party/vendor/composer/autoload_psr4.php +1 -1
  32. third-party/vendor/composer/autoload_real.php +6 -15
  33. third-party/vendor/composer/autoload_static.php +3 -2
  34. vendor/autoload.php +6 -1
  35. vendor/composer/ClassLoader.php +141 -14
  36. vendor/composer/InstalledVersions.php +352 -0
  37. vendor/composer/autoload_classmap.php +2 -2
  38. vendor/composer/autoload_files.php +1 -1
  39. vendor/composer/autoload_namespaces.php +1 -1
  40. vendor/composer/autoload_psr4.php +1 -1
  41. vendor/composer/autoload_real.php +16 -34
  42. vendor/composer/autoload_static.php +5 -5
  43. vendor/composer/installed.json +214 -205
  44. vendor/composer/installed.php +68 -0
  45. wp-security-audit-log.php +30 -41
classes/AbstractSensor.php CHANGED
@@ -35,7 +35,7 @@ abstract class WSAL_AbstractSensor {
35
  *
36
  * @var integer
37
  *
38
- * @since 4.4.2
39
  */
40
  protected static $seconds_to_check_back = 5;
41
 
35
  *
36
  * @var integer
37
  *
38
+ * @since 4.4.2.1
39
  */
40
  protected static $seconds_to_check_back = 5;
41
 
classes/Adapters/MySQL/MetaAdapter.php CHANGED
@@ -102,7 +102,7 @@ class WSAL_Adapters_MySQL_Meta extends WSAL_Adapters_MySQL_ActiveRecord implemen
102
  *
103
  * @return void
104
  *
105
- * @since 4.4.2
106
  */
107
  public function delete_by_occurrence_ids( $occurrence_ids ) {
108
  if ( ! empty( $occurrence_ids ) ) {
@@ -120,7 +120,7 @@ class WSAL_Adapters_MySQL_Meta extends WSAL_Adapters_MySQL_ActiveRecord implemen
120
  *
121
  * @return array
122
  *
123
- * @since 4.4.2
124
  */
125
  public function load_by_name_and_occurrence_id( $meta_name, $occurrence_id ) {
126
  // Make sure to grab the migrated meta fields from the occurrence table.
102
  *
103
  * @return void
104
  *
105
+ * @since 4.4.2.1
106
  */
107
  public function delete_by_occurrence_ids( $occurrence_ids ) {
108
  if ( ! empty( $occurrence_ids ) ) {
120
  *
121
  * @return array
122
  *
123
+ * @since 4.4.2.1
124
  */
125
  public function load_by_name_and_occurrence_id( $meta_name, $occurrence_id ) {
126
  // Make sure to grab the migrated meta fields from the occurrence table.
classes/AlertFormatter.php CHANGED
@@ -271,7 +271,7 @@ final class WSAL_AlertFormatter {
271
  *
272
  * @return string|mixed
273
  *
274
- * @since 4.4.2
275
  */
276
  public static function data_truncate( $value, $expression, $length = 50, $ellipses_sequence = '...' ) {
277
 
@@ -286,7 +286,7 @@ final class WSAL_AlertFormatter {
286
  case '%MetaValue%':
287
  case '%MetaValueOld%':
288
  case '%MetaValueNew%':
289
- $value = mb_strlen( $value ) > $length ? ( mb_substr( $value, 0, $length ) . $ellipses_sequence() ) : $value;
290
  break;
291
  default:
292
  break;
271
  *
272
  * @return string|mixed
273
  *
274
+ * @since 4.4.2.1
275
  */
276
  public static function data_truncate( $value, $expression, $length = 50, $ellipses_sequence = '...' ) {
277
 
286
  case '%MetaValue%':
287
  case '%MetaValueOld%':
288
  case '%MetaValueNew%':
289
+ $value = mb_strlen( $value ) > $length ? ( mb_substr( $value, 0, $length ) . $ellipses_sequence ) : $value;
290
  break;
291
  default:
292
  break;
classes/AlertManager.php CHANGED
@@ -98,7 +98,7 @@ final class WSAL_AlertManager {
98
  *
99
  * @var array
100
  *
101
- * @since 4.4.2
102
  */
103
  private static $disabled_post_types = array();
104
 
@@ -154,7 +154,7 @@ final class WSAL_AlertManager {
154
  *
155
  * @return array
156
  *
157
- * @since 4.4.2
158
  */
159
  public static function get_ignored_post_types(): array {
160
  if ( empty( self::$ignored_cpts ) ) {
98
  *
99
  * @var array
100
  *
101
+ * @since 4.4.2.1
102
  */
103
  private static $disabled_post_types = array();
104
 
154
  *
155
  * @return array
156
  *
157
+ * @since 4.4.2.1
158
  */
159
  public static function get_ignored_post_types(): array {
160
  if ( empty( self::$ignored_cpts ) ) {
classes/Connector/ConnectorFactory.php CHANGED
@@ -43,7 +43,7 @@ abstract class WSAL_Connector_ConnectorFactory {
43
  *
44
  * @var boolean
45
  *
46
- * @since 4.4.2
47
  */
48
  private static $connection = false;
49
 
@@ -172,7 +172,7 @@ abstract class WSAL_Connector_ConnectorFactory {
172
  *
173
  * @return void
174
  *
175
- * @since 4.4.2
176
  */
177
  public static function destroy_connection() {
178
  self::$connection = false;
43
  *
44
  * @var boolean
45
  *
46
+ * @since 4.4.2.1
47
  */
48
  private static $connection = false;
49
 
172
  *
173
  * @return void
174
  *
175
+ * @since 4.4.2.1
176
  */
177
  public static function destroy_connection() {
178
  self::$connection = false;
classes/Entities/class-abstract-entity.php CHANGED
@@ -33,7 +33,7 @@ if ( ! class_exists( '\WSAL\Entities\Abstract_Entity' ) ) {
33
  *
34
  * @var [type]
35
  *
36
- * @since 4.4.2
37
  */
38
  private static $connection = null;
39
 
@@ -42,10 +42,10 @@ if ( ! class_exists( '\WSAL\Entities\Abstract_Entity' ) ) {
42
  *
43
  * @return string
44
  *
45
- * @since 4.4.2
46
  */
47
  public static function get_table_name(): string {
48
- return self::get_connection()->prefix . static::$table;
49
  }
50
 
51
  /**
@@ -53,7 +53,7 @@ if ( ! class_exists( '\WSAL\Entities\Abstract_Entity' ) ) {
53
  *
54
  * @return \WPDB @see \WSAL_Connector_MySQLDB
55
  *
56
- * @since 4.4.2
57
  */
58
  public static function get_connection() {
59
  if ( null === self::$connection ) {
@@ -78,7 +78,7 @@ if ( ! class_exists( '\WSAL\Entities\Abstract_Entity' ) ) {
78
  *
79
  * @return void
80
  *
81
- * @since 4.4.2
82
  */
83
  public static function set_connection( $connection ) {
84
  self::$connection = $connection;
@@ -89,7 +89,7 @@ if ( ! class_exists( '\WSAL\Entities\Abstract_Entity' ) ) {
89
  *
90
  * @return void
91
  *
92
- * @since 4.4.2
93
  */
94
  public static function destroy_connection() {
95
  self::$connection = null;
@@ -105,7 +105,7 @@ if ( ! class_exists( '\WSAL\Entities\Abstract_Entity' ) ) {
105
  *
106
  * @return bool
107
  *
108
- * @since 4.4.2
109
  */
110
  public static function maybe_create_table( string $table_name, string $create_ddl ): bool {
111
  foreach ( self::get_connection()->get_col( 'SHOW TABLES', 0 ) as $table ) {
@@ -130,7 +130,7 @@ if ( ! class_exists( '\WSAL\Entities\Abstract_Entity' ) ) {
130
  *
131
  * @return boolean
132
  *
133
- * @since 4.4.2
134
  */
135
  public static function is_external_db(): bool {
136
  $db_config = \WSAL_Connector_ConnectorFactory::get_config();
@@ -151,7 +151,7 @@ if ( ! class_exists( '\WSAL\Entities\Abstract_Entity' ) ) {
151
  *
152
  * @return boolean - True if the column exists and all given parameters are the same, false otherwise.
153
  *
154
- * @since 4.4.2
155
  */
156
  public static function check_column(
157
  string $table_name,
@@ -204,7 +204,7 @@ if ( ! class_exists( '\WSAL\Entities\Abstract_Entity' ) ) {
204
  *
205
  * @return integer
206
  *
207
- * @since 4.4.2
208
  */
209
  public static function get_last_sql_error( $_wpdb ): int {
210
  $code = 0;
@@ -235,7 +235,7 @@ if ( ! class_exists( '\WSAL\Entities\Abstract_Entity' ) ) {
235
  *
236
  * @return boolean
237
  *
238
- * @since 4.4.2
239
  */
240
  public static function check_table_exists( string $table_name ): bool {
241
  foreach ( self::get_connection()->get_col( 'SHOW TABLES', 0 ) as $table ) {
33
  *
34
  * @var [type]
35
  *
36
+ * @since 4.4.2.1
37
  */
38
  private static $connection = null;
39
 
42
  *
43
  * @return string
44
  *
45
+ * @since 4.4.2.1
46
  */
47
  public static function get_table_name(): string {
48
+ return self::get_connection()->base_prefix . static::$table;
49
  }
50
 
51
  /**
53
  *
54
  * @return \WPDB @see \WSAL_Connector_MySQLDB
55
  *
56
+ * @since 4.4.2.1
57
  */
58
  public static function get_connection() {
59
  if ( null === self::$connection ) {
78
  *
79
  * @return void
80
  *
81
+ * @since 4.4.2.1
82
  */
83
  public static function set_connection( $connection ) {
84
  self::$connection = $connection;
89
  *
90
  * @return void
91
  *
92
+ * @since 4.4.2.1
93
  */
94
  public static function destroy_connection() {
95
  self::$connection = null;
105
  *
106
  * @return bool
107
  *
108
+ * @since 4.4.2.1
109
  */
110
  public static function maybe_create_table( string $table_name, string $create_ddl ): bool {
111
  foreach ( self::get_connection()->get_col( 'SHOW TABLES', 0 ) as $table ) {
130
  *
131
  * @return boolean
132
  *
133
+ * @since 4.4.2.1
134
  */
135
  public static function is_external_db(): bool {
136
  $db_config = \WSAL_Connector_ConnectorFactory::get_config();
151
  *
152
  * @return boolean - True if the column exists and all given parameters are the same, false otherwise.
153
  *
154
+ * @since 4.4.2.1
155
  */
156
  public static function check_column(
157
  string $table_name,
204
  *
205
  * @return integer
206
  *
207
+ * @since 4.4.2.1
208
  */
209
  public static function get_last_sql_error( $_wpdb ): int {
210
  $code = 0;
235
  *
236
  * @return boolean
237
  *
238
+ * @since 4.4.2.1
239
  */
240
  public static function check_table_exists( string $table_name ): bool {
241
  foreach ( self::get_connection()->get_col( 'SHOW TABLES', 0 ) as $table ) {
classes/Entities/class-metadata-entity.php CHANGED
@@ -35,7 +35,7 @@ if ( ! class_exists( '\WSAL\Entities\Metadata_Entity' ) ) {
35
  *
36
  * @return bool
37
  *
38
- * @since 4.4.2
39
  */
40
  public static function create_table(): bool {
41
  $table_name = self::get_table_name();
35
  *
36
  * @return bool
37
  *
38
+ * @since 4.4.2.1
39
  */
40
  public static function create_table(): bool {
41
  $table_name = self::get_table_name();
classes/Entities/class-occurrences-entity.php CHANGED
@@ -58,7 +58,7 @@ if ( ! class_exists( '\WSAL\Entities\Occurrences_Entity' ) ) {
58
  *
59
  * @return bool
60
  *
61
- * @since 4.4.2
62
  */
63
  public static function create_table(): bool {
64
  $table_name = self::get_table_name();
58
  *
59
  * @return bool
60
  *
61
+ * @since 4.4.2.1
62
  */
63
  public static function create_table(): bool {
64
  $table_name = self::get_table_name();
classes/Entities/class-options-entity.php CHANGED
@@ -41,7 +41,7 @@ if ( ! class_exists( '\WSAL\Entities\Options_Entity' ) ) {
41
  *
42
  * @return void
43
  *
44
- * @since 4.4.2
45
  */
46
  public static function transfer_options() {
47
  global $wpdb;
@@ -77,7 +77,7 @@ if ( ! class_exists( '\WSAL\Entities\Options_Entity' ) ) {
77
  *
78
  * @return string
79
  *
80
- * @since 4.4.2
81
  */
82
  public static function get_table_name(): string {
83
  global $wpdb;
41
  *
42
  * @return void
43
  *
44
+ * @since 4.4.2.1
45
  */
46
  public static function transfer_options() {
47
  global $wpdb;
77
  *
78
  * @return string
79
  *
80
+ * @since 4.4.2.1
81
  */
82
  public static function get_table_name(): string {
83
  global $wpdb;
classes/Helpers/class-classes-helper.php CHANGED
@@ -27,7 +27,7 @@ if ( ! class_exists( '\WSAL\Helpers\Classes_Helper' ) ) {
27
  *
28
  * @var array
29
  *
30
- * @since 4.4.2
31
  */
32
  private static $class_map = array();
33
 
@@ -36,7 +36,7 @@ if ( ! class_exists( '\WSAL\Helpers\Classes_Helper' ) ) {
36
  *
37
  * @return array
38
  *
39
- * @since 4.4.2
40
  */
41
  public static function get_class_map(): array {
42
  if ( empty( self::$class_map ) ) {
@@ -53,7 +53,7 @@ if ( ! class_exists( '\WSAL\Helpers\Classes_Helper' ) ) {
53
  *
54
  * @return string|false
55
  *
56
- * @since 4.4.2
57
  */
58
  public static function get_class_by_filename( string $file ) {
59
  if ( in_array( $file, self::get_class_map(), true ) ) {
@@ -76,7 +76,7 @@ if ( ! class_exists( '\WSAL\Helpers\Classes_Helper' ) ) {
76
  *
77
  * @return array
78
  *
79
- * @since 4.4.2
80
  */
81
  public static function get_subclasses_of_class( string $current_class, string $base_class, bool $exclude_abstracts = true ): array {
82
 
@@ -100,7 +100,7 @@ if ( ! class_exists( '\WSAL\Helpers\Classes_Helper' ) ) {
100
  *
101
  * @return array
102
  *
103
- * @since 4.4.2
104
  */
105
  public static function get_classes_by_namespace( string $namespace ) {
106
  if ( 0 === strpos( $namespace, '\\' ) ) {
@@ -148,7 +148,7 @@ if ( ! class_exists( '\WSAL\Helpers\Classes_Helper' ) ) {
148
  *
149
  * @return array
150
  *
151
- * @since 4.4.2
152
  */
153
  public static function get_classes_with_term( $term ) {
154
  $term_upper = strtoupper( $term );
27
  *
28
  * @var array
29
  *
30
+ * @since 4.4.2.1
31
  */
32
  private static $class_map = array();
33
 
36
  *
37
  * @return array
38
  *
39
+ * @since 4.4.2.1
40
  */
41
  public static function get_class_map(): array {
42
  if ( empty( self::$class_map ) ) {
53
  *
54
  * @return string|false
55
  *
56
+ * @since 4.4.2.1
57
  */
58
  public static function get_class_by_filename( string $file ) {
59
  if ( in_array( $file, self::get_class_map(), true ) ) {
76
  *
77
  * @return array
78
  *
79
+ * @since 4.4.2.1
80
  */
81
  public static function get_subclasses_of_class( string $current_class, string $base_class, bool $exclude_abstracts = true ): array {
82
 
100
  *
101
  * @return array
102
  *
103
+ * @since 4.4.2.1
104
  */
105
  public static function get_classes_by_namespace( string $namespace ) {
106
  if ( 0 === strpos( $namespace, '\\' ) ) {
148
  *
149
  * @return array
150
  *
151
+ * @since 4.4.2.1
152
  */
153
  public static function get_classes_with_term( $term ) {
154
  $term_upper = strtoupper( $term );
classes/Helpers/class-php-helper.php CHANGED
@@ -29,7 +29,7 @@ if ( ! class_exists( '\WSAL\Helpers\PHP_Helper' ) ) {
29
  *
30
  * @return array
31
  *
32
- * @since 4.4.2
33
  */
34
  public static function string_to_array( string $string ): array {
35
  if ( empty( $string ) ) {
29
  *
30
  * @return array
31
  *
32
+ * @since 4.4.2.1
33
  */
34
  public static function string_to_array( string $string ): array {
35
  if ( empty( $string ) ) {
classes/Helpers/class-validator.php CHANGED
@@ -30,7 +30,7 @@ if ( ! class_exists( '\WSAL\Helpers\Validator' ) ) {
30
  *
31
  * @return boolean - true - tag is valid, false - tag is not valid.
32
  *
33
- * @since 4.4.2
34
  */
35
  public static function validate_mirror_tag( string $string ): bool {
36
 
@@ -59,7 +59,7 @@ if ( ! class_exists( '\WSAL\Helpers\Validator' ) ) {
59
  *
60
  * @return boolean
61
  *
62
- * @since 4.4.2
63
  */
64
  private static function starts_alpha_numeric( string $string ): bool {
65
  if ( preg_match( '/^[a-zA-Z0-9]/', $string ) ) {
@@ -77,7 +77,7 @@ if ( ! class_exists( '\WSAL\Helpers\Validator' ) ) {
77
  *
78
  * @return boolean
79
  *
80
- * @since 4.4.2
81
  */
82
  private static function is_string_less_or_equal( string $string, int $size ): bool {
83
  if ( strlen( $string ) <= $size ) {
@@ -94,7 +94,7 @@ if ( ! class_exists( '\WSAL\Helpers\Validator' ) ) {
94
  *
95
  * @return boolean
96
  *
97
- * @since 4.4.2
98
  */
99
  private static function is_string_contains_only( string $string ): bool {
100
  if ( preg_match( '/[a-z\d_-]*/i', $string ) ) {
30
  *
31
  * @return boolean - true - tag is valid, false - tag is not valid.
32
  *
33
+ * @since 4.4.2.1
34
  */
35
  public static function validate_mirror_tag( string $string ): bool {
36
 
59
  *
60
  * @return boolean
61
  *
62
+ * @since 4.4.2.1
63
  */
64
  private static function starts_alpha_numeric( string $string ): bool {
65
  if ( preg_match( '/^[a-zA-Z0-9]/', $string ) ) {
77
  *
78
  * @return boolean
79
  *
80
+ * @since 4.4.2.1
81
  */
82
  private static function is_string_less_or_equal( string $string, int $size ): bool {
83
  if ( strlen( $string ) <= $size ) {
94
  *
95
  * @return boolean
96
  *
97
+ * @since 4.4.2.1
98
  */
99
  private static function is_string_contains_only( string $string ): bool {
100
  if ( preg_match( '/[a-z\d_-]*/i', $string ) ) {
classes/Helpers/class-wp-helper.php CHANGED
@@ -22,7 +22,7 @@ if ( ! class_exists( '\WSAL\Helpers\WP_Helper' ) ) {
22
  /**
23
  * All the WP functionality must go trough this class
24
  *
25
- * @since 4.4.2
26
  */
27
  class WP_Helper {
28
 
@@ -33,7 +33,7 @@ if ( ! class_exists( '\WSAL\Helpers\WP_Helper' ) ) {
33
  *
34
  * @var array
35
  *
36
- * @since 4.4.2
37
  */
38
  private static $user_roles = array();
39
 
@@ -42,7 +42,7 @@ if ( ! class_exists( '\WSAL\Helpers\WP_Helper' ) ) {
42
  *
43
  * @var array
44
  *
45
- * @since 4.4.2
46
  */
47
  private static $user_roles_wp = array();
48
 
@@ -51,7 +51,7 @@ if ( ! class_exists( '\WSAL\Helpers\WP_Helper' ) ) {
51
  *
52
  * @var bool
53
  *
54
- * @since 4.4.2
55
  */
56
  private static $is_multisite = null;
57
 
@@ -69,7 +69,7 @@ if ( ! class_exists( '\WSAL\Helpers\WP_Helper' ) ) {
69
  *
70
  * @return boolean
71
  *
72
- * @since 4.4.2
73
  */
74
  public static function is_role_exists( string $role ): bool {
75
  self::set_roles();
@@ -86,7 +86,7 @@ if ( ! class_exists( '\WSAL\Helpers\WP_Helper' ) ) {
86
  *
87
  * @return array
88
  *
89
- * @since 4.4.2
90
  */
91
  public static function get_roles() {
92
  self::set_roles();
@@ -99,7 +99,7 @@ if ( ! class_exists( '\WSAL\Helpers\WP_Helper' ) ) {
99
  *
100
  * @return array
101
  *
102
- * @since 4.4.2
103
  */
104
  public static function get_roles_wp() {
105
  if ( empty( self::$user_roles_wp ) ) {
@@ -115,7 +115,7 @@ if ( ! class_exists( '\WSAL\Helpers\WP_Helper' ) ) {
115
  *
116
  * @return boolean
117
  *
118
- * @since 4.4.2
119
  */
120
  public static function is_multisite() {
121
  if ( null === self::$is_multisite ) {
@@ -132,7 +132,7 @@ if ( ! class_exists( '\WSAL\Helpers\WP_Helper' ) ) {
132
  *
133
  * @return mixed
134
  *
135
- * @since 4.4.2
136
  */
137
  public static function get_option( $setting_name, $default_value = false ) {
138
  $prefixed_name = self::prefix_name( $setting_name );
@@ -148,7 +148,7 @@ if ( ! class_exists( '\WSAL\Helpers\WP_Helper' ) ) {
148
  *
149
  * @return mixed
150
  *
151
- * @since 4.4.2
152
  */
153
  public static function set_option( $setting_name, $new_value, $autoload = false ) {
154
  return self::update_option( $setting_name, $new_value, $autoload );
@@ -163,7 +163,7 @@ if ( ! class_exists( '\WSAL\Helpers\WP_Helper' ) ) {
163
  *
164
  * @return mixed
165
  *
166
- * @since 4.4.2
167
  */
168
  public static function update_option( $setting_name, $new_value, $autoload = false ) {
169
  $prefixed_name = self::prefix_name( $setting_name );
@@ -177,7 +177,7 @@ if ( ! class_exists( '\WSAL\Helpers\WP_Helper' ) ) {
177
  *
178
  * @return mixed
179
  *
180
- * @since 4.4.2
181
  */
182
  public static function delete_option( $setting_name ) {
183
  $prefixed_name = self::prefix_name( $setting_name );
@@ -218,7 +218,7 @@ if ( ! class_exists( '\WSAL\Helpers\WP_Helper' ) ) {
218
  *
219
  * @return mixed
220
  *
221
- * @since 4.4.2
222
  */
223
  public static function set_global_option( $setting_name, $new_value, $autoload = false ) {
224
  return self::update_global_option( $setting_name, $new_value, $autoload );
@@ -295,7 +295,7 @@ if ( ! class_exists( '\WSAL\Helpers\WP_Helper' ) ) {
295
  *
296
  * @return void
297
  *
298
- * @since 4.4.2
299
  */
300
  public static function un_schedule_event( string $event_name ) {
301
  $schedule_time = wp_next_scheduled( $event_name );
@@ -329,7 +329,7 @@ if ( ! class_exists( '\WSAL\Helpers\WP_Helper' ) ) {
329
  *
330
  * @return bool True if the transient was deleted, false otherwise.
331
  *
332
- * @since 4.4.2
333
  */
334
  public static function delete_transient( $transient ) {
335
  return self::is_multisite() ? delete_site_transient( $transient ) : delete_transient( $transient );
@@ -354,7 +354,7 @@ if ( ! class_exists( '\WSAL\Helpers\WP_Helper' ) ) {
354
  *
355
  * @return array
356
  *
357
- * @since 4.4.2
358
  */
359
  public static function get_active_plugins(): array {
360
  $active_plugins = array();
@@ -372,7 +372,7 @@ if ( ! class_exists( '\WSAL\Helpers\WP_Helper' ) ) {
372
  *
373
  * @return void
374
  *
375
- * @since 4.4.2
376
  */
377
  private static function set_roles() {
378
  if ( empty( self::$user_roles ) ) {
@@ -393,7 +393,7 @@ if ( ! class_exists( '\WSAL\Helpers\WP_Helper' ) ) {
393
  *
394
  * @return string
395
  *
396
- * @since 4.4.2
397
  */
398
  private static function prefix_name( string $name ): string {
399
 
22
  /**
23
  * All the WP functionality must go trough this class
24
  *
25
+ * @since 4.4.2.1
26
  */
27
  class WP_Helper {
28
 
33
  *
34
  * @var array
35
  *
36
+ * @since 4.4.2.1
37
  */
38
  private static $user_roles = array();
39
 
42
  *
43
  * @var array
44
  *
45
+ * @since 4.4.2.1
46
  */
47
  private static $user_roles_wp = array();
48
 
51
  *
52
  * @var bool
53
  *
54
+ * @since 4.4.2.1
55
  */
56
  private static $is_multisite = null;
57
 
69
  *
70
  * @return boolean
71
  *
72
+ * @since 4.4.2.1
73
  */
74
  public static function is_role_exists( string $role ): bool {
75
  self::set_roles();
86
  *
87
  * @return array
88
  *
89
+ * @since 4.4.2.1
90
  */
91
  public static function get_roles() {
92
  self::set_roles();
99
  *
100
  * @return array
101
  *
102
+ * @since 4.4.2.1
103
  */
104
  public static function get_roles_wp() {
105
  if ( empty( self::$user_roles_wp ) ) {
115
  *
116
  * @return boolean
117
  *
118
+ * @since 4.4.2.1
119
  */
120
  public static function is_multisite() {
121
  if ( null === self::$is_multisite ) {
132
  *
133
  * @return mixed
134
  *
135
+ * @since 4.4.2.1
136
  */
137
  public static function get_option( $setting_name, $default_value = false ) {
138
  $prefixed_name = self::prefix_name( $setting_name );
148
  *
149
  * @return mixed
150
  *
151
+ * @since 4.4.2.1
152
  */
153
  public static function set_option( $setting_name, $new_value, $autoload = false ) {
154
  return self::update_option( $setting_name, $new_value, $autoload );
163
  *
164
  * @return mixed
165
  *
166
+ * @since 4.4.2.1
167
  */
168
  public static function update_option( $setting_name, $new_value, $autoload = false ) {
169
  $prefixed_name = self::prefix_name( $setting_name );
177
  *
178
  * @return mixed
179
  *
180
+ * @since 4.4.2.1
181
  */
182
  public static function delete_option( $setting_name ) {
183
  $prefixed_name = self::prefix_name( $setting_name );
218
  *
219
  * @return mixed
220
  *
221
+ * @since 4.4.2.1
222
  */
223
  public static function set_global_option( $setting_name, $new_value, $autoload = false ) {
224
  return self::update_global_option( $setting_name, $new_value, $autoload );
295
  *
296
  * @return void
297
  *
298
+ * @since 4.4.2.1
299
  */
300
  public static function un_schedule_event( string $event_name ) {
301
  $schedule_time = wp_next_scheduled( $event_name );
329
  *
330
  * @return bool True if the transient was deleted, false otherwise.
331
  *
332
+ * @since 4.4.2.1
333
  */
334
  public static function delete_transient( $transient ) {
335
  return self::is_multisite() ? delete_site_transient( $transient ) : delete_transient( $transient );
354
  *
355
  * @return array
356
  *
357
+ * @since 4.4.2.1
358
  */
359
  public static function get_active_plugins(): array {
360
  $active_plugins = array();
372
  *
373
  * @return void
374
  *
375
+ * @since 4.4.2.1
376
  */
377
  private static function set_roles() {
378
  if ( empty( self::$user_roles ) ) {
393
  *
394
  * @return string
395
  *
396
+ * @since 4.4.2.1
397
  */
398
  private static function prefix_name( string $name ): string {
399
 
classes/Migration/class-abstract-migration.php CHANGED
@@ -46,6 +46,11 @@ if ( ! class_exists( '\WSAL\Utils\Abstract_Migration' ) ) {
46
  */
47
  class Abstract_Migration {
48
 
 
 
 
 
 
49
  /**
50
  * Extracted version from the DB (WP option)
51
  *
@@ -69,7 +74,7 @@ if ( ! class_exists( '\WSAL\Utils\Abstract_Migration' ) ) {
69
  *
70
  * @var string
71
  *
72
- * @since 4.4.2
73
  */
74
  protected static $const_name_of_plugin_version = '';
75
 
@@ -106,7 +111,7 @@ if ( ! class_exists( '\WSAL\Utils\Abstract_Migration' ) ) {
106
  }
107
 
108
  // Check if that process is not started already.
109
- $migration_started = WP_Helper::get_global_option( 'migration-started', false );
110
 
111
  if ( version_compare( static::get_stored_version(), \constant( static::$const_name_of_plugin_version ), '<' ) ) {
112
 
@@ -116,10 +121,25 @@ if ( ! class_exists( '\WSAL\Utils\Abstract_Migration' ) ) {
116
  if ( '0000' === $stored_version_as_number && ! WP_Helper::is_plugin_installed() ) {
117
  // That is first install of the plugin, store the version and leave.
118
  self::store_updated_version();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  } else {
120
 
121
  if ( false === $migration_started ) {
122
- WP_Helper::set_global_option( 'migration-started', true );
123
  try {
124
  // set transient for the updating status - would that help ?!?
125
  $method_as_version_numbers = static::get_all_migration_methods_as_numbers();
@@ -146,7 +166,7 @@ if ( ! class_exists( '\WSAL\Utils\Abstract_Migration' ) ) {
146
 
147
  self::store_updated_version();
148
  } finally {
149
- \WSAL\Helpers\WP_Helper::delete_global_option( 'migration-started' );
150
  }
151
  }
152
  }
@@ -158,7 +178,7 @@ if ( ! class_exists( '\WSAL\Utils\Abstract_Migration' ) ) {
158
  *
159
  * @return void
160
  *
161
- * @since 4.4.2
162
  */
163
  if ( false === $migration_started && version_compare( static::get_stored_version(), \constant( static::$const_name_of_plugin_version ), '>' ) ) {
164
  self::store_updated_version();
@@ -172,7 +192,7 @@ if ( ! class_exists( '\WSAL\Utils\Abstract_Migration' ) ) {
172
  *
173
  * @return void
174
  *
175
- * @since 4.4.2
176
  */
177
  public static function remove_notice( string $notice ) {
178
 
@@ -194,7 +214,7 @@ if ( ! class_exists( '\WSAL\Utils\Abstract_Migration' ) ) {
194
  private static function get_stored_version() {
195
 
196
  if ( '' === trim( static::$stored_version ) ) {
197
- static::$stored_version = WP_Helper::get_option( static::$version_option_name, '0.0.0' );
198
  }
199
 
200
  return static::$stored_version;
46
  */
47
  class Abstract_Migration {
48
 
49
+ /**
50
+ * That is a global constant used for marking the migration process as in progress.
51
+ */
52
+ const STARTED_MIGRATION_PROCESS = 'migration-process-started';
53
+
54
  /**
55
  * Extracted version from the DB (WP option)
56
  *
74
  *
75
  * @var string
76
  *
77
+ * @since 4.4.2.1
78
  */
79
  protected static $const_name_of_plugin_version = '';
80
 
111
  }
112
 
113
  // Check if that process is not started already.
114
+ $migration_started = WP_Helper::get_global_option( self::STARTED_MIGRATION_PROCESS, false );
115
 
116
  if ( version_compare( static::get_stored_version(), \constant( static::$const_name_of_plugin_version ), '<' ) ) {
117
 
121
  if ( '0000' === $stored_version_as_number && ! WP_Helper::is_plugin_installed() ) {
122
  // That is first install of the plugin, store the version and leave.
123
  self::store_updated_version();
124
+
125
+ $disabled_alerts = WP_Helper::get_global_option( 'disabled-alerts', false );
126
+
127
+ $always_disabled_alerts = implode( ',', \WSAL_Settings::get_default_always_disabled_alerts() );
128
+
129
+ $disabled_alerts = implode( ',', \array_merge( \explode( ',', $disabled_alerts ), \explode( ',', $always_disabled_alerts ) ) );
130
+
131
+ /**
132
+ * That is split only for clarity
133
+ */
134
+ if ( false === $disabled_alerts ) {
135
+ WP_Helper::set_global_option( 'disabled-alerts', $always_disabled_alerts );
136
+ } elseif ( $disabled_alerts !== $always_disabled_alerts ) {
137
+ WP_Helper::update_global_option( 'disabled-alerts', $disabled_alerts );
138
+ }
139
  } else {
140
 
141
  if ( false === $migration_started ) {
142
+ WP_Helper::set_global_option( self::STARTED_MIGRATION_PROCESS, true );
143
  try {
144
  // set transient for the updating status - would that help ?!?
145
  $method_as_version_numbers = static::get_all_migration_methods_as_numbers();
166
 
167
  self::store_updated_version();
168
  } finally {
169
+ \WSAL\Helpers\WP_Helper::delete_global_option( self::STARTED_MIGRATION_PROCESS );
170
  }
171
  }
172
  }
178
  *
179
  * @return void
180
  *
181
+ * @since 4.4.2.1
182
  */
183
  if ( false === $migration_started && version_compare( static::get_stored_version(), \constant( static::$const_name_of_plugin_version ), '>' ) ) {
184
  self::store_updated_version();
192
  *
193
  * @return void
194
  *
195
+ * @since 4.4.2.1
196
  */
197
  public static function remove_notice( string $notice ) {
198
 
214
  private static function get_stored_version() {
215
 
216
  if ( '' === trim( static::$stored_version ) ) {
217
+ static::$stored_version = WP_Helper::get_global_option( static::$version_option_name, '0.0.0' );
218
  }
219
 
220
  return static::$stored_version;
classes/Migration/class-metadata-migration-440.php CHANGED
@@ -56,7 +56,7 @@ if ( ! class_exists( '\WSAL\Migration\Metadata_Migration_440' ) ) {
56
  *
57
  * @param string $action - The name of the action.
58
  *
59
- * @since 4.4.2
60
  */
61
  public function __construct( string $action ) {
62
  $this->action .= $action;
56
  *
57
  * @param string $action - The name of the action.
58
  *
59
+ * @since 4.4.2.1
60
  */
61
  public function __construct( string $action ) {
62
  $this->action .= $action;
classes/Migration/class-migration.php CHANGED
@@ -35,7 +35,7 @@ if ( ! class_exists( '\WSAL\Utils\Migration' ) ) {
35
  *
36
  * @var string
37
  *
38
- * @since 4.4.2
39
  */
40
  protected static $version_option_name = WSAL_PREFIX . 'plugin_version';
41
 
@@ -46,10 +46,19 @@ if ( ! class_exists( '\WSAL\Utils\Migration' ) ) {
46
  *
47
  * @var string
48
  *
49
- * @since 4.4.2
50
  */
51
  protected static $const_name_of_plugin_version = 'WSAL_VERSION';
52
 
 
 
 
 
 
 
 
 
 
53
  /**
54
  * Migration for version upto 4.4.2
55
  *
@@ -58,6 +67,9 @@ if ( ! class_exists( '\WSAL\Utils\Migration' ) ) {
58
  * @return void
59
  */
60
  protected static function migrate_up_to_4420() {
 
 
 
61
  // If the legacy table exists, lets extract the options and remove it.
62
  if ( \WSAL\Entities\Options_Entity::check_table_exists( \WSAL\Entities\Options_Entity::get_table_name() ) ) {
63
  \WSAL\Entities\Options_Entity::transfer_options();
@@ -66,19 +78,34 @@ if ( ! class_exists( '\WSAL\Utils\Migration' ) ) {
66
  \WSAL\Entities\Options_Entity::destroy_connection();
67
  }
68
 
69
- $disabled_alerts = WP_Helper::get_global_option( 'disabled-alerts', false );
70
-
71
  $wsal = \WpSecurityAuditLog::get_instance();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
 
73
  $always_disabled_alerts = implode( ',', $wsal->settings()->always_disabled_alerts );
74
 
 
 
75
  /**
76
  * That is split only for clarity
77
  */
78
  if ( false === $disabled_alerts ) {
79
  WP_Helper::set_global_option( 'disabled-alerts', $always_disabled_alerts );
80
  } elseif ( $disabled_alerts !== $always_disabled_alerts ) {
81
- WP_Helper::update_global_option( 'disabled-alerts', $always_disabled_alerts );
82
  }
83
 
84
  self::remove_notice( 'wsal-notice-wsal-privacy-notice-3.2' );
@@ -405,22 +432,24 @@ if ( ! class_exists( '\WSAL\Utils\Migration' ) ) {
405
  * Premium or not does not matter. User can had premium but in time of the upgrade, their license could be expired,
406
  * that does not mean that they will never switch back to the premium version.
407
  */
408
- $table_exists = \WSAL\Entities\Occurrences_Entity::check_table_exists( $wpdb->prefix . 'wsal_sessions' );
409
  if ( $table_exists ) {
410
  $column_exists = \WSAL\Entities\Occurrences_Entity::check_column(
411
- $wpdb->prefix . 'wsal_sessions',
412
  'session_token',
413
  'varchar( 255 )'
414
  );
415
 
416
  if ( ! $column_exists ) {
417
- $alter_query = 'ALTER TABLE `wp_wsal_sessions` CHANGE `session_token` `session_token` VARCHAR(128)
418
  NOT NULL;';
419
 
420
  $wpdb->query( $alter_query ); // phpcs:ignore
421
  }
422
  }
423
 
 
 
424
  // If one of the new columns exists there is no need to alter the table.
425
  $column_exists = \WSAL\Entities\Occurrences_Entity::check_column(
426
  \WSAL\Entities\Occurrences_Entity::get_table_name(),
@@ -492,5 +521,51 @@ if ( ! class_exists( '\WSAL\Utils\Migration' ) ) {
492
  }
493
  }
494
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
495
  }
496
  }
35
  *
36
  * @var string
37
  *
38
+ * @since 4.4.2.1
39
  */
40
  protected static $version_option_name = WSAL_PREFIX . 'plugin_version';
41
 
46
  *
47
  * @var string
48
  *
49
+ * @since 4.4.2.1
50
  */
51
  protected static $const_name_of_plugin_version = 'WSAL_VERSION';
52
 
53
+ /**
54
+ * Marks 442 update as started
55
+ *
56
+ * @var boolean
57
+ *
58
+ * @since 4.4.2.1
59
+ */
60
+ protected static $_442_started = false;
61
+
62
  /**
63
  * Migration for version upto 4.4.2
64
  *
67
  * @return void
68
  */
69
  protected static function migrate_up_to_4420() {
70
+
71
+ self::$_442_started = true;
72
+
73
  // If the legacy table exists, lets extract the options and remove it.
74
  if ( \WSAL\Entities\Options_Entity::check_table_exists( \WSAL\Entities\Options_Entity::get_table_name() ) ) {
75
  \WSAL\Entities\Options_Entity::transfer_options();
78
  \WSAL\Entities\Options_Entity::destroy_connection();
79
  }
80
 
 
 
81
  $wsal = \WpSecurityAuditLog::get_instance();
82
+ $wsal::load_freemius();
83
+ $wsal->load_defaults();
84
+
85
+ // Load dependencies.
86
+ if ( ! isset( $wsal->alerts ) ) {
87
+ $wsal->alerts = new \WSAL_AlertManager( $wsal );
88
+ }
89
+
90
+ if ( ! isset( $wsal->constants ) ) {
91
+ $wsal->constants = new \WSAL_ConstantManager();
92
+ }
93
+
94
+ $wsal->sensors = new \WSAL_SensorManager( $wsal );
95
+
96
+ $disabled_alerts = WP_Helper::get_global_option( 'disabled-alerts', false );
97
 
98
  $always_disabled_alerts = implode( ',', $wsal->settings()->always_disabled_alerts );
99
 
100
+ $disabled_alerts = implode( ',', \array_merge( \explode( ',', $disabled_alerts ), \explode( ',', $always_disabled_alerts ) ) );
101
+
102
  /**
103
  * That is split only for clarity
104
  */
105
  if ( false === $disabled_alerts ) {
106
  WP_Helper::set_global_option( 'disabled-alerts', $always_disabled_alerts );
107
  } elseif ( $disabled_alerts !== $always_disabled_alerts ) {
108
+ WP_Helper::update_global_option( 'disabled-alerts', $disabled_alerts );
109
  }
110
 
111
  self::remove_notice( 'wsal-notice-wsal-privacy-notice-3.2' );
432
  * Premium or not does not matter. User can had premium but in time of the upgrade, their license could be expired,
433
  * that does not mean that they will never switch back to the premium version.
434
  */
435
+ $table_exists = \WSAL\Entities\Occurrences_Entity::check_table_exists( $wpdb->base_prefix . 'wsal_sessions' );
436
  if ( $table_exists ) {
437
  $column_exists = \WSAL\Entities\Occurrences_Entity::check_column(
438
+ $wpdb->base_prefix . 'wsal_sessions',
439
  'session_token',
440
  'varchar( 255 )'
441
  );
442
 
443
  if ( ! $column_exists ) {
444
+ $alter_query = 'ALTER TABLE `' . $wpdb->base_prefix . 'wsal_sessions` CHANGE `session_token` `session_token` VARCHAR(128)
445
  NOT NULL;';
446
 
447
  $wpdb->query( $alter_query ); // phpcs:ignore
448
  }
449
  }
450
 
451
+ \WSAL\Entities\Occurrences_Entity::destroy_connection();
452
+
453
  // If one of the new columns exists there is no need to alter the table.
454
  $column_exists = \WSAL\Entities\Occurrences_Entity::check_column(
455
  \WSAL\Entities\Occurrences_Entity::get_table_name(),
521
  }
522
  }
523
  }
524
+
525
+ /**
526
+ * Migration for version upto 4.4.2.1
527
+ *
528
+ * Note: The migration methods need to be in line with the @see WSAL\Utils\Abstract_Migration::$pad_length
529
+ *
530
+ * @return void
531
+ */
532
+ protected static function migrate_up_to_4421() {
533
+ \WSAL\Helpers\WP_Helper::delete_global_option( 'migration-started' );
534
+
535
+ if ( ! self::$_442_started ) {
536
+ self::migrate_up_to_4420();
537
+ }
538
+
539
+ global $wpdb;
540
+ /**
541
+ * User session table should be always in the local database.
542
+ *
543
+ * Premium or not does not matter. User can had premium but in time of the upgrade, their license could be expired,
544
+ * that does not mean that they will never switch back to the premium version.
545
+ */
546
+ $table_exists = \WSAL\Entities\Occurrences_Entity::check_table_exists( $wpdb->base_prefix . 'wsal_sessions' );
547
+ if ( $table_exists ) {
548
+ $column_exists = \WSAL\Entities\Occurrences_Entity::check_column(
549
+ $wpdb->base_prefix . 'wsal_sessions',
550
+ 'sites',
551
+ 'longtext'
552
+ );
553
+ $column_exists_id = \WSAL\Entities\Occurrences_Entity::check_column(
554
+ $wpdb->base_prefix . 'wsal_sessions',
555
+ 'id',
556
+ 'bigint'
557
+ );
558
+
559
+ if ( ! $column_exists || $column_exists_id ) {
560
+ $alter_query = 'DROP TABLE `' . $wpdb->base_prefix . 'wsal_sessions`;';
561
+
562
+ $wpdb->query( $alter_query ); // phpcs:ignore
563
+
564
+ if ( class_exists( '\WSAL\Adapter\User_Sessions' ) ) {
565
+ \WSAL\Adapter\User_Sessions::create_table();
566
+ }
567
+ }
568
+ }
569
+ }
570
  }
571
  }
classes/Models/Occurrence.php CHANGED
@@ -336,7 +336,7 @@ class WSAL_Models_Occurrence extends WSAL_Models_ActiveRecord {
336
  $this->_cached_message = $alert_object->get_message( $meta_array, $this->_cached_message, $this->get_id(), $context );
337
  } else {
338
  // Filter to allow items to be added elsewhere.
339
- $addon_event_codes = apply_filters( 'wsal_addon_event_codes', $addon_event_codes );
340
 
341
  $installer_nonce = wp_create_nonce( 'wsal-install-addon' );
342
  foreach ( $addon_event_codes as $key => $addon ) {
336
  $this->_cached_message = $alert_object->get_message( $meta_array, $this->_cached_message, $this->get_id(), $context );
337
  } else {
338
  // Filter to allow items to be added elsewhere.
339
+ $addon_event_codes = apply_filters( 'wsal_addon_event_codes', array() );
340
 
341
  $installer_nonce = wp_create_nonce( 'wsal-install-addon' );
342
  foreach ( $addon_event_codes as $key => $addon ) {
classes/SensorManager.php CHANGED
@@ -35,7 +35,7 @@ final class WSAL_SensorManager extends WSAL_AbstractSensor {
35
  *
36
  * @param WpSecurityAuditLog $plugin - Instance of WpSecurityAuditLog.
37
  *
38
- * @since 4.4.2
39
  */
40
  public function __construct( WpSecurityAuditLog $plugin ) {
41
  parent::__construct( $plugin );
35
  *
36
  * @param WpSecurityAuditLog $plugin - Instance of WpSecurityAuditLog.
37
  *
38
+ * @since 4.4.2.1
39
  */
40
  public function __construct( WpSecurityAuditLog $plugin ) {
41
  parent::__construct( $plugin );
classes/Sensors/Content.php CHANGED
@@ -92,7 +92,7 @@ class WSAL_Sensors_Content extends WSAL_AbstractSensor {
92
  *
93
  * @var WpSecurityAuditLog
94
  *
95
- * @since 4.4.2
96
  */
97
  private static $wsal_plugin = null;
98
 
@@ -132,7 +132,7 @@ class WSAL_Sensors_Content extends WSAL_AbstractSensor {
132
  *
133
  * @param WpSecurityAuditLog $plugin - The plugin instance.
134
  *
135
- * @since 4.4.2
136
  */
137
  public function __construct( WpSecurityAuditLog $plugin ) {
138
  parent::__construct( $plugin );
@@ -146,7 +146,7 @@ class WSAL_Sensors_Content extends WSAL_AbstractSensor {
146
  *
147
  * @return void
148
  *
149
- * @since 4.4.2
150
  */
151
  public static function init( WpSecurityAuditLog $plugin ) {
152
  self::$wsal_plugin = $plugin;
@@ -802,7 +802,7 @@ class WSAL_Sensors_Content extends WSAL_AbstractSensor {
802
  /**
803
  * Fires immediately before updating a post's metadata.
804
  *
805
- * @since 4.4.2
806
  *
807
  * @param int $meta_id ID of metadata entry to update.
808
  * @param int $object_id Post ID.
@@ -826,7 +826,7 @@ class WSAL_Sensors_Content extends WSAL_AbstractSensor {
826
  *
827
  * @return void
828
  *
829
- * @since 4.4.2
830
  */
831
  public static function fire_lock_change( int $post_id, string $meta_value ) {
832
 
92
  *
93
  * @var WpSecurityAuditLog
94
  *
95
+ * @since 4.4.2.1
96
  */
97
  private static $wsal_plugin = null;
98
 
132
  *
133
  * @param WpSecurityAuditLog $plugin - The plugin instance.
134
  *
135
+ * @since 4.4.2.1
136
  */
137
  public function __construct( WpSecurityAuditLog $plugin ) {
138
  parent::__construct( $plugin );
146
  *
147
  * @return void
148
  *
149
+ * @since 4.4.2.1
150
  */
151
  public static function init( WpSecurityAuditLog $plugin ) {
152
  self::$wsal_plugin = $plugin;
802
  /**
803
  * Fires immediately before updating a post's metadata.
804
  *
805
+ * @since 4.4.2.1
806
  *
807
  * @param int $meta_id ID of metadata entry to update.
808
  * @param int $object_id Post ID.
826
  *
827
  * @return void
828
  *
829
+ * @since 4.4.2.1
830
  */
831
  public static function fire_lock_change( int $post_id, string $meta_value ) {
832
 
classes/Sensors/PluginsThemes.php CHANGED
@@ -95,7 +95,7 @@ class WSAL_Sensors_PluginsThemes extends WSAL_AbstractSensor {
95
  * @param string $stylesheet Stylesheet of the theme to delete.
96
  * @param bool $deleted Whether the theme deletion was successful.
97
  *
98
- * @since 4.4.2
99
  *
100
  * phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
101
  */
95
  * @param string $stylesheet Stylesheet of the theme to delete.
96
  * @param bool $deleted Whether the theme deletion was successful.
97
  *
98
+ * @since 4.4.2.1
99
  *
100
  * phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
101
  */
classes/Settings.php CHANGED
@@ -127,6 +127,14 @@ class WSAL_Settings {
127
  */
128
  public $always_disabled_alerts = array( 5010, 5011, 5012, 5013, 5014, 5015, 5016, 5017, 5018, 5022, 5023, 5024 );
129
 
 
 
 
 
 
 
 
 
130
  /**
131
  * Current screen object.
132
  *
@@ -2297,4 +2305,15 @@ class WSAL_Settings {
2297
  $this->plugin->set_global_setting( 'db_version', $version, true );
2298
  }
2299
 
 
 
 
 
 
 
 
 
 
 
 
2300
  }
127
  */
128
  public $always_disabled_alerts = array( 5010, 5011, 5012, 5013, 5014, 5015, 5016, 5017, 5018, 5022, 5023, 5024 );
129
 
130
+ /**
131
+ * Alerts disabled by default - duplication of the above for faster access via static call
132
+ *
133
+ * @var int[]
134
+ * @since 4.4.2.1
135
+ */
136
+ private static $default_always_disabled_alerts = array( 5010, 5011, 5012, 5013, 5014, 5015, 5016, 5017, 5018, 5022, 5023, 5024 );
137
+
138
  /**
139
  * Current screen object.
140
  *
2305
  $this->plugin->set_global_setting( 'db_version', $version, true );
2306
  }
2307
 
2308
+
2309
+ /**
2310
+ * Returns default disabled alerts statically
2311
+ *
2312
+ * @return array
2313
+ *
2314
+ * @since 4.4.2.1
2315
+ */
2316
+ public static function get_default_always_disabled_alerts(): array {
2317
+ return self::$default_always_disabled_alerts;
2318
+ }
2319
  }
classes/Upgrade/Upgrade_43000_To_44400.php DELETED
@@ -1,207 +0,0 @@
1
- <?php
2
- /**
3
- * TODO: That has to be removed - leaving it here for now for possible additional checks
4
- *
5
- * Class WSAL_Upgrade_43000_to_44400.
6
- *
7
- * @package wsal
8
- * @subpackage upgrade
9
- *
10
- * @since 4.4.0
11
- */
12
-
13
- // Exit if accessed directly.
14
- if ( ! defined( 'ABSPATH' ) ) {
15
- exit;
16
- }
17
-
18
- /**
19
- * Class handles upgrade changes from version 43000 to 44400.
20
- *
21
- * @package wsal
22
- * @subpackage upgrade
23
- *
24
- * @since 4.4.0
25
- */
26
- class WSAL_Upgrade_43000_To_44400 {
27
-
28
- /**
29
- * Plugin instance.
30
- *
31
- * @var WpSecurityAuditLog
32
- */
33
- private $plugin;
34
-
35
- /**
36
- * Constructor.
37
- *
38
- * @param WpSecurityAuditLog $plugin Plugin instance.
39
- */
40
- public function __construct( WpSecurityAuditLog $plugin ) {
41
- $this->plugin = $plugin;
42
- }
43
-
44
- /**
45
- * Runs the upgrade process.
46
- */
47
- public function run() {
48
-
49
- // Delete unwanted usermeta.
50
- global $wpdb;
51
- $wpdb->query( // phpcs:ignore
52
- $wpdb->prepare(
53
- "DELETE FROM {$wpdb->usermeta} WHERE meta_key = '%s';", // phpcs:ignore
54
- 'wsal-notice-update-44-notice'
55
- )
56
- );
57
-
58
- if ( class_exists( 'WSAL_Extension_Manager' ) ) {
59
- WSAL_Extension_Manager::include_extension( 'external-db' );
60
- }
61
-
62
- if ( ! did_action( 'wsal_init' ) ) {
63
- // We need to call wsal init manually because it does not run as before the upgrade procedure is triggered.
64
- do_action( 'wsal_init', $this->plugin );
65
- }
66
-
67
- // Remove some forgotten WFCM settings from the options table.
68
- $this->remove_wfcm_leftover_settings();
69
-
70
- // Change occurrence table in local database.
71
- $this->upgrade_occurrence_table( 'local' );
72
-
73
-
74
- $this->stop_autoloading_some_settings();
75
- }
76
-
77
- /**
78
- * Removes a bunch of legacy WFCM extension related settings.
79
- */
80
- private function remove_wfcm_leftover_settings() {
81
- // Remove all settings related to WFCM plugin.
82
- $not_found_page_related_settings = array(
83
- 'wsal_scan-in-progress',
84
- 'wsal_last-scanned',
85
- 'wsal_is_initial_scan_0',
86
- 'wsal_is_initial_scan_1',
87
- 'wsal_is_initial_scan_2',
88
- 'wsal_is_initial_scan_3',
89
- 'wsal_is_initial_scan_4',
90
- 'wsal_is_initial_scan_5',
91
- 'wsal_is_initial_scan_6',
92
- 'wsal_last_scan_start',
93
- 'wsal_scanned_dirs',
94
- );
95
- foreach ( $not_found_page_related_settings as $setting_name ) {
96
- $this->plugin->delete_global_setting( $setting_name );
97
- }
98
- }
99
-
100
- /**
101
- * Upgrades an occurrence table using given connection.
102
- *
103
- * It also kicks-off a metadata migration in the background.
104
- *
105
- * @param string|array $connection Connection alias or configuration data.
106
- *
107
- * @throws Freemius_Exception Freemius exception.
108
- */
109
- private function upgrade_occurrence_table( $connection ) {
110
- $connector = $this->plugin->get_connector( $connection );
111
- /** @var WSAL_Adapters_MySQL_Occurrence $occurrence_adapter */
112
- $occurrence_adapter = $connector->get_adapter( 'Occurrence' );
113
-
114
- // Skip the upgrade it the table does not exist for some reason.
115
- if ( ! $connector->is_installed() ) {
116
- return;
117
- }
118
-
119
- $table_name = $occurrence_adapter->get_table();
120
- $connector->query( $this->get_occurrence_table_upgrade_query( $table_name ) );
121
-
122
- // Check if there are any events to process.
123
- if ( $occurrence_adapter->count() > 0 ) {
124
- // Create a background job to migrate the metadata.
125
- $job_info = array(
126
- 'start_time' => current_time( 'timestamp' ), // phpcs:ignore
127
- 'processed_events_count' => 0,
128
- 'batch_size' => 50,
129
- 'connection' => is_array( $connection ) ? $connection['name'] : $connection,
130
- );
131
-
132
- // Store the initial info to the db.
133
- WSAL_Upgrade_MetadataMigration::store_migration_info( $job_info );
134
-
135
- // Create and dispatch the background process itself.
136
- $bg_process = new WSAL_Upgrade_MetadataMigration();
137
- $bg_process->push_to_queue( $job_info );
138
- $bg_process->save();
139
- $bg_process->dispatch();
140
- }
141
- }
142
-
143
- /**
144
- * Builds an upgrade query for the occurrence table.
145
- *
146
- * @param string $table_name Table name.
147
- *
148
- * @return string
149
- */
150
- private function get_occurrence_table_upgrade_query( $table_name ) {
151
- return "ALTER TABLE {$table_name}"
152
- . ' DROP COLUMN is_read, '
153
- . ' DROP COLUMN is_migrated, '
154
- . " ADD client_ip VARCHAR(255) NOT NULL DEFAULT '',"
155
- . ' ADD severity BIGINT NOT NULL DEFAULT 0,'
156
- . " ADD object VARCHAR(255) NOT NULL DEFAULT '',"
157
- . " ADD event_type VARCHAR(255) NOT NULL DEFAULT '',"
158
- . " ADD user_agent VARCHAR(255) NOT NULL DEFAULT '',"
159
- . " ADD user_roles VARCHAR(255) NOT NULL DEFAULT '',"
160
- . ' ADD username VARCHAR(255) NULL,'
161
- . ' ADD user_id BIGINT NULL ,'
162
- . " ADD session_id VARCHAR(255) NOT NULL DEFAULT '',"
163
- . " ADD post_status VARCHAR(255) NOT NULL DEFAULT '',"
164
- . " ADD post_type VARCHAR(255) NOT NULL DEFAULT '',"
165
- . ' ADD post_id BIGINT NOT NULL DEFAULT 0;';
166
- }
167
-
168
-
169
- /**
170
- * Change all but selected plugin settings to stop autoloading.
171
- */
172
- private function stop_autoloading_some_settings() {
173
- $settings_to_leave_on_autoload = array(
174
- 'wsal_adapter-connection',
175
- 'wsal_admin-bar-notif-updates',
176
- 'wsal_db_version',
177
- 'wsal_disable-admin-bar-notif',
178
- 'wsal_frontend-events',
179
- 'wsal_plugin-viewers',
180
- 'wsal_restrict-log-viewer',
181
- 'wsal_restrict-plugin-settings',
182
- 'wsal_setup-modal-dismissed',
183
- 'wsal_version',
184
- 'wsal_freemius_state',
185
- 'wsal_only-me-user-id',
186
- );
187
-
188
- // phpcs:disable
189
- global $wpdb;
190
- $plugin_options = $wpdb->get_results(
191
- 'SELECT option_name, option_value '
192
- . " FROM $wpdb->options "
193
- . " WHERE option_name LIKE '" . WpSecurityAuditLog::OPTIONS_PREFIX . "%';",
194
- ARRAY_A
195
- );
196
- // phpcs:enable
197
-
198
- if ( ! empty( $plugin_options ) ) {
199
- foreach ( $plugin_options as $option ) {
200
- if ( ! in_array( $option['option_name'], $settings_to_leave_on_autoload ) ) { // phpcs:ignore
201
- $value = maybe_unserialize( $option['option_value'] );
202
- $this->plugin->set_global_setting( $option['option_name'], $value, false );
203
- }
204
- }
205
- }
206
- }
207
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/wp-security-audit-log.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the GPL v3.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WP Activity Log 4.4.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-security-audit-log\n"
7
  "Last-Translator: WP White Security <info@wpwhitesecurity.com>\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-06-27T10:50:15+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.6.0\n"
15
  "X-Domain: wp-security-audit-log\n"
2
  # This file is distributed under the GPL v3.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WP Activity Log 4.4.2.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-security-audit-log\n"
7
  "Last-Translator: WP White Security <info@wpwhitesecurity.com>\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-07-06T06:38:37+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.6.0\n"
15
  "X-Domain: wp-security-audit-log\n"
readme.txt CHANGED
@@ -5,8 +5,8 @@ License: GPLv3
5
  License URI: https://www.gnu.org/licenses/gpl.html
6
  Tags: activity log, wordpress activity logs, security audit log, audit log, user tracking, security event log, audit trail, wordpress security monitor, wordpress admin, wordpress admin monitoring, user activity, admin, multisite, SMS alerts, wordpress monitoring, email notification, wordpress email alerts, tracking, user tracking, user activity report, wordpress audit trail
7
  Requires at least: 5.0
8
- Tested up to: 6.0.0
9
- Stable tag: 4.4.2
10
  Requires PHP: 7.0
11
 
12
  The #1 user-rated activity log plugin. Keep a comprehensive log of the changes that happen on your site with this easy to use plugin.
@@ -208,7 +208,19 @@ Please refer to our [support pages](https://wpactivitylog.com/support/?utm_sourc
208
 
209
  == Changelog ==
210
 
211
- = 4.4.2 (2022-06-28) =
 
 
 
 
 
 
 
 
 
 
 
 
212
 
213
  Release notes: [More reports white labelling options & statistics reports](https://wpactivitylog.com/wsal-4-4-2/)
214
 
5
  License URI: https://www.gnu.org/licenses/gpl.html
6
  Tags: activity log, wordpress activity logs, security audit log, audit log, user tracking, security event log, audit trail, wordpress security monitor, wordpress admin, wordpress admin monitoring, user activity, admin, multisite, SMS alerts, wordpress monitoring, email notification, wordpress email alerts, tracking, user tracking, user activity report, wordpress audit trail
7
  Requires at least: 5.0
8
+ Tested up to: 6.0.1
9
+ Stable tag: 4.4.2.1
10
  Requires PHP: 7.0
11
 
12
  The #1 user-rated activity log plugin. Keep a comprehensive log of the changes that happen on your site with this easy to use plugin.
208
 
209
  == Changelog ==
210
 
211
+ = 4.4.2.1 (2022-07-06) =
212
+
213
+ * **Bug fixes**
214
+ * Fixed: Fatal error when a WooCommerce file download is triggered.
215
+ * Fixed: Only users with administrator role shown as logged in on a multisite network.
216
+ * Fixed: Event IDs 5010 - 5018 wrongly enabled by default.
217
+ * Fixed: A number of upgrade errors caused because of possibly outdated files.
218
+ * Fixed: Disabled event IDs disabled at multisite network level were activated back when accessing child sites.
219
+ * Fixed: Upgrade notice shown on a multisite network even when it is a new install.
220
+ * Fixed: Fatal error triggered due to incorrectly named files (wrong capilitazion).
221
+ * Fixed: Error in Alert formatter triggered during the upgrade process.
222
+
223
+ = 4.4.2 (2022-06-23) =
224
 
225
  Release notes: [More reports white labelling options & statistics reports](https://wpactivitylog.com/wsal-4-4-2/)
226
 
third-party/freemius/wordpress-sdk/includes/sdk/LICENSE.txt DELETED
@@ -1,340 +0,0 @@
1
- GNU GENERAL PUBLIC LICENSE
2
- Version 2, June 1991
3
-
4
- Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
5
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6
- Everyone is permitted to copy and distribute verbatim copies
7
- of this license document, but changing it is not allowed.
8
-
9
- Preamble
10
-
11
- The licenses for most software are designed to take away your
12
- freedom to share and change it. By contrast, the GNU General Public
13
- License is intended to guarantee your freedom to share and change free
14
- software--to make sure the software is free for all its users. This
15
- General Public License applies to most of the Free Software
16
- Foundation's software and to any other program whose authors commit to
17
- using it. (Some other Free Software Foundation software is covered by
18
- the GNU Lesser General Public License instead.) You can apply it to
19
- your programs, too.
20
-
21
- When we speak of free software, we are referring to freedom, not
22
- price. Our General Public Licenses are designed to make sure that you
23
- have the freedom to distribute copies of free software (and charge for
24
- this service if you wish), that you receive source code or can get it
25
- if you want it, that you can change the software or use pieces of it
26
- in new free programs; and that you know you can do these things.
27
-
28
- To protect your rights, we need to make restrictions that forbid
29
- anyone to deny you these rights or to ask you to surrender the rights.
30
- These restrictions translate to certain responsibilities for you if you
31
- distribute copies of the software, or if you modify it.
32
-
33
- For example, if you distribute copies of such a program, whether
34
- gratis or for a fee, you must give the recipients all the rights that
35
- you have. You must make sure that they, too, receive or can get the
36
- source code. And you must show them these terms so they know their
37
- rights.
38
-
39
- We protect your rights with two steps: (1) copyright the software, and
40
- (2) offer you this license which gives you legal permission to copy,
41
- distribute and/or modify the software.
42
-
43
- Also, for each author's protection and ours, we want to make certain
44
- that everyone understands that there is no warranty for this free
45
- software. If the software is modified by someone else and passed on, we
46
- want its recipients to know that what they have is not the original, so
47
- that any problems introduced by others will not reflect on the original
48
- authors' reputations.
49
-
50
- Finally, any free program is threatened constantly by software
51
- patents. We wish to avoid the danger that redistributors of a free
52
- program will individually obtain patent licenses, in effect making the
53
- program proprietary. To prevent this, we have made it clear that any
54
- patent must be licensed for everyone's free use or not licensed at all.
55
-
56
- The precise terms and conditions for copying, distribution and
57
- modification follow.
58
-
59
- GNU GENERAL PUBLIC LICENSE
60
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
-
62
- 0. This License applies to any program or other work which contains
63
- a notice placed by the copyright holder saying it may be distributed
64
- under the terms of this General Public License. The "Program", below,
65
- refers to any such program or work, and a "work based on the Program"
66
- means either the Program or any derivative work under copyright law:
67
- that is to say, a work containing the Program or a portion of it,
68
- either verbatim or with modifications and/or translated into another
69
- language. (Hereinafter, translation is included without limitation in
70
- the term "modification".) Each licensee is addressed as "you".
71
-
72
- Activities other than copying, distribution and modification are not
73
- covered by this License; they are outside its scope. The act of
74
- running the Program is not restricted, and the output from the Program
75
- is covered only if its contents constitute a work based on the
76
- Program (independent of having been made by running the Program).
77
- Whether that is true depends on what the Program does.
78
-
79
- 1. You may copy and distribute verbatim copies of the Program's
80
- source code as you receive it, in any medium, provided that you
81
- conspicuously and appropriately publish on each copy an appropriate
82
- copyright notice and disclaimer of warranty; keep intact all the
83
- notices that refer to this License and to the absence of any warranty;
84
- and give any other recipients of the Program a copy of this License
85
- along with the Program.
86
-
87
- You may charge a fee for the physical act of transferring a copy, and
88
- you may at your option offer warranty protection in exchange for a fee.
89
-
90
- 2. You may modify your copy or copies of the Program or any portion
91
- of it, thus forming a work based on the Program, and copy and
92
- distribute such modifications or work under the terms of Section 1
93
- above, provided that you also meet all of these conditions:
94
-
95
- a) You must cause the modified files to carry prominent notices
96
- stating that you changed the files and the date of any change.
97
-
98
- b) You must cause any work that you distribute or publish, that in
99
- whole or in part contains or is derived from the Program or any
100
- part thereof, to be licensed as a whole at no charge to all third
101
- parties under the terms of this License.
102
-
103
- c) If the modified program normally reads commands interactively
104
- when run, you must cause it, when started running for such
105
- interactive use in the most ordinary way, to print or display an
106
- announcement including an appropriate copyright notice and a
107
- notice that there is no warranty (or else, saying that you provide
108
- a warranty) and that users may redistribute the program under
109
- these conditions, and telling the user how to view a copy of this
110
- License. (Exception: if the Program itself is interactive but
111
- does not normally print such an announcement, your work based on
112
- the Program is not required to print an announcement.)
113
-
114
- These requirements apply to the modified work as a whole. If
115
- identifiable sections of that work are not derived from the Program,
116
- and can be reasonably considered independent and separate works in
117
- themselves, then this License, and its terms, do not apply to those
118
- sections when you distribute them as separate works. But when you
119
- distribute the same sections as part of a whole which is a work based
120
- on the Program, the distribution of the whole must be on the terms of
121
- this License, whose permissions for other licensees extend to the
122
- entire whole, and thus to each and every part regardless of who wrote it.
123
-
124
- Thus, it is not the intent of this section to claim rights or contest
125
- your rights to work written entirely by you; rather, the intent is to
126
- exercise the right to control the distribution of derivative or
127
- collective works based on the Program.
128
-
129
- In addition, mere aggregation of another work not based on the Program
130
- with the Program (or with a work based on the Program) on a volume of
131
- a storage or distribution medium does not bring the other work under
132
- the scope of this License.
133
-
134
- 3. You may copy and distribute the Program (or a work based on it,
135
- under Section 2) in object code or executable form under the terms of
136
- Sections 1 and 2 above provided that you also do one of the following:
137
-
138
- a) Accompany it with the complete corresponding machine-readable
139
- source code, which must be distributed under the terms of Sections
140
- 1 and 2 above on a medium customarily used for software interchange; or,
141
-
142
- b) Accompany it with a written offer, valid for at least three
143
- years, to give any third party, for a charge no more than your
144
- cost of physically performing source distribution, a complete
145
- machine-readable copy of the corresponding source code, to be
146
- distributed under the terms of Sections 1 and 2 above on a medium
147
- customarily used for software interchange; or,
148
-
149
- c) Accompany it with the information you received as to the offer
150
- to distribute corresponding source code. (This alternative is
151
- allowed only for noncommercial distribution and only if you
152
- received the program in object code or executable form with such
153
- an offer, in accord with Subsection b above.)
154
-
155
- The source code for a work means the preferred form of the work for
156
- making modifications to it. For an executable work, complete source
157
- code means all the source code for all modules it contains, plus any
158
- associated interface definition files, plus the scripts used to
159
- control compilation and installation of the executable. However, as a
160
- special exception, the source code distributed need not include
161
- anything that is normally distributed (in either source or binary
162
- form) with the major components (compiler, kernel, and so on) of the
163
- operating system on which the executable runs, unless that component
164
- itself accompanies the executable.
165
-
166
- If distribution of executable or object code is made by offering
167
- access to copy from a designated place, then offering equivalent
168
- access to copy the source code from the same place counts as
169
- distribution of the source code, even though third parties are not
170
- compelled to copy the source along with the object code.
171
-
172
- 4. You may not copy, modify, sublicense, or distribute the Program
173
- except as expressly provided under this License. Any attempt
174
- otherwise to copy, modify, sublicense or distribute the Program is
175
- void, and will automatically terminate your rights under this License.
176
- However, parties who have received copies, or rights, from you under
177
- this License will not have their licenses terminated so long as such
178
- parties remain in full compliance.
179
-
180
- 5. You are not required to accept this License, since you have not
181
- signed it. However, nothing else grants you permission to modify or
182
- distribute the Program or its derivative works. These actions are
183
- prohibited by law if you do not accept this License. Therefore, by
184
- modifying or distributing the Program (or any work based on the
185
- Program), you indicate your acceptance of this License to do so, and
186
- all its terms and conditions for copying, distributing or modifying
187
- the Program or works based on it.
188
-
189
- 6. Each time you redistribute the Program (or any work based on the
190
- Program), the recipient automatically receives a license from the
191
- original licensor to copy, distribute or modify the Program subject to
192
- these terms and conditions. You may not impose any further
193
- restrictions on the recipients' exercise of the rights granted herein.
194
- You are not responsible for enforcing compliance by third parties to
195
- this License.
196
-
197
- 7. If, as a consequence of a court judgment or allegation of patent
198
- infringement or for any other reason (not limited to patent issues),
199
- conditions are imposed on you (whether by court order, agreement or
200
- otherwise) that contradict the conditions of this License, they do not
201
- excuse you from the conditions of this License. If you cannot
202
- distribute so as to satisfy simultaneously your obligations under this
203
- License and any other pertinent obligations, then as a consequence you
204
- may not distribute the Program at all. For example, if a patent
205
- license would not permit royalty-free redistribution of the Program by
206
- all those who receive copies directly or indirectly through you, then
207
- the only way you could satisfy both it and this License would be to
208
- refrain entirely from distribution of the Program.
209
-
210
- If any portion of this section is held invalid or unenforceable under
211
- any particular circumstance, the balance of the section is intended to
212
- apply and the section as a whole is intended to apply in other
213
- circumstances.
214
-
215
- It is not the purpose of this section to induce you to infringe any
216
- patents or other property right claims or to contest validity of any
217
- such claims; this section has the sole purpose of protecting the
218
- integrity of the free software distribution system, which is
219
- implemented by public license practices. Many people have made
220
- generous contributions to the wide range of software distributed
221
- through that system in reliance on consistent application of that
222
- system; it is up to the author/donor to decide if he or she is willing
223
- to distribute software through any other system and a licensee cannot
224
- impose that choice.
225
-
226
- This section is intended to make thoroughly clear what is believed to
227
- be a consequence of the rest of this License.
228
-
229
- 8. If the distribution and/or use of the Program is restricted in
230
- certain countries either by patents or by copyrighted interfaces, the
231
- original copyright holder who places the Program under this License
232
- may add an explicit geographical distribution limitation excluding
233
- those countries, so that distribution is permitted only in or among
234
- countries not thus excluded. In such case, this License incorporates
235
- the limitation as if written in the body of this License.
236
-
237
- 9. The Free Software Foundation may publish revised and/or new versions
238
- of the General Public License from time to time. Such new versions will
239
- be similar in spirit to the present version, but may differ in detail to
240
- address new problems or concerns.
241
-
242
- Each version is given a distinguishing version number. If the Program
243
- specifies a version number of this License which applies to it and "any
244
- later version", you have the option of following the terms and conditions
245
- either of that version or of any later version published by the Free
246
- Software Foundation. If the Program does not specify a version number of
247
- this License, you may choose any version ever published by the Free Software
248
- Foundation.
249
-
250
- 10. If you wish to incorporate parts of the Program into other free
251
- programs whose distribution conditions are different, write to the author
252
- to ask for permission. For software which is copyrighted by the Free
253
- Software Foundation, write to the Free Software Foundation; we sometimes
254
- make exceptions for this. Our decision will be guided by the two goals
255
- of preserving the free status of all derivatives of our free software and
256
- of promoting the sharing and reuse of software generally.
257
-
258
- NO WARRANTY
259
-
260
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
- FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
- OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
- PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
- OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266
- TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
- PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
- REPAIR OR CORRECTION.
269
-
270
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
- REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
- INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
- OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
- TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
- YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
- PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
- POSSIBILITY OF SUCH DAMAGES.
279
-
280
- END OF TERMS AND CONDITIONS
281
-
282
- How to Apply These Terms to Your New Programs
283
-
284
- If you develop a new program, and you want it to be of the greatest
285
- possible use to the public, the best way to achieve this is to make it
286
- free software which everyone can redistribute and change under these terms.
287
-
288
- To do so, attach the following notices to the program. It is safest
289
- to attach them to the start of each source file to most effectively
290
- convey the exclusion of warranty; and each file should have at least
291
- the "copyright" line and a pointer to where the full notice is found.
292
-
293
- {description}
294
- Copyright (C) {year} {fullname}
295
-
296
- This program is free software; you can redistribute it and/or modify
297
- it under the terms of the GNU General Public License as published by
298
- the Free Software Foundation; either version 2 of the License, or
299
- (at your option) any later version.
300
-
301
- This program is distributed in the hope that it will be useful,
302
- but WITHOUT ANY WARRANTY; without even the implied warranty of
303
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304
- GNU General Public License for more details.
305
-
306
- You should have received a copy of the GNU General Public License along
307
- with this program; if not, write to the Free Software Foundation, Inc.,
308
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309
-
310
- Also add information on how to contact you by electronic and paper mail.
311
-
312
- If the program is interactive, make it output a short notice like this
313
- when it starts in an interactive mode:
314
-
315
- Gnomovision version 69, Copyright (C) year name of author
316
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317
- This is free software, and you are welcome to redistribute it
318
- under certain conditions; type `show c' for details.
319
-
320
- The hypothetical commands `show w' and `show c' should show the appropriate
321
- parts of the General Public License. Of course, the commands you use may
322
- be called something other than `show w' and `show c'; they could even be
323
- mouse-clicks or menu items--whatever suits your program.
324
-
325
- You should also get your employer (if you work as a programmer) or your
326
- school, if any, to sign a "copyright disclaimer" for the program, if
327
- necessary. Here is a sample; alter the names:
328
-
329
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
-
332
- {signature of Ty Coon}, 1 April 1989
333
- Ty Coon, President of Vice
334
-
335
- This General Public License does not permit incorporating your program into
336
- proprietary programs. If your program is a subroutine library, you may
337
- consider it more useful to permit linking proprietary applications with the
338
- library. If this is what you want to do, use the GNU Lesser General
339
- Public License instead of this License.
340
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
third-party/vendor/autoload.php CHANGED
@@ -2,6 +2,11 @@
2
 
3
  // autoload.php @generated by Composer
4
 
 
 
 
 
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit7dd81a014fbd8aaf38bd35ce762353b5::getLoader();
2
 
3
  // autoload.php @generated by Composer
4
 
5
+ if (PHP_VERSION_ID < 50600) {
6
+ echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
7
+ exit(1);
8
+ }
9
+
10
  require_once __DIR__ . '/composer/autoload_real.php';
11
 
12
+ return ComposerAutoloaderInite5f4894bb78bdf8c648ddff8cd8066f6::getLoader();
third-party/vendor/composer/ClassLoader.php CHANGED
@@ -37,26 +37,80 @@ namespace Composer\Autoload;
37
  *
38
  * @author Fabien Potencier <fabien@symfony.com>
39
  * @author Jordi Boggiano <j.boggiano@seld.be>
40
- * @see http://www.php-fig.org/psr/psr-0/
41
- * @see http://www.php-fig.org/psr/psr-4/
42
  */
43
  class ClassLoader
44
  {
 
 
 
45
  // PSR-4
 
 
 
 
46
  private $prefixLengthsPsr4 = array();
 
 
 
 
47
  private $prefixDirsPsr4 = array();
 
 
 
 
48
  private $fallbackDirsPsr4 = array();
49
 
50
  // PSR-0
 
 
 
 
51
  private $prefixesPsr0 = array();
 
 
 
 
52
  private $fallbackDirsPsr0 = array();
53
 
 
54
  private $useIncludePath = false;
 
 
 
 
 
55
  private $classMap = array();
 
 
56
  private $classMapAuthoritative = false;
 
 
 
 
 
57
  private $missingClasses = array();
 
 
58
  private $apcuPrefix;
59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  public function getPrefixes()
61
  {
62
  if (!empty($this->prefixesPsr0)) {
@@ -66,28 +120,47 @@ class ClassLoader
66
  return array();
67
  }
68
 
 
 
 
 
69
  public function getPrefixesPsr4()
70
  {
71
  return $this->prefixDirsPsr4;
72
  }
73
 
 
 
 
 
74
  public function getFallbackDirs()
75
  {
76
  return $this->fallbackDirsPsr0;
77
  }
78
 
 
 
 
 
79
  public function getFallbackDirsPsr4()
80
  {
81
  return $this->fallbackDirsPsr4;
82
  }
83
 
 
 
 
 
84
  public function getClassMap()
85
  {
86
  return $this->classMap;
87
  }
88
 
89
  /**
90
- * @param array $classMap Class to filename map
 
 
 
91
  */
92
  public function addClassMap(array $classMap)
93
  {
@@ -102,9 +175,11 @@ class ClassLoader
102
  * Registers a set of PSR-0 directories for a given prefix, either
103
  * appending or prepending to the ones previously set for this prefix.
104
  *
105
- * @param string $prefix The prefix
106
- * @param array|string $paths The PSR-0 root directories
107
- * @param bool $prepend Whether to prepend the directories
 
 
108
  */
109
  public function add($prefix, $paths, $prepend = false)
110
  {
@@ -147,11 +222,13 @@ class ClassLoader
147
  * Registers a set of PSR-4 directories for a given namespace, either
148
  * appending or prepending to the ones previously set for this namespace.
149
  *
150
- * @param string $prefix The prefix/namespace, with trailing '\\'
151
- * @param array|string $paths The PSR-4 base directories
152
- * @param bool $prepend Whether to prepend the directories
153
  *
154
  * @throws \InvalidArgumentException
 
 
155
  */
156
  public function addPsr4($prefix, $paths, $prepend = false)
157
  {
@@ -195,8 +272,10 @@ class ClassLoader
195
  * Registers a set of PSR-0 directories for a given prefix,
196
  * replacing any others previously set for this prefix.
197
  *
198
- * @param string $prefix The prefix
199
- * @param array|string $paths The PSR-0 base directories
 
 
200
  */
201
  public function set($prefix, $paths)
202
  {
@@ -211,10 +290,12 @@ class ClassLoader
211
  * Registers a set of PSR-4 directories for a given namespace,
212
  * replacing any others previously set for this namespace.
213
  *
214
- * @param string $prefix The prefix/namespace, with trailing '\\'
215
- * @param array|string $paths The PSR-4 base directories
216
  *
217
  * @throws \InvalidArgumentException
 
 
218
  */
219
  public function setPsr4($prefix, $paths)
220
  {
@@ -234,6 +315,8 @@ class ClassLoader
234
  * Turns on searching the include path for class files.
235
  *
236
  * @param bool $useIncludePath
 
 
237
  */
238
  public function setUseIncludePath($useIncludePath)
239
  {
@@ -256,6 +339,8 @@ class ClassLoader
256
  * that have not been registered with the class map.
257
  *
258
  * @param bool $classMapAuthoritative
 
 
259
  */
260
  public function setClassMapAuthoritative($classMapAuthoritative)
261
  {
@@ -276,6 +361,8 @@ class ClassLoader
276
  * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
277
  *
278
  * @param string|null $apcuPrefix
 
 
279
  */
280
  public function setApcuPrefix($apcuPrefix)
281
  {
@@ -296,25 +383,44 @@ class ClassLoader
296
  * Registers this instance as an autoloader.
297
  *
298
  * @param bool $prepend Whether to prepend the autoloader or not
 
 
299
  */
300
  public function register($prepend = false)
301
  {
302
  spl_autoload_register(array($this, 'loadClass'), true, $prepend);
 
 
 
 
 
 
 
 
 
 
 
303
  }
304
 
305
  /**
306
  * Unregisters this instance as an autoloader.
 
 
307
  */
308
  public function unregister()
309
  {
310
  spl_autoload_unregister(array($this, 'loadClass'));
 
 
 
 
311
  }
312
 
313
  /**
314
  * Loads the given class or interface.
315
  *
316
  * @param string $class The name of the class
317
- * @return bool|null True if loaded, null otherwise
318
  */
319
  public function loadClass($class)
320
  {
@@ -323,6 +429,8 @@ class ClassLoader
323
 
324
  return true;
325
  }
 
 
326
  }
327
 
328
  /**
@@ -367,6 +475,21 @@ class ClassLoader
367
  return $file;
368
  }
369
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
370
  private function findFileWithExtension($class, $ext)
371
  {
372
  // PSR-4 lookup
@@ -438,6 +561,10 @@ class ClassLoader
438
  * Scope isolated include.
439
  *
440
  * Prevents access to $this/self from included files.
 
 
 
 
441
  */
442
  function includeFile($file)
443
  {
37
  *
38
  * @author Fabien Potencier <fabien@symfony.com>
39
  * @author Jordi Boggiano <j.boggiano@seld.be>
40
+ * @see https://www.php-fig.org/psr/psr-0/
41
+ * @see https://www.php-fig.org/psr/psr-4/
42
  */
43
  class ClassLoader
44
  {
45
+ /** @var ?string */
46
+ private $vendorDir;
47
+
48
  // PSR-4
49
+ /**
50
+ * @var array[]
51
+ * @psalm-var array<string, array<string, int>>
52
+ */
53
  private $prefixLengthsPsr4 = array();
54
+ /**
55
+ * @var array[]
56
+ * @psalm-var array<string, array<int, string>>
57
+ */
58
  private $prefixDirsPsr4 = array();
59
+ /**
60
+ * @var array[]
61
+ * @psalm-var array<string, string>
62
+ */
63
  private $fallbackDirsPsr4 = array();
64
 
65
  // PSR-0
66
+ /**
67
+ * @var array[]
68
+ * @psalm-var array<string, array<string, string[]>>
69
+ */
70
  private $prefixesPsr0 = array();
71
+ /**
72
+ * @var array[]
73
+ * @psalm-var array<string, string>
74
+ */
75
  private $fallbackDirsPsr0 = array();
76
 
77
+ /** @var bool */
78
  private $useIncludePath = false;
79
+
80
+ /**
81
+ * @var string[]
82
+ * @psalm-var array<string, string>
83
+ */
84
  private $classMap = array();
85
+
86
+ /** @var bool */
87
  private $classMapAuthoritative = false;
88
+
89
+ /**
90
+ * @var bool[]
91
+ * @psalm-var array<string, bool>
92
+ */
93
  private $missingClasses = array();
94
+
95
+ /** @var ?string */
96
  private $apcuPrefix;
97
 
98
+ /**
99
+ * @var self[]
100
+ */
101
+ private static $registeredLoaders = array();
102
+
103
+ /**
104
+ * @param ?string $vendorDir
105
+ */
106
+ public function __construct($vendorDir = null)
107
+ {
108
+ $this->vendorDir = $vendorDir;
109
+ }
110
+
111
+ /**
112
+ * @return string[]
113
+ */
114
  public function getPrefixes()
115
  {
116
  if (!empty($this->prefixesPsr0)) {
120
  return array();
121
  }
122
 
123
+ /**
124
+ * @return array[]
125
+ * @psalm-return array<string, array<int, string>>
126
+ */
127
  public function getPrefixesPsr4()
128
  {
129
  return $this->prefixDirsPsr4;
130
  }
131
 
132
+ /**
133
+ * @return array[]
134
+ * @psalm-return array<string, string>
135
+ */
136
  public function getFallbackDirs()
137
  {
138
  return $this->fallbackDirsPsr0;
139
  }
140
 
141
+ /**
142
+ * @return array[]
143
+ * @psalm-return array<string, string>
144
+ */
145
  public function getFallbackDirsPsr4()
146
  {
147
  return $this->fallbackDirsPsr4;
148
  }
149
 
150
+ /**
151
+ * @return string[] Array of classname => path
152
+ * @psalm-return array<string, string>
153
+ */
154
  public function getClassMap()
155
  {
156
  return $this->classMap;
157
  }
158
 
159
  /**
160
+ * @param string[] $classMap Class to filename map
161
+ * @psalm-param array<string, string> $classMap
162
+ *
163
+ * @return void
164
  */
165
  public function addClassMap(array $classMap)
166
  {
175
  * Registers a set of PSR-0 directories for a given prefix, either
176
  * appending or prepending to the ones previously set for this prefix.
177
  *
178
+ * @param string $prefix The prefix
179
+ * @param string[]|string $paths The PSR-0 root directories
180
+ * @param bool $prepend Whether to prepend the directories
181
+ *
182
+ * @return void
183
  */
184
  public function add($prefix, $paths, $prepend = false)
185
  {
222
  * Registers a set of PSR-4 directories for a given namespace, either
223
  * appending or prepending to the ones previously set for this namespace.
224
  *
225
+ * @param string $prefix The prefix/namespace, with trailing '\\'
226
+ * @param string[]|string $paths The PSR-4 base directories
227
+ * @param bool $prepend Whether to prepend the directories
228
  *
229
  * @throws \InvalidArgumentException
230
+ *
231
+ * @return void
232
  */
233
  public function addPsr4($prefix, $paths, $prepend = false)
234
  {
272
  * Registers a set of PSR-0 directories for a given prefix,
273
  * replacing any others previously set for this prefix.
274
  *
275
+ * @param string $prefix The prefix
276
+ * @param string[]|string $paths The PSR-0 base directories
277
+ *
278
+ * @return void
279
  */
280
  public function set($prefix, $paths)
281
  {
290
  * Registers a set of PSR-4 directories for a given namespace,
291
  * replacing any others previously set for this namespace.
292
  *
293
+ * @param string $prefix The prefix/namespace, with trailing '\\'
294
+ * @param string[]|string $paths The PSR-4 base directories
295
  *
296
  * @throws \InvalidArgumentException
297
+ *
298
+ * @return void
299
  */
300
  public function setPsr4($prefix, $paths)
301
  {
315
  * Turns on searching the include path for class files.
316
  *
317
  * @param bool $useIncludePath
318
+ *
319
+ * @return void
320
  */
321
  public function setUseIncludePath($useIncludePath)
322
  {
339
  * that have not been registered with the class map.
340
  *
341
  * @param bool $classMapAuthoritative
342
+ *
343
+ * @return void
344
  */
345
  public function setClassMapAuthoritative($classMapAuthoritative)
346
  {
361
  * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
362
  *
363
  * @param string|null $apcuPrefix
364
+ *
365
+ * @return void
366
  */
367
  public function setApcuPrefix($apcuPrefix)
368
  {
383
  * Registers this instance as an autoloader.
384
  *
385
  * @param bool $prepend Whether to prepend the autoloader or not
386
+ *
387
+ * @return void
388
  */
389
  public function register($prepend = false)
390
  {
391
  spl_autoload_register(array($this, 'loadClass'), true, $prepend);
392
+
393
+ if (null === $this->vendorDir) {
394
+ return;
395
+ }
396
+
397
+ if ($prepend) {
398
+ self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
399
+ } else {
400
+ unset(self::$registeredLoaders[$this->vendorDir]);
401
+ self::$registeredLoaders[$this->vendorDir] = $this;
402
+ }
403
  }
404
 
405
  /**
406
  * Unregisters this instance as an autoloader.
407
+ *
408
+ * @return void
409
  */
410
  public function unregister()
411
  {
412
  spl_autoload_unregister(array($this, 'loadClass'));
413
+
414
+ if (null !== $this->vendorDir) {
415
+ unset(self::$registeredLoaders[$this->vendorDir]);
416
+ }
417
  }
418
 
419
  /**
420
  * Loads the given class or interface.
421
  *
422
  * @param string $class The name of the class
423
+ * @return true|null True if loaded, null otherwise
424
  */
425
  public function loadClass($class)
426
  {
429
 
430
  return true;
431
  }
432
+
433
+ return null;
434
  }
435
 
436
  /**
475
  return $file;
476
  }
477
 
478
+ /**
479
+ * Returns the currently registered loaders indexed by their corresponding vendor directories.
480
+ *
481
+ * @return self[]
482
+ */
483
+ public static function getRegisteredLoaders()
484
+ {
485
+ return self::$registeredLoaders;
486
+ }
487
+
488
+ /**
489
+ * @param string $class
490
+ * @param string $ext
491
+ * @return string|false
492
+ */
493
  private function findFileWithExtension($class, $ext)
494
  {
495
  // PSR-4 lookup
561
  * Scope isolated include.
562
  *
563
  * Prevents access to $this/self from included files.
564
+ *
565
+ * @param string $file
566
+ * @return void
567
+ * @private
568
  */
569
  function includeFile($file)
570
  {
third-party/vendor/composer/InstalledVersions.php ADDED
@@ -0,0 +1,352 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Composer.
5
+ *
6
+ * (c) Nils Adermann <naderman@naderman.de>
7
+ * Jordi Boggiano <j.boggiano@seld.be>
8
+ *
9
+ * For the full copyright and license information, please view the LICENSE
10
+ * file that was distributed with this source code.
11
+ */
12
+
13
+ namespace Composer;
14
+
15
+ use Composer\Autoload\ClassLoader;
16
+ use Composer\Semver\VersionParser;
17
+
18
+ /**
19
+ * This class is copied in every Composer installed project and available to all
20
+ *
21
+ * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
22
+ *
23
+ * To require its presence, you can require `composer-runtime-api ^2.0`
24
+ *
25
+ * @final
26
+ */
27
+ 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
+
35
+ /**
36
+ * @var bool|null
37
+ */
38
+ private static $canGetVendors;
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
+
46
+ /**
47
+ * Returns a list of all package names which are present, either by being installed, replaced or provided
48
+ *
49
+ * @return string[]
50
+ * @psalm-return list<string>
51
+ */
52
+ public static function getInstalledPackages()
53
+ {
54
+ $packages = array();
55
+ foreach (self::getInstalled() as $installed) {
56
+ $packages[] = array_keys($installed['versions']);
57
+ }
58
+
59
+ if (1 === \count($packages)) {
60
+ return $packages[0];
61
+ }
62
+
63
+ return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
64
+ }
65
+
66
+ /**
67
+ * Returns a list of all package names with a specific type e.g. 'library'
68
+ *
69
+ * @param string $type
70
+ * @return string[]
71
+ * @psalm-return list<string>
72
+ */
73
+ public static function getInstalledPackagesByType($type)
74
+ {
75
+ $packagesByType = array();
76
+
77
+ foreach (self::getInstalled() as $installed) {
78
+ foreach ($installed['versions'] as $name => $package) {
79
+ if (isset($package['type']) && $package['type'] === $type) {
80
+ $packagesByType[] = $name;
81
+ }
82
+ }
83
+ }
84
+
85
+ return $packagesByType;
86
+ }
87
+
88
+ /**
89
+ * Checks whether the given package is installed
90
+ *
91
+ * This also returns true if the package name is provided or replaced by another package
92
+ *
93
+ * @param string $packageName
94
+ * @param bool $includeDevRequirements
95
+ * @return bool
96
+ */
97
+ public static function isInstalled($packageName, $includeDevRequirements = true)
98
+ {
99
+ foreach (self::getInstalled() as $installed) {
100
+ if (isset($installed['versions'][$packageName])) {
101
+ return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
102
+ }
103
+ }
104
+
105
+ return false;
106
+ }
107
+
108
+ /**
109
+ * Checks whether the given package satisfies a version constraint
110
+ *
111
+ * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
112
+ *
113
+ * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
114
+ *
115
+ * @param VersionParser $parser Install composer/semver to have access to this class and functionality
116
+ * @param string $packageName
117
+ * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
118
+ * @return bool
119
+ */
120
+ public static function satisfies(VersionParser $parser, $packageName, $constraint)
121
+ {
122
+ $constraint = $parser->parseConstraints($constraint);
123
+ $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
124
+
125
+ return $provided->matches($constraint);
126
+ }
127
+
128
+ /**
129
+ * Returns a version constraint representing all the range(s) which are installed for a given package
130
+ *
131
+ * It is easier to use this via isInstalled() with the $constraint argument if you need to check
132
+ * whether a given version of a package is installed, and not just whether it exists
133
+ *
134
+ * @param string $packageName
135
+ * @return string Version constraint usable with composer/semver
136
+ */
137
+ public static function getVersionRanges($packageName)
138
+ {
139
+ foreach (self::getInstalled() as $installed) {
140
+ if (!isset($installed['versions'][$packageName])) {
141
+ continue;
142
+ }
143
+
144
+ $ranges = array();
145
+ if (isset($installed['versions'][$packageName]['pretty_version'])) {
146
+ $ranges[] = $installed['versions'][$packageName]['pretty_version'];
147
+ }
148
+ if (array_key_exists('aliases', $installed['versions'][$packageName])) {
149
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
150
+ }
151
+ if (array_key_exists('replaced', $installed['versions'][$packageName])) {
152
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
153
+ }
154
+ if (array_key_exists('provided', $installed['versions'][$packageName])) {
155
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
156
+ }
157
+
158
+ return implode(' || ', $ranges);
159
+ }
160
+
161
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
162
+ }
163
+
164
+ /**
165
+ * @param string $packageName
166
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
167
+ */
168
+ public static function getVersion($packageName)
169
+ {
170
+ foreach (self::getInstalled() as $installed) {
171
+ if (!isset($installed['versions'][$packageName])) {
172
+ continue;
173
+ }
174
+
175
+ if (!isset($installed['versions'][$packageName]['version'])) {
176
+ return null;
177
+ }
178
+
179
+ return $installed['versions'][$packageName]['version'];
180
+ }
181
+
182
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
183
+ }
184
+
185
+ /**
186
+ * @param string $packageName
187
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
188
+ */
189
+ public static function getPrettyVersion($packageName)
190
+ {
191
+ foreach (self::getInstalled() as $installed) {
192
+ if (!isset($installed['versions'][$packageName])) {
193
+ continue;
194
+ }
195
+
196
+ if (!isset($installed['versions'][$packageName]['pretty_version'])) {
197
+ return null;
198
+ }
199
+
200
+ return $installed['versions'][$packageName]['pretty_version'];
201
+ }
202
+
203
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
204
+ }
205
+
206
+ /**
207
+ * @param string $packageName
208
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
209
+ */
210
+ public static function getReference($packageName)
211
+ {
212
+ foreach (self::getInstalled() as $installed) {
213
+ if (!isset($installed['versions'][$packageName])) {
214
+ continue;
215
+ }
216
+
217
+ if (!isset($installed['versions'][$packageName]['reference'])) {
218
+ return null;
219
+ }
220
+
221
+ return $installed['versions'][$packageName]['reference'];
222
+ }
223
+
224
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
225
+ }
226
+
227
+ /**
228
+ * @param string $packageName
229
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
230
+ */
231
+ public static function getInstallPath($packageName)
232
+ {
233
+ foreach (self::getInstalled() as $installed) {
234
+ if (!isset($installed['versions'][$packageName])) {
235
+ continue;
236
+ }
237
+
238
+ return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
239
+ }
240
+
241
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
242
+ }
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
+ {
250
+ $installed = self::getInstalled();
251
+
252
+ return $installed[0]['root'];
253
+ }
254
+
255
+ /**
256
+ * Returns the raw installed.php data for custom implementations
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
+ {
264
+ @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
265
+
266
+ if (null === self::$installed) {
267
+ // only require the installed.php file if this file is loaded from its dumped location,
268
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
269
+ if (substr(__DIR__, -8, 1) !== 'C') {
270
+ self::$installed = include __DIR__ . '/installed.php';
271
+ } else {
272
+ self::$installed = array();
273
+ }
274
+ }
275
+
276
+ return self::$installed;
277
+ }
278
+
279
+ /**
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
+ {
287
+ return self::getInstalled();
288
+ }
289
+
290
+ /**
291
+ * Lets you reload the static array from another file
292
+ *
293
+ * This is only useful for complex integrations in which a project needs to use
294
+ * this class but then also needs to execute another project's autoloader in process,
295
+ * and wants to ensure both projects have access to their version of installed.php.
296
+ *
297
+ * A typical case would be PHPUnit, where it would need to make sure it reads all
298
+ * the data it needs from this class, then call reload() with
299
+ * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
300
+ * the project in which it runs can then also use this class safely, without
301
+ * interference between PHPUnit's dependencies and the project's dependencies.
302
+ *
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
+ {
310
+ self::$installed = $data;
311
+ self::$installedByVendor = array();
312
+ }
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
+ {
320
+ if (null === self::$canGetVendors) {
321
+ self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
322
+ }
323
+
324
+ $installed = array();
325
+
326
+ if (self::$canGetVendors) {
327
+ foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
328
+ if (isset(self::$installedByVendor[$vendorDir])) {
329
+ $installed[] = self::$installedByVendor[$vendorDir];
330
+ } elseif (is_file($vendorDir.'/composer/installed.php')) {
331
+ $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
332
+ if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
333
+ self::$installed = $installed[count($installed) - 1];
334
+ }
335
+ }
336
+ }
337
+ }
338
+
339
+ if (null === self::$installed) {
340
+ // only require the installed.php file if this file is loaded from its dumped location,
341
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
342
+ if (substr(__DIR__, -8, 1) !== 'C') {
343
+ self::$installed = require __DIR__ . '/installed.php';
344
+ } else {
345
+ self::$installed = array();
346
+ }
347
+ }
348
+ $installed[] = self::$installed;
349
+
350
+ return $installed;
351
+ }
352
+ }
third-party/vendor/composer/autoload_classmap.php CHANGED
@@ -2,10 +2,11 @@
2
 
3
  // autoload_classmap.php @generated by Composer
4
 
5
- $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
 
9
  'WSAL_Vendor\\WP_Async_Request' => $vendorDir . '/classes/wp-async-request.php',
10
  'WSAL_Vendor\\WP_Background_Process' => $vendorDir . '/classes/wp-background-process.php',
11
  );
2
 
3
  // autoload_classmap.php @generated by Composer
4
 
5
+ $vendorDir = dirname(__DIR__);
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
9
+ 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
10
  'WSAL_Vendor\\WP_Async_Request' => $vendorDir . '/classes/wp-async-request.php',
11
  'WSAL_Vendor\\WP_Background_Process' => $vendorDir . '/classes/wp-background-process.php',
12
  );
third-party/vendor/composer/autoload_namespaces.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_namespaces.php @generated by Composer
4
 
5
- $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
2
 
3
  // autoload_namespaces.php @generated by Composer
4
 
5
+ $vendorDir = dirname(__DIR__);
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
third-party/vendor/composer/autoload_psr4.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_psr4.php @generated by Composer
4
 
5
- $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
2
 
3
  // autoload_psr4.php @generated by Composer
4
 
5
+ $vendorDir = dirname(__DIR__);
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
third-party/vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit7dd81a014fbd8aaf38bd35ce762353b5
6
  {
7
  private static $loader;
8
 
@@ -22,21 +22,12 @@ class ComposerAutoloaderInit7dd81a014fbd8aaf38bd35ce762353b5
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInit7dd81a014fbd8aaf38bd35ce762353b5', 'loadClassLoader'), true, true);
26
- self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInit7dd81a014fbd8aaf38bd35ce762353b5', 'loadClassLoader'));
28
 
29
- $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
- if ($useStaticLoader) {
31
- require_once __DIR__ . '/autoload_static.php';
32
-
33
- call_user_func(\Composer\Autoload\ComposerStaticInit7dd81a014fbd8aaf38bd35ce762353b5::getInitializer($loader));
34
- } else {
35
- $classMap = require __DIR__ . '/autoload_classmap.php';
36
- if ($classMap) {
37
- $loader->addClassMap($classMap);
38
- }
39
- }
40
 
41
  $loader->setClassMapAuthoritative(true);
42
  $loader->register(true);
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInite5f4894bb78bdf8c648ddff8cd8066f6
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInite5f4894bb78bdf8c648ddff8cd8066f6', 'loadClassLoader'), true, true);
26
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
27
+ spl_autoload_unregister(array('ComposerAutoloaderInite5f4894bb78bdf8c648ddff8cd8066f6', 'loadClassLoader'));
28
 
29
+ require __DIR__ . '/autoload_static.php';
30
+ call_user_func(\Composer\Autoload\ComposerStaticInite5f4894bb78bdf8c648ddff8cd8066f6::getInitializer($loader));
 
 
 
 
 
 
 
 
 
31
 
32
  $loader->setClassMapAuthoritative(true);
33
  $loader->register(true);
third-party/vendor/composer/autoload_static.php CHANGED
@@ -4,9 +4,10 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit7dd81a014fbd8aaf38bd35ce762353b5
8
  {
9
  public static $classMap = array (
 
10
  'WSAL_Vendor\\WP_Async_Request' => __DIR__ . '/..' . '/classes/wp-async-request.php',
11
  'WSAL_Vendor\\WP_Background_Process' => __DIR__ . '/..' . '/classes/wp-background-process.php',
12
  );
@@ -14,7 +15,7 @@ class ComposerStaticInit7dd81a014fbd8aaf38bd35ce762353b5
14
  public static function getInitializer(ClassLoader $loader)
15
  {
16
  return \Closure::bind(function () use ($loader) {
17
- $loader->classMap = ComposerStaticInit7dd81a014fbd8aaf38bd35ce762353b5::$classMap;
18
 
19
  }, null, ClassLoader::class);
20
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInite5f4894bb78bdf8c648ddff8cd8066f6
8
  {
9
  public static $classMap = array (
10
+ 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
11
  'WSAL_Vendor\\WP_Async_Request' => __DIR__ . '/..' . '/classes/wp-async-request.php',
12
  'WSAL_Vendor\\WP_Background_Process' => __DIR__ . '/..' . '/classes/wp-background-process.php',
13
  );
15
  public static function getInitializer(ClassLoader $loader)
16
  {
17
  return \Closure::bind(function () use ($loader) {
18
+ $loader->classMap = ComposerStaticInite5f4894bb78bdf8c648ddff8cd8066f6::$classMap;
19
 
20
  }, null, ClassLoader::class);
21
  }
vendor/autoload.php CHANGED
@@ -2,6 +2,11 @@
2
 
3
  // autoload.php @generated by Composer
4
 
 
 
 
 
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit3f55157f4a5fe9869d231c288e83d8cc::getLoader();
2
 
3
  // autoload.php @generated by Composer
4
 
5
+ if (PHP_VERSION_ID < 50600) {
6
+ echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
7
+ exit(1);
8
+ }
9
+
10
  require_once __DIR__ . '/composer/autoload_real.php';
11
 
12
+ return ComposerAutoloaderInit6d630355672f72ee3630270ffc4f7a88::getLoader();
vendor/composer/ClassLoader.php CHANGED
@@ -37,26 +37,80 @@ namespace Composer\Autoload;
37
  *
38
  * @author Fabien Potencier <fabien@symfony.com>
39
  * @author Jordi Boggiano <j.boggiano@seld.be>
40
- * @see http://www.php-fig.org/psr/psr-0/
41
- * @see http://www.php-fig.org/psr/psr-4/
42
  */
43
  class ClassLoader
44
  {
 
 
 
45
  // PSR-4
 
 
 
 
46
  private $prefixLengthsPsr4 = array();
 
 
 
 
47
  private $prefixDirsPsr4 = array();
 
 
 
 
48
  private $fallbackDirsPsr4 = array();
49
 
50
  // PSR-0
 
 
 
 
51
  private $prefixesPsr0 = array();
 
 
 
 
52
  private $fallbackDirsPsr0 = array();
53
 
 
54
  private $useIncludePath = false;
 
 
 
 
 
55
  private $classMap = array();
 
 
56
  private $classMapAuthoritative = false;
 
 
 
 
 
57
  private $missingClasses = array();
 
 
58
  private $apcuPrefix;
59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  public function getPrefixes()
61
  {
62
  if (!empty($this->prefixesPsr0)) {
@@ -66,28 +120,47 @@ class ClassLoader
66
  return array();
67
  }
68
 
 
 
 
 
69
  public function getPrefixesPsr4()
70
  {
71
  return $this->prefixDirsPsr4;
72
  }
73
 
 
 
 
 
74
  public function getFallbackDirs()
75
  {
76
  return $this->fallbackDirsPsr0;
77
  }
78
 
 
 
 
 
79
  public function getFallbackDirsPsr4()
80
  {
81
  return $this->fallbackDirsPsr4;
82
  }
83
 
 
 
 
 
84
  public function getClassMap()
85
  {
86
  return $this->classMap;
87
  }
88
 
89
  /**
90
- * @param array $classMap Class to filename map
 
 
 
91
  */
92
  public function addClassMap(array $classMap)
93
  {
@@ -102,9 +175,11 @@ class ClassLoader
102
  * Registers a set of PSR-0 directories for a given prefix, either
103
  * appending or prepending to the ones previously set for this prefix.
104
  *
105
- * @param string $prefix The prefix
106
- * @param array|string $paths The PSR-0 root directories
107
- * @param bool $prepend Whether to prepend the directories
 
 
108
  */
109
  public function add($prefix, $paths, $prepend = false)
110
  {
@@ -147,11 +222,13 @@ class ClassLoader
147
  * Registers a set of PSR-4 directories for a given namespace, either
148
  * appending or prepending to the ones previously set for this namespace.
149
  *
150
- * @param string $prefix The prefix/namespace, with trailing '\\'
151
- * @param array|string $paths The PSR-4 base directories
152
- * @param bool $prepend Whether to prepend the directories
153
  *
154
  * @throws \InvalidArgumentException
 
 
155
  */
156
  public function addPsr4($prefix, $paths, $prepend = false)
157
  {
@@ -195,8 +272,10 @@ class ClassLoader
195
  * Registers a set of PSR-0 directories for a given prefix,
196
  * replacing any others previously set for this prefix.
197
  *
198
- * @param string $prefix The prefix
199
- * @param array|string $paths The PSR-0 base directories
 
 
200
  */
201
  public function set($prefix, $paths)
202
  {
@@ -211,10 +290,12 @@ class ClassLoader
211
  * Registers a set of PSR-4 directories for a given namespace,
212
  * replacing any others previously set for this namespace.
213
  *
214
- * @param string $prefix The prefix/namespace, with trailing '\\'
215
- * @param array|string $paths The PSR-4 base directories
216
  *
217
  * @throws \InvalidArgumentException
 
 
218
  */
219
  public function setPsr4($prefix, $paths)
220
  {
@@ -234,6 +315,8 @@ class ClassLoader
234
  * Turns on searching the include path for class files.
235
  *
236
  * @param bool $useIncludePath
 
 
237
  */
238
  public function setUseIncludePath($useIncludePath)
239
  {
@@ -256,6 +339,8 @@ class ClassLoader
256
  * that have not been registered with the class map.
257
  *
258
  * @param bool $classMapAuthoritative
 
 
259
  */
260
  public function setClassMapAuthoritative($classMapAuthoritative)
261
  {
@@ -276,6 +361,8 @@ class ClassLoader
276
  * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
277
  *
278
  * @param string|null $apcuPrefix
 
 
279
  */
280
  public function setApcuPrefix($apcuPrefix)
281
  {
@@ -296,25 +383,44 @@ class ClassLoader
296
  * Registers this instance as an autoloader.
297
  *
298
  * @param bool $prepend Whether to prepend the autoloader or not
 
 
299
  */
300
  public function register($prepend = false)
301
  {
302
  spl_autoload_register(array($this, 'loadClass'), true, $prepend);
 
 
 
 
 
 
 
 
 
 
 
303
  }
304
 
305
  /**
306
  * Unregisters this instance as an autoloader.
 
 
307
  */
308
  public function unregister()
309
  {
310
  spl_autoload_unregister(array($this, 'loadClass'));
 
 
 
 
311
  }
312
 
313
  /**
314
  * Loads the given class or interface.
315
  *
316
  * @param string $class The name of the class
317
- * @return bool|null True if loaded, null otherwise
318
  */
319
  public function loadClass($class)
320
  {
@@ -323,6 +429,8 @@ class ClassLoader
323
 
324
  return true;
325
  }
 
 
326
  }
327
 
328
  /**
@@ -367,6 +475,21 @@ class ClassLoader
367
  return $file;
368
  }
369
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
370
  private function findFileWithExtension($class, $ext)
371
  {
372
  // PSR-4 lookup
@@ -438,6 +561,10 @@ class ClassLoader
438
  * Scope isolated include.
439
  *
440
  * Prevents access to $this/self from included files.
 
 
 
 
441
  */
442
  function includeFile($file)
443
  {
37
  *
38
  * @author Fabien Potencier <fabien@symfony.com>
39
  * @author Jordi Boggiano <j.boggiano@seld.be>
40
+ * @see https://www.php-fig.org/psr/psr-0/
41
+ * @see https://www.php-fig.org/psr/psr-4/
42
  */
43
  class ClassLoader
44
  {
45
+ /** @var ?string */
46
+ private $vendorDir;
47
+
48
  // PSR-4
49
+ /**
50
+ * @var array[]
51
+ * @psalm-var array<string, array<string, int>>
52
+ */
53
  private $prefixLengthsPsr4 = array();
54
+ /**
55
+ * @var array[]
56
+ * @psalm-var array<string, array<int, string>>
57
+ */
58
  private $prefixDirsPsr4 = array();
59
+ /**
60
+ * @var array[]
61
+ * @psalm-var array<string, string>
62
+ */
63
  private $fallbackDirsPsr4 = array();
64
 
65
  // PSR-0
66
+ /**
67
+ * @var array[]
68
+ * @psalm-var array<string, array<string, string[]>>
69
+ */
70
  private $prefixesPsr0 = array();
71
+ /**
72
+ * @var array[]
73
+ * @psalm-var array<string, string>
74
+ */
75
  private $fallbackDirsPsr0 = array();
76
 
77
+ /** @var bool */
78
  private $useIncludePath = false;
79
+
80
+ /**
81
+ * @var string[]
82
+ * @psalm-var array<string, string>
83
+ */
84
  private $classMap = array();
85
+
86
+ /** @var bool */
87
  private $classMapAuthoritative = false;
88
+
89
+ /**
90
+ * @var bool[]
91
+ * @psalm-var array<string, bool>
92
+ */
93
  private $missingClasses = array();
94
+
95
+ /** @var ?string */
96
  private $apcuPrefix;
97
 
98
+ /**
99
+ * @var self[]
100
+ */
101
+ private static $registeredLoaders = array();
102
+
103
+ /**
104
+ * @param ?string $vendorDir
105
+ */
106
+ public function __construct($vendorDir = null)
107
+ {
108
+ $this->vendorDir = $vendorDir;
109
+ }
110
+
111
+ /**
112
+ * @return string[]
113
+ */
114
  public function getPrefixes()
115
  {
116
  if (!empty($this->prefixesPsr0)) {
120
  return array();
121
  }
122
 
123
+ /**
124
+ * @return array[]
125
+ * @psalm-return array<string, array<int, string>>
126
+ */
127
  public function getPrefixesPsr4()
128
  {
129
  return $this->prefixDirsPsr4;
130
  }
131
 
132
+ /**
133
+ * @return array[]
134
+ * @psalm-return array<string, string>
135
+ */
136
  public function getFallbackDirs()
137
  {
138
  return $this->fallbackDirsPsr0;
139
  }
140
 
141
+ /**
142
+ * @return array[]
143
+ * @psalm-return array<string, string>
144
+ */
145
  public function getFallbackDirsPsr4()
146
  {
147
  return $this->fallbackDirsPsr4;
148
  }
149
 
150
+ /**
151
+ * @return string[] Array of classname => path
152
+ * @psalm-return array<string, string>
153
+ */
154
  public function getClassMap()
155
  {
156
  return $this->classMap;
157
  }
158
 
159
  /**
160
+ * @param string[] $classMap Class to filename map
161
+ * @psalm-param array<string, string> $classMap
162
+ *
163
+ * @return void
164
  */
165
  public function addClassMap(array $classMap)
166
  {
175
  * Registers a set of PSR-0 directories for a given prefix, either
176
  * appending or prepending to the ones previously set for this prefix.
177
  *
178
+ * @param string $prefix The prefix
179
+ * @param string[]|string $paths The PSR-0 root directories
180
+ * @param bool $prepend Whether to prepend the directories
181
+ *
182
+ * @return void
183
  */
184
  public function add($prefix, $paths, $prepend = false)
185
  {
222
  * Registers a set of PSR-4 directories for a given namespace, either
223
  * appending or prepending to the ones previously set for this namespace.
224
  *
225
+ * @param string $prefix The prefix/namespace, with trailing '\\'
226
+ * @param string[]|string $paths The PSR-4 base directories
227
+ * @param bool $prepend Whether to prepend the directories
228
  *
229
  * @throws \InvalidArgumentException
230
+ *
231
+ * @return void
232
  */
233
  public function addPsr4($prefix, $paths, $prepend = false)
234
  {
272
  * Registers a set of PSR-0 directories for a given prefix,
273
  * replacing any others previously set for this prefix.
274
  *
275
+ * @param string $prefix The prefix
276
+ * @param string[]|string $paths The PSR-0 base directories
277
+ *
278
+ * @return void
279
  */
280
  public function set($prefix, $paths)
281
  {
290
  * Registers a set of PSR-4 directories for a given namespace,
291
  * replacing any others previously set for this namespace.
292
  *
293
+ * @param string $prefix The prefix/namespace, with trailing '\\'
294
+ * @param string[]|string $paths The PSR-4 base directories
295
  *
296
  * @throws \InvalidArgumentException
297
+ *
298
+ * @return void
299
  */
300
  public function setPsr4($prefix, $paths)
301
  {
315
  * Turns on searching the include path for class files.
316
  *
317
  * @param bool $useIncludePath
318
+ *
319
+ * @return void
320
  */
321
  public function setUseIncludePath($useIncludePath)
322
  {
339
  * that have not been registered with the class map.
340
  *
341
  * @param bool $classMapAuthoritative
342
+ *
343
+ * @return void
344
  */
345
  public function setClassMapAuthoritative($classMapAuthoritative)
346
  {
361
  * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
362
  *
363
  * @param string|null $apcuPrefix
364
+ *
365
+ * @return void
366
  */
367
  public function setApcuPrefix($apcuPrefix)
368
  {
383
  * Registers this instance as an autoloader.
384
  *
385
  * @param bool $prepend Whether to prepend the autoloader or not
386
+ *
387
+ * @return void
388
  */
389
  public function register($prepend = false)
390
  {
391
  spl_autoload_register(array($this, 'loadClass'), true, $prepend);
392
+
393
+ if (null === $this->vendorDir) {
394
+ return;
395
+ }
396
+
397
+ if ($prepend) {
398
+ self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
399
+ } else {
400
+ unset(self::$registeredLoaders[$this->vendorDir]);
401
+ self::$registeredLoaders[$this->vendorDir] = $this;
402
+ }
403
  }
404
 
405
  /**
406
  * Unregisters this instance as an autoloader.
407
+ *
408
+ * @return void
409
  */
410
  public function unregister()
411
  {
412
  spl_autoload_unregister(array($this, 'loadClass'));
413
+
414
+ if (null !== $this->vendorDir) {
415
+ unset(self::$registeredLoaders[$this->vendorDir]);
416
+ }
417
  }
418
 
419
  /**
420
  * Loads the given class or interface.
421
  *
422
  * @param string $class The name of the class
423
+ * @return true|null True if loaded, null otherwise
424
  */
425
  public function loadClass($class)
426
  {
429
 
430
  return true;
431
  }
432
+
433
+ return null;
434
  }
435
 
436
  /**
475
  return $file;
476
  }
477
 
478
+ /**
479
+ * Returns the currently registered loaders indexed by their corresponding vendor directories.
480
+ *
481
+ * @return self[]
482
+ */
483
+ public static function getRegisteredLoaders()
484
+ {
485
+ return self::$registeredLoaders;
486
+ }
487
+
488
+ /**
489
+ * @param string $class
490
+ * @param string $ext
491
+ * @return string|false
492
+ */
493
  private function findFileWithExtension($class, $ext)
494
  {
495
  // PSR-4 lookup
561
  * Scope isolated include.
562
  *
563
  * Prevents access to $this/self from included files.
564
+ *
565
+ * @param string $file
566
+ * @return void
567
+ * @private
568
  */
569
  function includeFile($file)
570
  {
vendor/composer/InstalledVersions.php ADDED
@@ -0,0 +1,352 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Composer.
5
+ *
6
+ * (c) Nils Adermann <naderman@naderman.de>
7
+ * Jordi Boggiano <j.boggiano@seld.be>
8
+ *
9
+ * For the full copyright and license information, please view the LICENSE
10
+ * file that was distributed with this source code.
11
+ */
12
+
13
+ namespace Composer;
14
+
15
+ use Composer\Autoload\ClassLoader;
16
+ use Composer\Semver\VersionParser;
17
+
18
+ /**
19
+ * This class is copied in every Composer installed project and available to all
20
+ *
21
+ * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
22
+ *
23
+ * To require its presence, you can require `composer-runtime-api ^2.0`
24
+ *
25
+ * @final
26
+ */
27
+ 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
+
35
+ /**
36
+ * @var bool|null
37
+ */
38
+ private static $canGetVendors;
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
+
46
+ /**
47
+ * Returns a list of all package names which are present, either by being installed, replaced or provided
48
+ *
49
+ * @return string[]
50
+ * @psalm-return list<string>
51
+ */
52
+ public static function getInstalledPackages()
53
+ {
54
+ $packages = array();
55
+ foreach (self::getInstalled() as $installed) {
56
+ $packages[] = array_keys($installed['versions']);
57
+ }
58
+
59
+ if (1 === \count($packages)) {
60
+ return $packages[0];
61
+ }
62
+
63
+ return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
64
+ }
65
+
66
+ /**
67
+ * Returns a list of all package names with a specific type e.g. 'library'
68
+ *
69
+ * @param string $type
70
+ * @return string[]
71
+ * @psalm-return list<string>
72
+ */
73
+ public static function getInstalledPackagesByType($type)
74
+ {
75
+ $packagesByType = array();
76
+
77
+ foreach (self::getInstalled() as $installed) {
78
+ foreach ($installed['versions'] as $name => $package) {
79
+ if (isset($package['type']) && $package['type'] === $type) {
80
+ $packagesByType[] = $name;
81
+ }
82
+ }
83
+ }
84
+
85
+ return $packagesByType;
86
+ }
87
+
88
+ /**
89
+ * Checks whether the given package is installed
90
+ *
91
+ * This also returns true if the package name is provided or replaced by another package
92
+ *
93
+ * @param string $packageName
94
+ * @param bool $includeDevRequirements
95
+ * @return bool
96
+ */
97
+ public static function isInstalled($packageName, $includeDevRequirements = true)
98
+ {
99
+ foreach (self::getInstalled() as $installed) {
100
+ if (isset($installed['versions'][$packageName])) {
101
+ return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
102
+ }
103
+ }
104
+
105
+ return false;
106
+ }
107
+
108
+ /**
109
+ * Checks whether the given package satisfies a version constraint
110
+ *
111
+ * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
112
+ *
113
+ * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
114
+ *
115
+ * @param VersionParser $parser Install composer/semver to have access to this class and functionality
116
+ * @param string $packageName
117
+ * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
118
+ * @return bool
119
+ */
120
+ public static function satisfies(VersionParser $parser, $packageName, $constraint)
121
+ {
122
+ $constraint = $parser->parseConstraints($constraint);
123
+ $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
124
+
125
+ return $provided->matches($constraint);
126
+ }
127
+
128
+ /**
129
+ * Returns a version constraint representing all the range(s) which are installed for a given package
130
+ *
131
+ * It is easier to use this via isInstalled() with the $constraint argument if you need to check
132
+ * whether a given version of a package is installed, and not just whether it exists
133
+ *
134
+ * @param string $packageName
135
+ * @return string Version constraint usable with composer/semver
136
+ */
137
+ public static function getVersionRanges($packageName)
138
+ {
139
+ foreach (self::getInstalled() as $installed) {
140
+ if (!isset($installed['versions'][$packageName])) {
141
+ continue;
142
+ }
143
+
144
+ $ranges = array();
145
+ if (isset($installed['versions'][$packageName]['pretty_version'])) {
146
+ $ranges[] = $installed['versions'][$packageName]['pretty_version'];
147
+ }
148
+ if (array_key_exists('aliases', $installed['versions'][$packageName])) {
149
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
150
+ }
151
+ if (array_key_exists('replaced', $installed['versions'][$packageName])) {
152
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
153
+ }
154
+ if (array_key_exists('provided', $installed['versions'][$packageName])) {
155
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
156
+ }
157
+
158
+ return implode(' || ', $ranges);
159
+ }
160
+
161
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
162
+ }
163
+
164
+ /**
165
+ * @param string $packageName
166
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
167
+ */
168
+ public static function getVersion($packageName)
169
+ {
170
+ foreach (self::getInstalled() as $installed) {
171
+ if (!isset($installed['versions'][$packageName])) {
172
+ continue;
173
+ }
174
+
175
+ if (!isset($installed['versions'][$packageName]['version'])) {
176
+ return null;
177
+ }
178
+
179
+ return $installed['versions'][$packageName]['version'];
180
+ }
181
+
182
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
183
+ }
184
+
185
+ /**
186
+ * @param string $packageName
187
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
188
+ */
189
+ public static function getPrettyVersion($packageName)
190
+ {
191
+ foreach (self::getInstalled() as $installed) {
192
+ if (!isset($installed['versions'][$packageName])) {
193
+ continue;
194
+ }
195
+
196
+ if (!isset($installed['versions'][$packageName]['pretty_version'])) {
197
+ return null;
198
+ }
199
+
200
+ return $installed['versions'][$packageName]['pretty_version'];
201
+ }
202
+
203
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
204
+ }
205
+
206
+ /**
207
+ * @param string $packageName
208
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
209
+ */
210
+ public static function getReference($packageName)
211
+ {
212
+ foreach (self::getInstalled() as $installed) {
213
+ if (!isset($installed['versions'][$packageName])) {
214
+ continue;
215
+ }
216
+
217
+ if (!isset($installed['versions'][$packageName]['reference'])) {
218
+ return null;
219
+ }
220
+
221
+ return $installed['versions'][$packageName]['reference'];
222
+ }
223
+
224
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
225
+ }
226
+
227
+ /**
228
+ * @param string $packageName
229
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
230
+ */
231
+ public static function getInstallPath($packageName)
232
+ {
233
+ foreach (self::getInstalled() as $installed) {
234
+ if (!isset($installed['versions'][$packageName])) {
235
+ continue;
236
+ }
237
+
238
+ return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
239
+ }
240
+
241
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
242
+ }
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
+ {
250
+ $installed = self::getInstalled();
251
+
252
+ return $installed[0]['root'];
253
+ }
254
+
255
+ /**
256
+ * Returns the raw installed.php data for custom implementations
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
+ {
264
+ @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
265
+
266
+ if (null === self::$installed) {
267
+ // only require the installed.php file if this file is loaded from its dumped location,
268
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
269
+ if (substr(__DIR__, -8, 1) !== 'C') {
270
+ self::$installed = include __DIR__ . '/installed.php';
271
+ } else {
272
+ self::$installed = array();
273
+ }
274
+ }
275
+
276
+ return self::$installed;
277
+ }
278
+
279
+ /**
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
+ {
287
+ return self::getInstalled();
288
+ }
289
+
290
+ /**
291
+ * Lets you reload the static array from another file
292
+ *
293
+ * This is only useful for complex integrations in which a project needs to use
294
+ * this class but then also needs to execute another project's autoloader in process,
295
+ * and wants to ensure both projects have access to their version of installed.php.
296
+ *
297
+ * A typical case would be PHPUnit, where it would need to make sure it reads all
298
+ * the data it needs from this class, then call reload() with
299
+ * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
300
+ * the project in which it runs can then also use this class safely, without
301
+ * interference between PHPUnit's dependencies and the project's dependencies.
302
+ *
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
+ {
310
+ self::$installed = $data;
311
+ self::$installedByVendor = array();
312
+ }
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
+ {
320
+ if (null === self::$canGetVendors) {
321
+ self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
322
+ }
323
+
324
+ $installed = array();
325
+
326
+ if (self::$canGetVendors) {
327
+ foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
328
+ if (isset(self::$installedByVendor[$vendorDir])) {
329
+ $installed[] = self::$installedByVendor[$vendorDir];
330
+ } elseif (is_file($vendorDir.'/composer/installed.php')) {
331
+ $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
332
+ if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
333
+ self::$installed = $installed[count($installed) - 1];
334
+ }
335
+ }
336
+ }
337
+ }
338
+
339
+ if (null === self::$installed) {
340
+ // only require the installed.php file if this file is loaded from its dumped location,
341
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
342
+ if (substr(__DIR__, -8, 1) !== 'C') {
343
+ self::$installed = require __DIR__ . '/installed.php';
344
+ } else {
345
+ self::$installed = array();
346
+ }
347
+ }
348
+ $installed[] = self::$installed;
349
+
350
+ return $installed;
351
+ }
352
+ }
vendor/composer/autoload_classmap.php CHANGED
@@ -2,10 +2,11 @@
2
 
3
  // autoload_classmap.php @generated by Composer
4
 
5
- $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
 
9
  'RCliTextFormatter' => $baseDir . '/classes/Ref.php',
10
  'RFormatter' => $baseDir . '/classes/Ref.php',
11
  'RHtmlFormatter' => $baseDir . '/classes/Ref.php',
@@ -89,7 +90,6 @@ return array(
89
  'WSAL_Settings' => $baseDir . '/classes/Settings.php',
90
  'WSAL_TablePressExtension' => $baseDir . '/classes/ThirdPartyExtensions/TablePressExtension.php',
91
  'WSAL_Uninstall' => $baseDir . '/classes/Uninstall.php',
92
- 'WSAL_Upgrade_43000_To_44400' => $baseDir . '/classes/Upgrade/Upgrade_43000_To_44400.php',
93
  'WSAL_Utilities_DateTimeFormatter' => $baseDir . '/classes/Utilities/DateTimeFormatter.php',
94
  'WSAL_Utilities_Emailer' => $baseDir . '/classes/Utilities/Emailer.php',
95
  'WSAL_Utilities_FileSystemUtils' => $baseDir . '/classes/Utilities/FileSystemUtils.php',
2
 
3
  // autoload_classmap.php @generated by Composer
4
 
5
+ $vendorDir = dirname(__DIR__);
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
9
+ 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
10
  'RCliTextFormatter' => $baseDir . '/classes/Ref.php',
11
  'RFormatter' => $baseDir . '/classes/Ref.php',
12
  'RHtmlFormatter' => $baseDir . '/classes/Ref.php',
90
  'WSAL_Settings' => $baseDir . '/classes/Settings.php',
91
  'WSAL_TablePressExtension' => $baseDir . '/classes/ThirdPartyExtensions/TablePressExtension.php',
92
  'WSAL_Uninstall' => $baseDir . '/classes/Uninstall.php',
 
93
  'WSAL_Utilities_DateTimeFormatter' => $baseDir . '/classes/Utilities/DateTimeFormatter.php',
94
  'WSAL_Utilities_Emailer' => $baseDir . '/classes/Utilities/Emailer.php',
95
  'WSAL_Utilities_FileSystemUtils' => $baseDir . '/classes/Utilities/FileSystemUtils.php',
vendor/composer/autoload_files.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_files.php @generated by Composer
4
 
5
- $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
2
 
3
  // autoload_files.php @generated by Composer
4
 
5
+ $vendorDir = dirname(__DIR__);
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
vendor/composer/autoload_namespaces.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_namespaces.php @generated by Composer
4
 
5
- $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
2
 
3
  // autoload_namespaces.php @generated by Composer
4
 
5
+ $vendorDir = dirname(__DIR__);
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
vendor/composer/autoload_psr4.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_psr4.php @generated by Composer
4
 
5
- $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
2
 
3
  // autoload_psr4.php @generated by Composer
4
 
5
+ $vendorDir = dirname(__DIR__);
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit3f55157f4a5fe9869d231c288e83d8cc
6
  {
7
  private static $loader;
8
 
@@ -22,52 +22,34 @@ class ComposerAutoloaderInit3f55157f4a5fe9869d231c288e83d8cc
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInit3f55157f4a5fe9869d231c288e83d8cc', 'loadClassLoader'), true, true);
26
- self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInit3f55157f4a5fe9869d231c288e83d8cc', 'loadClassLoader'));
28
 
29
- $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
- if ($useStaticLoader) {
31
- require_once __DIR__ . '/autoload_static.php';
32
-
33
- call_user_func(\Composer\Autoload\ComposerStaticInit3f55157f4a5fe9869d231c288e83d8cc::getInitializer($loader));
34
- } else {
35
- $map = require __DIR__ . '/autoload_namespaces.php';
36
- foreach ($map as $namespace => $path) {
37
- $loader->set($namespace, $path);
38
- }
39
-
40
- $map = require __DIR__ . '/autoload_psr4.php';
41
- foreach ($map as $namespace => $path) {
42
- $loader->setPsr4($namespace, $path);
43
- }
44
-
45
- $classMap = require __DIR__ . '/autoload_classmap.php';
46
- if ($classMap) {
47
- $loader->addClassMap($classMap);
48
- }
49
- }
50
 
51
  $loader->register(true);
52
 
53
- if ($useStaticLoader) {
54
- $includeFiles = Composer\Autoload\ComposerStaticInit3f55157f4a5fe9869d231c288e83d8cc::$files;
55
- } else {
56
- $includeFiles = require __DIR__ . '/autoload_files.php';
57
- }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
- composerRequire3f55157f4a5fe9869d231c288e83d8cc($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
- function composerRequire3f55157f4a5fe9869d231c288e83d8cc($fileIdentifier, $file)
 
 
 
 
 
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
- require $file;
70
-
71
  $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
 
 
72
  }
73
  }
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit6d630355672f72ee3630270ffc4f7a88
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInit6d630355672f72ee3630270ffc4f7a88', 'loadClassLoader'), true, true);
26
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
27
+ spl_autoload_unregister(array('ComposerAutoloaderInit6d630355672f72ee3630270ffc4f7a88', 'loadClassLoader'));
28
 
29
+ require __DIR__ . '/autoload_static.php';
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit6d630355672f72ee3630270ffc4f7a88::getInitializer($loader));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
 
32
  $loader->register(true);
33
 
34
+ $includeFiles = \Composer\Autoload\ComposerStaticInit6d630355672f72ee3630270ffc4f7a88::$files;
 
 
 
 
35
  foreach ($includeFiles as $fileIdentifier => $file) {
36
+ composerRequire6d630355672f72ee3630270ffc4f7a88($fileIdentifier, $file);
37
  }
38
 
39
  return $loader;
40
  }
41
  }
42
 
43
+ /**
44
+ * @param string $fileIdentifier
45
+ * @param string $file
46
+ * @return void
47
+ */
48
+ function composerRequire6d630355672f72ee3630270ffc4f7a88($fileIdentifier, $file)
49
  {
50
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
 
 
51
  $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
52
+
53
+ require $file;
54
  }
55
  }
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit3f55157f4a5fe9869d231c288e83d8cc
8
  {
9
  public static $files = array (
10
  '2007ccaa29a9efd0493ee82176c977d1' => __DIR__ . '/..' . '/wpwhitesecurity/import-export-plugin-settings/SettingsImportExport.php',
@@ -26,6 +26,7 @@ class ComposerStaticInit3f55157f4a5fe9869d231c288e83d8cc
26
  );
27
 
28
  public static $classMap = array (
 
29
  'RCliTextFormatter' => __DIR__ . '/../..' . '/classes/Ref.php',
30
  'RFormatter' => __DIR__ . '/../..' . '/classes/Ref.php',
31
  'RHtmlFormatter' => __DIR__ . '/../..' . '/classes/Ref.php',
@@ -109,7 +110,6 @@ class ComposerStaticInit3f55157f4a5fe9869d231c288e83d8cc
109
  'WSAL_Settings' => __DIR__ . '/../..' . '/classes/Settings.php',
110
  'WSAL_TablePressExtension' => __DIR__ . '/../..' . '/classes/ThirdPartyExtensions/TablePressExtension.php',
111
  'WSAL_Uninstall' => __DIR__ . '/../..' . '/classes/Uninstall.php',
112
- 'WSAL_Upgrade_43000_To_44400' => __DIR__ . '/../..' . '/classes/Upgrade/Upgrade_43000_To_44400.php',
113
  'WSAL_Utilities_DateTimeFormatter' => __DIR__ . '/../..' . '/classes/Utilities/DateTimeFormatter.php',
114
  'WSAL_Utilities_Emailer' => __DIR__ . '/../..' . '/classes/Utilities/Emailer.php',
115
  'WSAL_Utilities_FileSystemUtils' => __DIR__ . '/../..' . '/classes/Utilities/FileSystemUtils.php',
@@ -137,9 +137,9 @@ class ComposerStaticInit3f55157f4a5fe9869d231c288e83d8cc
137
  public static function getInitializer(ClassLoader $loader)
138
  {
139
  return \Closure::bind(function () use ($loader) {
140
- $loader->prefixLengthsPsr4 = ComposerStaticInit3f55157f4a5fe9869d231c288e83d8cc::$prefixLengthsPsr4;
141
- $loader->prefixDirsPsr4 = ComposerStaticInit3f55157f4a5fe9869d231c288e83d8cc::$prefixDirsPsr4;
142
- $loader->classMap = ComposerStaticInit3f55157f4a5fe9869d231c288e83d8cc::$classMap;
143
 
144
  }, null, ClassLoader::class);
145
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit6d630355672f72ee3630270ffc4f7a88
8
  {
9
  public static $files = array (
10
  '2007ccaa29a9efd0493ee82176c977d1' => __DIR__ . '/..' . '/wpwhitesecurity/import-export-plugin-settings/SettingsImportExport.php',
26
  );
27
 
28
  public static $classMap = array (
29
+ 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
30
  'RCliTextFormatter' => __DIR__ . '/../..' . '/classes/Ref.php',
31
  'RFormatter' => __DIR__ . '/../..' . '/classes/Ref.php',
32
  'RHtmlFormatter' => __DIR__ . '/../..' . '/classes/Ref.php',
110
  'WSAL_Settings' => __DIR__ . '/../..' . '/classes/Settings.php',
111
  'WSAL_TablePressExtension' => __DIR__ . '/../..' . '/classes/ThirdPartyExtensions/TablePressExtension.php',
112
  'WSAL_Uninstall' => __DIR__ . '/../..' . '/classes/Uninstall.php',
 
113
  'WSAL_Utilities_DateTimeFormatter' => __DIR__ . '/../..' . '/classes/Utilities/DateTimeFormatter.php',
114
  'WSAL_Utilities_Emailer' => __DIR__ . '/../..' . '/classes/Utilities/Emailer.php',
115
  'WSAL_Utilities_FileSystemUtils' => __DIR__ . '/../..' . '/classes/Utilities/FileSystemUtils.php',
137
  public static function getInitializer(ClassLoader $loader)
138
  {
139
  return \Closure::bind(function () use ($loader) {
140
+ $loader->prefixLengthsPsr4 = ComposerStaticInit6d630355672f72ee3630270ffc4f7a88::$prefixLengthsPsr4;
141
+ $loader->prefixDirsPsr4 = ComposerStaticInit6d630355672f72ee3630270ffc4f7a88::$prefixDirsPsr4;
142
+ $loader->classMap = ComposerStaticInit6d630355672f72ee3630270ffc4f7a88::$classMap;
143
 
144
  }, null, ClassLoader::class);
145
  }
vendor/composer/installed.json CHANGED
@@ -1,206 +1,215 @@
1
- [
2
- {
3
- "name": "deliciousbrains/wp-background-processing",
4
- "version": "1.0.2",
5
- "version_normalized": "1.0.2.0",
6
- "source": {
7
- "type": "git",
8
- "url": "https://github.com/deliciousbrains/wp-background-processing.git",
9
- "reference": "2cbee1abd1b49e1133cd8f611df4d4fc5a8b9800"
10
- },
11
- "dist": {
12
- "type": "zip",
13
- "url": "https://api.github.com/repos/deliciousbrains/wp-background-processing/zipball/2cbee1abd1b49e1133cd8f611df4d4fc5a8b9800",
14
- "reference": "2cbee1abd1b49e1133cd8f611df4d4fc5a8b9800",
15
- "shasum": ""
16
- },
17
- "require": {
18
- "php": ">=5.2"
19
- },
20
- "suggest": {
21
- "coenjacobs/mozart": "Easily wrap this library with your own prefix, to prevent collisions when multiple plugins use this library"
22
- },
23
- "time": "2020-07-31T07:00:11+00:00",
24
- "type": "library",
25
- "installation-source": "dist",
26
- "autoload": {
27
- "classmap": [
28
- "classes/"
29
- ]
30
- },
31
- "notification-url": "https://packagist.org/downloads/",
32
- "license": [
33
- "GPL-2.0-or-later"
34
- ],
35
- "authors": [
36
- {
37
- "name": "Delicious Brains",
38
- "email": "nom@deliciousbrains.com"
39
- }
40
- ],
41
- "description": "WP Background Processing can be used to fire off non-blocking asynchronous requests or as a background processing tool, allowing you to queue tasks.",
42
- "support": {
43
- "issues": "https://github.com/deliciousbrains/wp-background-processing/issues",
44
- "source": "https://github.com/deliciousbrains/wp-background-processing/tree/master"
45
- }
46
- },
47
- {
48
- "name": "freemius/wordpress-sdk",
49
- "version": "2.4.3",
50
- "version_normalized": "2.4.3.0",
51
- "source": {
52
- "type": "git",
53
- "url": "https://github.com/Freemius/wordpress-sdk.git",
54
- "reference": "d2c3e1c27792f34123f928ea9fa73be56c337d13"
55
- },
56
- "dist": {
57
- "type": "zip",
58
- "url": "https://api.github.com/repos/Freemius/wordpress-sdk/zipball/d2c3e1c27792f34123f928ea9fa73be56c337d13",
59
- "reference": "d2c3e1c27792f34123f928ea9fa73be56c337d13",
60
- "shasum": ""
61
- },
62
- "require": {
63
- "php": ">=5.2"
64
- },
65
- "time": "2022-03-03T09:14:17+00:00",
66
- "type": "library",
67
- "installation-source": "dist",
68
- "notification-url": "https://packagist.org/downloads/",
69
- "license": [
70
- "GPL-3.0-only"
71
- ],
72
- "description": "Freemius WordPress SDK",
73
- "homepage": "https://freemius.com",
74
- "keywords": [
75
- "freemius",
76
- "plugin",
77
- "sdk",
78
- "theme",
79
- "wordpress",
80
- "wordpress-plugin",
81
- "wordpress-theme"
82
- ],
83
- "support": {
84
- "issues": "https://github.com/Freemius/wordpress-sdk/issues",
85
- "source": "https://github.com/Freemius/wordpress-sdk/tree/2.4.3"
86
- }
87
- },
88
- {
89
- "name": "woocommerce/action-scheduler",
90
- "version": "3.4.0",
91
- "version_normalized": "3.4.0.0",
92
- "source": {
93
- "type": "git",
94
- "url": "https://github.com/woocommerce/action-scheduler.git",
95
- "reference": "3218a33ff14b968f8cb05de9656c2efa1eeb1330"
96
- },
97
- "dist": {
98
- "type": "zip",
99
- "url": "https://api.github.com/repos/woocommerce/action-scheduler/zipball/3218a33ff14b968f8cb05de9656c2efa1eeb1330",
100
- "reference": "3218a33ff14b968f8cb05de9656c2efa1eeb1330",
101
- "shasum": ""
102
- },
103
- "require-dev": {
104
- "phpunit/phpunit": "^7.5",
105
- "woocommerce/woocommerce-sniffs": "0.1.0",
106
- "wp-cli/wp-cli": "~2.5.0",
107
- "yoast/phpunit-polyfills": "^1.0"
108
- },
109
- "time": "2021-10-28T17:09:12+00:00",
110
- "type": "wordpress-plugin",
111
- "extra": {
112
- "scripts-description": {
113
- "test": "Run unit tests",
114
- "phpcs": "Analyze code against the WordPress coding standards with PHP_CodeSniffer",
115
- "phpcbf": "Fix coding standards warnings/errors automatically with PHP Code Beautifier"
116
- }
117
- },
118
- "installation-source": "dist",
119
- "notification-url": "https://packagist.org/downloads/",
120
- "license": [
121
- "GPL-3.0-or-later"
122
- ],
123
- "description": "Action Scheduler for WordPress and WooCommerce",
124
- "homepage": "https://actionscheduler.org/",
125
- "support": {
126
- "issues": "https://github.com/woocommerce/action-scheduler/issues",
127
- "source": "https://github.com/woocommerce/action-scheduler/tree/3.4.0"
128
- }
129
- },
130
- {
131
- "name": "wpwhitesecurity/import-export-plugin-settings",
132
- "version": "1.0.0",
133
- "version_normalized": "1.0.0.0",
134
- "source": {
135
- "type": "git",
136
- "url": "https://github.com/wpwhitesecurity/import-export-plugin-settings.git",
137
- "reference": "3b8e5707bc754edab795389e0978b9b6bb7ee205"
138
- },
139
- "dist": {
140
- "type": "zip",
141
- "url": "https://api.github.com/repos/wpwhitesecurity/import-export-plugin-settings/zipball/3b8e5707bc754edab795389e0978b9b6bb7ee205",
142
- "reference": "3b8e5707bc754edab795389e0978b9b6bb7ee205",
143
- "shasum": ""
144
- },
145
- "require": {
146
- "php": ">=7.0"
147
- },
148
- "time": "2022-04-11T11:11:46+00:00",
149
- "type": "library",
150
- "installation-source": "dist",
151
- "autoload": {
152
- "files": [
153
- "SettingsImportExport.php"
154
- ]
155
- },
156
- "authors": [
157
- {
158
- "name": "WP White Security",
159
- "email": "info@wpwhitesecurity.com"
160
- }
161
- ],
162
- "description": "Settings import/export library for WordPress",
163
- "support": {
164
- "source": "https://github.com/wpwhitesecurity/import-export-plugin-settings/tree/v1.0.0",
165
- "issues": "https://github.com/wpwhitesecurity/import-export-plugin-settings/issues"
166
- }
167
- },
168
- {
169
- "name": "wpwhitesecurity/select2-wpwhitesecurity",
170
- "version": "1.0.2",
171
- "version_normalized": "1.0.2.0",
172
- "source": {
173
- "type": "git",
174
- "url": "https://github.com/wpwhitesecurity/select2-wpwhitesecurity.git",
175
- "reference": "d56f367bcd22ba0836cd2ee6e88a1a3902f01ad3"
176
- },
177
- "dist": {
178
- "type": "zip",
179
- "url": "https://api.github.com/repos/wpwhitesecurity/select2-wpwhitesecurity/zipball/d56f367bcd22ba0836cd2ee6e88a1a3902f01ad3",
180
- "reference": "d56f367bcd22ba0836cd2ee6e88a1a3902f01ad3",
181
- "shasum": ""
182
- },
183
- "require": {
184
- "php": ">=7.0"
185
- },
186
- "time": "2022-03-16T08:53:12+00:00",
187
- "type": "library",
188
- "installation-source": "dist",
189
- "autoload": {
190
- "files": [
191
- "load.php"
192
- ]
193
- },
194
- "authors": [
195
- {
196
- "name": "WP White Security",
197
- "email": "info@wpwhitesecurity.com"
198
- }
199
- ],
200
- "description": "Select2 integration library for WordPress",
201
- "support": {
202
- "source": "https://github.com/wpwhitesecurity/select2-wpwhitesecurity/tree/v1.0.2",
203
- "issues": "https://github.com/wpwhitesecurity/select2-wpwhitesecurity/issues"
 
 
 
 
 
 
 
204
  }
205
- }
206
- ]
 
 
1
+ {
2
+ "packages": [
3
+ {
4
+ "name": "deliciousbrains/wp-background-processing",
5
+ "version": "1.0.2",
6
+ "version_normalized": "1.0.2.0",
7
+ "source": {
8
+ "type": "git",
9
+ "url": "https://github.com/deliciousbrains/wp-background-processing.git",
10
+ "reference": "2cbee1abd1b49e1133cd8f611df4d4fc5a8b9800"
11
+ },
12
+ "dist": {
13
+ "type": "zip",
14
+ "url": "https://api.github.com/repos/deliciousbrains/wp-background-processing/zipball/2cbee1abd1b49e1133cd8f611df4d4fc5a8b9800",
15
+ "reference": "2cbee1abd1b49e1133cd8f611df4d4fc5a8b9800",
16
+ "shasum": ""
17
+ },
18
+ "require": {
19
+ "php": ">=5.2"
20
+ },
21
+ "suggest": {
22
+ "coenjacobs/mozart": "Easily wrap this library with your own prefix, to prevent collisions when multiple plugins use this library"
23
+ },
24
+ "time": "2020-07-31T07:00:11+00:00",
25
+ "type": "library",
26
+ "installation-source": "dist",
27
+ "autoload": {
28
+ "classmap": [
29
+ "classes/"
30
+ ]
31
+ },
32
+ "notification-url": "https://packagist.org/downloads/",
33
+ "license": [
34
+ "GPL-2.0-or-later"
35
+ ],
36
+ "authors": [
37
+ {
38
+ "name": "Delicious Brains",
39
+ "email": "nom@deliciousbrains.com"
40
+ }
41
+ ],
42
+ "description": "WP Background Processing can be used to fire off non-blocking asynchronous requests or as a background processing tool, allowing you to queue tasks.",
43
+ "support": {
44
+ "issues": "https://github.com/deliciousbrains/wp-background-processing/issues",
45
+ "source": "https://github.com/deliciousbrains/wp-background-processing/tree/master"
46
+ },
47
+ "install-path": "../deliciousbrains/wp-background-processing"
48
+ },
49
+ {
50
+ "name": "freemius/wordpress-sdk",
51
+ "version": "2.4.3",
52
+ "version_normalized": "2.4.3.0",
53
+ "source": {
54
+ "type": "git",
55
+ "url": "https://github.com/Freemius/wordpress-sdk.git",
56
+ "reference": "d2c3e1c27792f34123f928ea9fa73be56c337d13"
57
+ },
58
+ "dist": {
59
+ "type": "zip",
60
+ "url": "https://api.github.com/repos/Freemius/wordpress-sdk/zipball/d2c3e1c27792f34123f928ea9fa73be56c337d13",
61
+ "reference": "d2c3e1c27792f34123f928ea9fa73be56c337d13",
62
+ "shasum": ""
63
+ },
64
+ "require": {
65
+ "php": ">=5.2"
66
+ },
67
+ "time": "2022-03-03T09:14:17+00:00",
68
+ "type": "library",
69
+ "installation-source": "dist",
70
+ "notification-url": "https://packagist.org/downloads/",
71
+ "license": [
72
+ "GPL-3.0-only"
73
+ ],
74
+ "description": "Freemius WordPress SDK",
75
+ "homepage": "https://freemius.com",
76
+ "keywords": [
77
+ "freemius",
78
+ "plugin",
79
+ "sdk",
80
+ "theme",
81
+ "wordpress",
82
+ "wordpress-plugin",
83
+ "wordpress-theme"
84
+ ],
85
+ "support": {
86
+ "issues": "https://github.com/Freemius/wordpress-sdk/issues",
87
+ "source": "https://github.com/Freemius/wordpress-sdk/tree/2.4.3"
88
+ },
89
+ "install-path": "../freemius/wordpress-sdk"
90
+ },
91
+ {
92
+ "name": "woocommerce/action-scheduler",
93
+ "version": "3.4.2",
94
+ "version_normalized": "3.4.2.0",
95
+ "source": {
96
+ "type": "git",
97
+ "url": "https://github.com/woocommerce/action-scheduler.git",
98
+ "reference": "7d8e830b6387410ccf11708194d3836f01cb2942"
99
+ },
100
+ "dist": {
101
+ "type": "zip",
102
+ "url": "https://api.github.com/repos/woocommerce/action-scheduler/zipball/7d8e830b6387410ccf11708194d3836f01cb2942",
103
+ "reference": "7d8e830b6387410ccf11708194d3836f01cb2942",
104
+ "shasum": ""
105
+ },
106
+ "require-dev": {
107
+ "phpunit/phpunit": "^7.5",
108
+ "woocommerce/woocommerce-sniffs": "0.1.0",
109
+ "wp-cli/wp-cli": "~2.5.0",
110
+ "yoast/phpunit-polyfills": "^1.0"
111
+ },
112
+ "time": "2022-06-08T15:46:07+00:00",
113
+ "type": "wordpress-plugin",
114
+ "extra": {
115
+ "scripts-description": {
116
+ "test": "Run unit tests",
117
+ "phpcs": "Analyze code against the WordPress coding standards with PHP_CodeSniffer",
118
+ "phpcbf": "Fix coding standards warnings/errors automatically with PHP Code Beautifier"
119
+ }
120
+ },
121
+ "installation-source": "dist",
122
+ "notification-url": "https://packagist.org/downloads/",
123
+ "license": [
124
+ "GPL-3.0-or-later"
125
+ ],
126
+ "description": "Action Scheduler for WordPress and WooCommerce",
127
+ "homepage": "https://actionscheduler.org/",
128
+ "support": {
129
+ "issues": "https://github.com/woocommerce/action-scheduler/issues",
130
+ "source": "https://github.com/woocommerce/action-scheduler/tree/3.4.2"
131
+ },
132
+ "install-path": "../woocommerce/action-scheduler"
133
+ },
134
+ {
135
+ "name": "wpwhitesecurity/import-export-plugin-settings",
136
+ "version": "1.0.0",
137
+ "version_normalized": "1.0.0.0",
138
+ "source": {
139
+ "type": "git",
140
+ "url": "https://github.com/wpwhitesecurity/import-export-plugin-settings.git",
141
+ "reference": "3b8e5707bc754edab795389e0978b9b6bb7ee205"
142
+ },
143
+ "dist": {
144
+ "type": "zip",
145
+ "url": "https://api.github.com/repos/wpwhitesecurity/import-export-plugin-settings/zipball/3b8e5707bc754edab795389e0978b9b6bb7ee205",
146
+ "reference": "3b8e5707bc754edab795389e0978b9b6bb7ee205",
147
+ "shasum": ""
148
+ },
149
+ "require": {
150
+ "php": ">=7.0"
151
+ },
152
+ "time": "2022-04-11T11:11:46+00:00",
153
+ "type": "library",
154
+ "installation-source": "dist",
155
+ "autoload": {
156
+ "files": [
157
+ "SettingsImportExport.php"
158
+ ]
159
+ },
160
+ "authors": [
161
+ {
162
+ "name": "WP White Security",
163
+ "email": "info@wpwhitesecurity.com"
164
+ }
165
+ ],
166
+ "description": "Settings import/export library for WordPress",
167
+ "support": {
168
+ "source": "https://github.com/wpwhitesecurity/import-export-plugin-settings/tree/v1.0.0",
169
+ "issues": "https://github.com/wpwhitesecurity/import-export-plugin-settings/issues"
170
+ },
171
+ "install-path": "../wpwhitesecurity/import-export-plugin-settings"
172
+ },
173
+ {
174
+ "name": "wpwhitesecurity/select2-wpwhitesecurity",
175
+ "version": "1.0.2",
176
+ "version_normalized": "1.0.2.0",
177
+ "source": {
178
+ "type": "git",
179
+ "url": "https://github.com/wpwhitesecurity/select2-wpwhitesecurity.git",
180
+ "reference": "d56f367bcd22ba0836cd2ee6e88a1a3902f01ad3"
181
+ },
182
+ "dist": {
183
+ "type": "zip",
184
+ "url": "https://api.github.com/repos/wpwhitesecurity/select2-wpwhitesecurity/zipball/d56f367bcd22ba0836cd2ee6e88a1a3902f01ad3",
185
+ "reference": "d56f367bcd22ba0836cd2ee6e88a1a3902f01ad3",
186
+ "shasum": ""
187
+ },
188
+ "require": {
189
+ "php": ">=7.0"
190
+ },
191
+ "time": "2022-03-16T08:53:12+00:00",
192
+ "type": "library",
193
+ "installation-source": "dist",
194
+ "autoload": {
195
+ "files": [
196
+ "load.php"
197
+ ]
198
+ },
199
+ "authors": [
200
+ {
201
+ "name": "WP White Security",
202
+ "email": "info@wpwhitesecurity.com"
203
+ }
204
+ ],
205
+ "description": "Select2 integration library for WordPress",
206
+ "support": {
207
+ "source": "https://github.com/wpwhitesecurity/select2-wpwhitesecurity/tree/v1.0.2",
208
+ "issues": "https://github.com/wpwhitesecurity/select2-wpwhitesecurity/issues"
209
+ },
210
+ "install-path": "../wpwhitesecurity/select2-wpwhitesecurity"
211
  }
212
+ ],
213
+ "dev": false,
214
+ "dev-package-names": []
215
+ }
vendor/composer/installed.php ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php return array(
2
+ 'root' => array(
3
+ 'name' => 'wp-white-security/wp-security-audit-log-premium',
4
+ 'pretty_version' => '4.4.1',
5
+ 'version' => '4.4.1.0',
6
+ 'reference' => NULL,
7
+ 'type' => 'wordpress-plugin',
8
+ 'install_path' => __DIR__ . '/../../',
9
+ 'aliases' => array(),
10
+ 'dev' => false,
11
+ ),
12
+ 'versions' => array(
13
+ 'deliciousbrains/wp-background-processing' => array(
14
+ 'pretty_version' => '1.0.2',
15
+ 'version' => '1.0.2.0',
16
+ 'reference' => '2cbee1abd1b49e1133cd8f611df4d4fc5a8b9800',
17
+ 'type' => 'library',
18
+ 'install_path' => __DIR__ . '/../deliciousbrains/wp-background-processing',
19
+ 'aliases' => array(),
20
+ 'dev_requirement' => false,
21
+ ),
22
+ 'freemius/wordpress-sdk' => array(
23
+ 'pretty_version' => '2.4.3',
24
+ 'version' => '2.4.3.0',
25
+ 'reference' => 'd2c3e1c27792f34123f928ea9fa73be56c337d13',
26
+ 'type' => 'library',
27
+ 'install_path' => __DIR__ . '/../freemius/wordpress-sdk',
28
+ 'aliases' => array(),
29
+ 'dev_requirement' => false,
30
+ ),
31
+ 'woocommerce/action-scheduler' => array(
32
+ 'pretty_version' => '3.4.2',
33
+ 'version' => '3.4.2.0',
34
+ 'reference' => '7d8e830b6387410ccf11708194d3836f01cb2942',
35
+ 'type' => 'wordpress-plugin',
36
+ 'install_path' => __DIR__ . '/../woocommerce/action-scheduler',
37
+ 'aliases' => array(),
38
+ 'dev_requirement' => false,
39
+ ),
40
+ 'wp-white-security/wp-security-audit-log-premium' => array(
41
+ 'pretty_version' => '4.4.1',
42
+ 'version' => '4.4.1.0',
43
+ 'reference' => NULL,
44
+ 'type' => 'wordpress-plugin',
45
+ 'install_path' => __DIR__ . '/../../',
46
+ 'aliases' => array(),
47
+ 'dev_requirement' => false,
48
+ ),
49
+ 'wpwhitesecurity/import-export-plugin-settings' => array(
50
+ 'pretty_version' => '1.0.0',
51
+ 'version' => '1.0.0.0',
52
+ 'reference' => '3b8e5707bc754edab795389e0978b9b6bb7ee205',
53
+ 'type' => 'library',
54
+ 'install_path' => __DIR__ . '/../wpwhitesecurity/import-export-plugin-settings',
55
+ 'aliases' => array(),
56
+ 'dev_requirement' => false,
57
+ ),
58
+ 'wpwhitesecurity/select2-wpwhitesecurity' => array(
59
+ 'pretty_version' => '1.0.2',
60
+ 'version' => '1.0.2.0',
61
+ 'reference' => 'd56f367bcd22ba0836cd2ee6e88a1a3902f01ad3',
62
+ 'type' => 'library',
63
+ 'install_path' => __DIR__ . '/../wpwhitesecurity/select2-wpwhitesecurity',
64
+ 'aliases' => array(),
65
+ 'dev_requirement' => false,
66
+ ),
67
+ ),
68
+ );
wp-security-audit-log.php CHANGED
@@ -7,7 +7,7 @@
7
  *
8
  * @wordpress-plugin
9
  * Plugin Name: WP Activity Log
10
- * Version: 4.4.2
11
  * Plugin URI: https://wpactivitylog.com/
12
  * Description: Identify WordPress security issues before they become a problem. Keep track of everything happening on your WordPress, including users activity. Similar to Linux Syslog, WP Activity Log generates an activity log with a record of everything that happens on your WordPress websites.
13
  * Author: WP White Security
@@ -37,8 +37,6 @@
37
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
38
  */
39
 
40
- use WSAL\Helpers\WP_Helper;
41
-
42
  if ( ! defined( 'ABSPATH' ) ) {
43
  exit;
44
  }
@@ -49,10 +47,35 @@ if ( file_exists( plugin_dir_path( __FILE__ ) . 'vendor/autoload.php' ) ) {
49
  }
50
 
51
  if ( ! defined( 'WSAL_PREFIX' ) ) {
52
- define( 'WSAL_VERSION', '4.4.2' );
53
  define( 'WSAL_PREFIX', 'wsal_' );
54
  }
55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  if ( ! function_exists( 'wsal_freemius' ) ) {
57
 
58
  if ( ! class_exists( 'WpSecurityAuditLog' ) ) {
@@ -335,7 +358,6 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
335
  return;
336
  }
337
 
338
- $this->define_constants();
339
  $this->set_allowed_html_tags();
340
  $this->includes();
341
  $this->update();
@@ -603,7 +625,6 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
603
  */
604
  public static function is_mainwp_active() {
605
  return self::is_plugin_active( 'mainwp-child/mainwp-child.php' );
606
-
607
  }
608
 
609
  /**
@@ -747,38 +768,6 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
747
  );
748
  }
749
 
750
- /**
751
- * Method: Define constants.
752
- *
753
- * @since 2.6.6
754
- */
755
- public function define_constants() {
756
-
757
- // Plugin Name.
758
- if ( ! defined( 'WSAL_BASE_NAME' ) ) {
759
- define( 'WSAL_BASE_NAME', plugin_basename( __FILE__ ) );
760
- }
761
- // Plugin Directory URL.
762
- if ( ! defined( 'WSAL_BASE_URL' ) ) {
763
- define( 'WSAL_BASE_URL', plugin_dir_url( __FILE__ ) );
764
- }
765
- // Plugin Directory Path.
766
- if ( ! defined( 'WSAL_BASE_DIR' ) ) {
767
- define( 'WSAL_BASE_DIR', plugin_dir_path( __FILE__ ) );
768
- }
769
- // Plugin Docs URL.
770
- if ( ! defined( 'WSAL_DOCS_URL' ) ) {
771
- define( 'WSAL_DOCS_URL', 'https://wpactivitylog.com/support/' );
772
- }
773
- // Plugin Issue Reporting URL.
774
- if ( ! defined( 'WSAL_ISSUE_URL' ) ) {
775
- define( 'WSAL_ISSUE_URL', 'https://wordpress.org/support/plugin/wp-security-audit-log' );
776
- }
777
- // Plugin Classes Prefix.
778
- if ( ! defined( 'WSAL_CLASS_PREFIX' ) ) {
779
- define( 'WSAL_CLASS_PREFIX', 'WSAL_' );
780
- }
781
- }
782
  /**
783
  * Customize Freemius connect message for new users.
784
  *
@@ -2054,7 +2043,7 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
2054
  * @param string $transient Transient name. Expected to not be SQL-escaped.
2055
  *
2056
  * @return mixed Value of transient.
2057
- * @since 4.4.2
2058
  */
2059
  public static function get_transient( $transient ) {
2060
  return self::is_multisite() ? get_site_transient( $transient ) : get_transient( $transient );
@@ -2073,7 +2062,7 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
2073
  * @param int $expiration Optional. Time until expiration in seconds. Default 0 (no expiration).
2074
  *
2075
  * @return bool True if the value was set, false otherwise.
2076
- * @since 4.4.2
2077
  */
2078
  public static function set_transient( $transient, $value, $expiration = 0 ) {
2079
  return self::is_multisite() ? set_site_transient( $transient, $value, $expiration ) : set_transient( $transient, $value, $expiration );
@@ -2086,7 +2075,7 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
2086
  *
2087
  * @return bool True if the transient was deleted, false otherwise.
2088
  *
2089
- * @since 4.4.2
2090
  */
2091
  public static function delete_transient( $transient ) {
2092
  return self::is_multisite() ? delete_site_transient( $transient ) : delete_transient( $transient );
7
  *
8
  * @wordpress-plugin
9
  * Plugin Name: WP Activity Log
10
+ * Version: 4.4.2.1
11
  * Plugin URI: https://wpactivitylog.com/
12
  * Description: Identify WordPress security issues before they become a problem. Keep track of everything happening on your WordPress, including users activity. Similar to Linux Syslog, WP Activity Log generates an activity log with a record of everything that happens on your WordPress websites.
13
  * Author: WP White Security
37
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
38
  */
39
 
 
 
40
  if ( ! defined( 'ABSPATH' ) ) {
41
  exit;
42
  }
47
  }
48
 
49
  if ( ! defined( 'WSAL_PREFIX' ) ) {
50
+ define( 'WSAL_VERSION', '4.4.2.1' );
51
  define( 'WSAL_PREFIX', 'wsal_' );
52
  }
53
 
54
+ // Plugin Name.
55
+ if ( ! defined( 'WSAL_BASE_NAME' ) ) {
56
+ define( 'WSAL_BASE_NAME', plugin_basename( __FILE__ ) );
57
+ }
58
+ // Plugin Directory URL.
59
+ if ( ! defined( 'WSAL_BASE_URL' ) ) {
60
+ define( 'WSAL_BASE_URL', plugin_dir_url( __FILE__ ) );
61
+ }
62
+ // Plugin Directory Path.
63
+ if ( ! defined( 'WSAL_BASE_DIR' ) ) {
64
+ define( 'WSAL_BASE_DIR', plugin_dir_path( __FILE__ ) );
65
+ }
66
+ // Plugin Docs URL.
67
+ if ( ! defined( 'WSAL_DOCS_URL' ) ) {
68
+ define( 'WSAL_DOCS_URL', 'https://wpactivitylog.com/support/' );
69
+ }
70
+ // Plugin Issue Reporting URL.
71
+ if ( ! defined( 'WSAL_ISSUE_URL' ) ) {
72
+ define( 'WSAL_ISSUE_URL', 'https://wordpress.org/support/plugin/wp-security-audit-log' );
73
+ }
74
+ // Plugin Classes Prefix.
75
+ if ( ! defined( 'WSAL_CLASS_PREFIX' ) ) {
76
+ define( 'WSAL_CLASS_PREFIX', 'WSAL_' );
77
+ }
78
+
79
  if ( ! function_exists( 'wsal_freemius' ) ) {
80
 
81
  if ( ! class_exists( 'WpSecurityAuditLog' ) ) {
358
  return;
359
  }
360
 
 
361
  $this->set_allowed_html_tags();
362
  $this->includes();
363
  $this->update();
625
  */
626
  public static function is_mainwp_active() {
627
  return self::is_plugin_active( 'mainwp-child/mainwp-child.php' );
 
628
  }
629
 
630
  /**
768
  );
769
  }
770
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
771
  /**
772
  * Customize Freemius connect message for new users.
773
  *
2043
  * @param string $transient Transient name. Expected to not be SQL-escaped.
2044
  *
2045
  * @return mixed Value of transient.
2046
+ * @since 4.4.2.1
2047
  */
2048
  public static function get_transient( $transient ) {
2049
  return self::is_multisite() ? get_site_transient( $transient ) : get_transient( $transient );
2062
  * @param int $expiration Optional. Time until expiration in seconds. Default 0 (no expiration).
2063
  *
2064
  * @return bool True if the value was set, false otherwise.
2065
+ * @since 4.4.2.1
2066
  */
2067
  public static function set_transient( $transient, $value, $expiration = 0 ) {
2068
  return self::is_multisite() ? set_site_transient( $transient, $value, $expiration ) : set_transient( $transient, $value, $expiration );
2075
  *
2076
  * @return bool True if the transient was deleted, false otherwise.
2077
  *
2078
+ * @since 4.4.2.1
2079
  */
2080
  public static function delete_transient( $transient ) {
2081
  return self::is_multisite() ? delete_site_transient( $transient ) : delete_transient( $transient );